External drive with snapshots failed

Discussions related to using VirtualBox on Windows hosts.
Post Reply
TheDoctor
Posts: 9
Joined: 11. Jul 2020, 21:14

External drive with snapshots failed

Post by TheDoctor »

I haven't seen anything in the forums related to a complete failure of an external drive that holds my snapshots. I'm running VirtualBox 6.0 on a Windows 10 Pro box. I have an attached Toshiba hard drive that last night completely failed. I am unable to even initialize the disc. Of course all of my images cannot startup because it's looking for the drive. Is there any way to start a VDI without the snapshots or can I edit the entry somewhere so it's not looking for the snapshots?
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows, Linux

Re: External drive with snapshots failed

Post by scottgus1 »

At this stage of advanced destruction, I think only a manual edit of the .vbox file for each guest will recover what might still be on the main host disk.

Right-click the guest in the main Virtualbox window's guest list, choose Show in Explorer. Zip the guest's .vbox file, and post the zip file, using the forum's Upload Attachment tab.
TheDoctor
Posts: 9
Joined: 11. Jul 2020, 21:14

Re: External drive with snapshots failed

Post by TheDoctor »

Thank you for your assistance. I have been using VirtualBox for years and never had an issue. Trying to follow instructions, kindly let me know if this is the wrong file! I can open it with Notepad++ to see the xml files. I was wondering if I can delete all references to the H: drive location. That was the drive letter of my external and I am unable to recover it.
Attachments
Space.rar
(4.92 KiB) Downloaded 4 times
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows, Linux

Re: External drive with snapshots failed

Post by scottgus1 »

Here is the edited .vbox file:
Space.vbox no snapshots.zip
(2.23 KiB) Downloaded 5 times
With the loss of all the snapshots existing on the external drive, the only way forward was to remove all snapshot data. The guest is now back to where it was before the first snapshot was taken.

If you have any backups of the H external drive, speak now or forever hold your peace.

Otherwise, rename the existing 'space.vbox' to 'space.vbox-failed' and put the new zipped 'space.vbox' in the folder. Your guest should boot, but without the snapshot data & settings. The guest drive will never be able to use the snapshot data again if you happen to have taken a backup of the H drive but decide to bring it out after the .vbox file change.

I also removed the Guest Additions CD image from the CD drive. It was in all the snapshots too, which causes trouble in some circumstances. It is best to remove the GAs CD after installing.
TheDoctor
Posts: 9
Joined: 11. Jul 2020, 21:14

Re: External drive with snapshots failed

Post by TheDoctor »

Perfect! This is just what I was looking for. Thank You - no other post would guide me to booting without my snapshot data, they are gone. I realize I lost my updates and things like that but - oh well!! My situation is that I'm a Solution Architect and have a total of 7 appliances that I bring up for testing purposes, they are all licensed versions and I know I could have done a complete new install using the digital license, just wanted to recover as much as possible without total fresh starts. I have 6 more .vbox files to edit, I'll use this one as a template. I'll holler if I need help. When completed I'll let you know. Again I Thank You for fixing one and pointing me in the right direction - I knew it could be done lol :D
TheDoctor
Posts: 9
Joined: 11. Jul 2020, 21:14

Re: External drive with snapshots failed

Post by TheDoctor »

Having trouble with this one, if you can take a look I would appreciate. This one was changed to a VDMK as I wanted to try Hyper-V but came back to VirtualBox right away. Perhaps that's why I am having a problem. It's been running fine for a couple of years but of course now with the snapshot situation. Thank You in advance if you are willing!
Attachments
DeerCreek.rar
(3.79 KiB) Downloaded 4 times
TheDoctor
Posts: 9
Joined: 11. Jul 2020, 21:14

Re: External drive with snapshots failed

Post by TheDoctor »

Or if you feel like teaching someone to fish - perhaps you wouldn't mind comparing these two. Here is another one that I attempted to modify but it still is looking for the external drive snapshot folder. I have even recreated an H: drive with sub folders just in case however I notice with the one you made it is looking at the snapshots folder in the same directory as the .vdi - that's great. Where did I go wrong with this one? Again, I appreciate any help!
Attachments
2 vbox files.rar
(6.09 KiB) Downloaded 4 times
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows, Linux

Re: External drive with snapshots failed

Post by scottgus1 »

Well, Doc, you did some really good surgery on 'Auditorium.vbox'! All the <Snapshot> blocks were removed, the H-drive folders and disks were removed, and the Snapshots folder is reverted to the default. The GAs image was removed from the CD drive, and the hard drive controller points to the base disk. Excellent work!

Here's two 'vessels' that need tying off:

When an existing 'block' of XML containing 'sub-blocks' is edited to just a one-liner 'block', the block must be closed with a forward slash just before the closing >. For example note this XML block of three lines:
<key1 data="some stuff">
  <subkey subdata="other stuff"/>
</key1>
If we wish to remove 'subkey', we remove the closing </key1> and add a / just before the > at the end of key1's first line:
<key1 data="some stuff"/>
Note in the three-line example, 'subkey' was also a complete line by itself, so had a closing />.

I believe that all you need to do to 'Auditorium.vbox' is add a forward slash before the > on these two single-line blocks, and 'Auditorium' should be good to go:

<HardDisk uuid="{3bd8b5c3-ce96-4fe3-86ca-31ff0e52b550}" location="Auditorium.vdi" format="VDI" type="Normal"/>
<AttachedDevice passthrough="false" type="DVD" hotpluggable="false" port="1" device="0"/>

'DeerCreek.vbox' should be the same edits. Using VMDK's for the disks is not a problem. Make the same changes, remove the DVD image from the DVD drive (even though it's not GAs you can reattach it in the main Virtualbox window later) and close the newly-edited single-line blocks with />, and you should be good.

One other thing I forgot to mention: No Virtualbox windows or processes should be running when you're manually editing .vbox files. Check your Task Manager or Process Explorer that every process starting with 'Vbox' is gone before saving a .vbox file's manual edit. VirtualBox's background service VboxSVC.exe stores all .vbox files in memory and writes them back to disk when the service closes, overwriting manual edits made while the service was running.
TheDoctor
Posts: 9
Joined: 11. Jul 2020, 21:14

Re: External drive with snapshots failed

Post by TheDoctor »

Ok - Auditorium worked! DeerCreek did not however. When I replaced the file (and Thanks for the tip to stop all processes before saving, etc.- I didn't do that last time), the vm became Inaccessible, image or error attached. Tried to follow your suggestion, did I remove the wrong disc? I attached the OLD file (that one works makes it accessible but won't start due to snapshots of course) and the DeerCreek.vbox file makes it inaccessible - they are both zipped in the DeerCreek2.rar file. Speaking of OLD, I'm 64 and trying to get this done so thought you might like to know you get good karma for helping a senior citizen :D
Attachments
error.PNG
error.PNG (47.84 KiB) Viewed 1839 times
DeerCreek2.rar
(6.04 KiB) Downloaded 4 times
TheDoctor
Posts: 9
Joined: 11. Jul 2020, 21:14

Re: External drive with snapshots failed

Post by TheDoctor »

btw - carefully editing Fillmoe and Red Rocks, two other appliances, and also getting the inaccessible error like pictured. All VM's are physically in one folder, separated by their unique folder. Two are working so that's very cool! What is throwing it off I wonder?
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows, Linux

Re: External drive with snapshots failed

Post by scottgus1 »

Ok, this one has a couple glitches:
DeerCreek.vbox wrote:
<StorageControllers>
      <StorageController name="IDE" type="PIIX4" PortCount="2" useHostIOCache="true" Bootable="true">
        <AttachedDevice passthrough="false" type="DVD" port="1" device="0"/>
          <Image uuid="{162097e2-1bca-46a9-8901-1f9d4a7fa511}"/>
        </AttachedDevice>
      </StorageController>
    </StorageControllers>
It appears that the SATA storage controller was deleted, which I guess probably should have still been there. Also the first line for the DVD block was given a / to make it a single-liner, but it still has the attached ISO UUID, so that's where the error appears to come from.
DeerCreek.vbox.zip
(2.45 KiB) Downloaded 4 times
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows, Linux

Re: External drive with snapshots failed

Post by scottgus1 »

Re the other .vbox files, I'd recommend opening each one alongside a working one like Auditorium, and comparing the Hard Disks and Storage Controllers sections.

The Snapshots blocks in the middle, and the current snapshot edit in the first line you seem to have down good.
TheDoctor
Posts: 9
Joined: 11. Jul 2020, 21:14

Re: External drive with snapshots failed

Post by TheDoctor »

I can't Thank You enough - at least 3 are going today, I'll give the others a shot tomorrow. I'm not used to looking at code all day. The other two mentioned I did use the working copy of Space you sent but obviously overlooking something and it's getting late. I'll tackle the rest tomorrow. Again, Thanks for your help, I am understanding most of what your are telling me!
TheDoctor
Posts: 9
Joined: 11. Jul 2020, 21:14

Re: External drive with snapshots failed

Post by TheDoctor »

@scottgus1 - The fishing has been good! All VM's are up and running. I was too tied up yesterday to even attempt however my afternoon was clear today and managed to fire up all 7 now! I appreciate your help and tutelage. Stay Safe.
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows, Linux

Re: External drive with snapshots failed

Post by scottgus1 »

Excellent! Glad you're up and running. Too bad the snapshots were lost, but at least the base VMs are good.

One other piece of advice: Start taking backups of the main and secondary drives. Don't trust anything important or time-consuming to restore to just one storage medium. Shut down the guests, then copy the files & folders to multiple other disks. This will save time and limit data loss next time.
Post Reply