Virtual machine in inaccessible state after taking a snapshot failed

This is for discussing general topics about how to use VirtualBox.
Post Reply
honoju
Posts: 5
Joined: 5. Sep 2021, 16:30

Virtual machine in inaccessible state after taking a snapshot failed

Post by honoju »

Hello,

I am using 6.1.22 version of virtual box with windows10 as host machine and debian buster as guest machine.Both are x64. I installed the VBox Guest additions image.

I got my virtual machine in a inaccessible state after an attempt of taking a snapshot that didn't go to the end.
I am getting two errors while trying to launch my virtual machine:

This one for the virtual machine vdi : The given path '{b2a19544-f1fd-4017-94d0-4ff9e37d0222}' is not fully qualified.

And this one for the snapshot : The given path '{cc71b260-7218-4cc1-8e2c-c53b1a2c49c8}' is not fully qualified.

I attempted to delete the snapshot within virtual box but as my vm is inaccessible I can't access that option.

I can delete the snapshot with the host file manager but I fear it will mess around with my vm and all the work on it.

Any help will be much appreciated.
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Virtual machine in inaccessible state after taking a snapshot failed

Post by scottgus1 »

This one could be a problem to solve.

First, take a complete verified backup of the whole VM folder and any other VM files outside that folder. This is in case the recovery step I am thinking does not work.

Then reboot the host so no Virtualbox processes are running.
Open the VM's folder.
Rename "vm-name.vbox" to "vm-name.vbox-bad"
Rename "vm-name.vbox-prev" to "vm-name.vbox"
Try the VM again.
honoju wrote:I can delete the snapshot with the host file manager but I fear it will mess around with my vm and all the work on it.
This is a solid fear. Don't delete snapshot files directly in the host file manager, it will break the VM.
honoju
Posts: 5
Joined: 5. Sep 2021, 16:30

Re: Virtual machine in inaccessible state after taking a snapshot failed

Post by honoju »

Thanks for the reply!

As my VM is 100 Gb big and don't have a storage medium that big, can I copy it as a ZIP file?

Regards,
honoju
Posts: 5
Joined: 5. Sep 2021, 16:30

Re: Virtual machine in inaccessible state after taking a snapshot failed

Post by honoju »

for more info, I attach the logs and the xml file

Before scottgus1's reply, I had tried to delete the snapshot using vboxmanage with this command :

Code: Select all

vboxmanage snapshot b2a19544-f1fd-4017-94d0-4ff9e37d0222 delete cc71b260-7218-4cc1-8e2c-c53b1a2c49c8
b2a19544-f1fd-4017-94d0-4ff9e37d0222 being the UUID of the vdi and cc71b260-7218-4cc1-8e2c-c53b1a2c49c8 being the UUID of the snapshot

And I am getting the error displayed in the attached picture.

I also tried with the VM name (debian10) instead of the UUID of the vdi but I got the same error. Yet I see the vdi and snapshot in the host file manager.
Attachments
VBoxmanage error.PNG
VBoxmanage error.PNG (12.71 KiB) Viewed 5519 times
VirtualBox.xml
(2.78 KiB) Downloaded 3 times
VBoxSVC.log
(14.67 KiB) Downloaded 2 times
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Virtual machine in inaccessible state after taking a snapshot failed

Post by scottgus1 »

honoju wrote:I had tried to delete the snapshot ...
b2a19544-f1fd-4017-94d0-4ff9e37d0222 being the UUID of the vdi and cc71b260-7218-4cc1-8e2c-c53b1a2c49c8 being the UUID of the snapshot
The command failed because the syntax of the command is:

VBoxManage snapshot <uuid|vmname> delete <snapshot-name>

not:

VBoxManage snapshot <uuid of disk file> delete <uuid of snapshot disk file>

The command syntax is a bit confusing with the 'uuid|vmname', but this refers to the UUID or name of the VM, not the disk file. And 'snapshot-name' refers to the name of the snapshot you gave when you made it, that displays in the list of snapshots in the Virtualbox Manager's Snapshots pane for the VM, not the UUID of the snapshot disk file.
honoju wrote:As my VM is 100 Gb big and don't have a storage medium that big, can I copy it as a ZIP file?
A zip file might help with the copy, sure. The disk file is just a file, so it should be zippable. However the zip can't be compare with the original file, so the backup cannot be confirmed as a good restorable backup.

If you're that short on free storage, it could be you're not taking backups of the host either? Computers do die, and data can be lost. Backups are important, and effort should be made to get some spare hard drives for backup media if possible.

The files you attached don't show the problem within this VM. You could try posting the VM's .vbox file. But getting the existing VM, if not the whole computer, backed up should be a priority. (As a recommendation, since you're using a Windows PC, Macrium Reflect Free is a solid good disk imaging backup software. - I'm not shilling for Macrium, btw, just a content user :D ) Once the VM at least is backed up, the rename of the .vbox file could be tried.

Or there is another option: Use Mpack's CloneVDI to make a flattened clone of the last good snapshot disk file, then make a new VM for the new disk file. Follow the CloneVDI instructions carefully.
honoju
Posts: 5
Joined: 5. Sep 2021, 16:30

Re: Virtual machine in inaccessible state after taking a snapshot failed

Post by honoju »

While I'm trying your suggestions, here are my .vbox and .vbox-bad zipped (vbox extension is not allowed for attachnments) files (after I made the change you first suggested). By the way, I succeeded finding a medium strorage to backup my vbox folder and in the future I'm going to do backups more often.
scottgus1 wrote:
The command failed because the syntax of the command is:

VBoxManage snapshot <uuid|vmname> delete <snapshot-name>

not:

VBoxManage snapshot <uuid of disk file> delete <uuid of snapshot disk file>

The command syntax is a bit confusing with the 'uuid|vmname', but this refers to the UUID or name of the VM, not the disk file. And 'snapshot-name' refers to the name of the snapshot you gave when you made it, that displays in the list of snapshots in the Virtualbox Manager's Snapshots pane for the VM, not the UUID of the snapshot disk file.
I tried again this command as you suggested (debian10 being my vm-name) :

Code: Select all

VBoxManage snapshot debian10 list --details
to get the list and names of snapshots but even the vm-name is not recognized!

I tried

Code: Select all

vboxmanage list -l vms
, the output is in the "list of vms" picture attached.

I then tried with vbox uuid

Code: Select all

VBoxManage snapshot bab722e5-874d-4c56-a5e4-7a98ea3d0d07 list --details
and the output is in the "vm details" picture. As I can not get the snapshot name, I think I can't delete the failed snapshot.
scottgus1 wrote:Or there is another option: Use Mpack's CloneVDI to make a flattened clone of the last good snapshot disk file, then make a new VM for the new disk file. Follow the CloneVDI instructions carefully.
The failed snapshot was the first one I did, I don't have other snapshot. Instead I have a .sav file which I assume is saved state of the vm. Is there a procedure that uses that file instead of a snapshot?

Thanks!
Attachments
zip files of vbox files.zip
(4.31 KiB) Downloaded 3 times
vm details.PNG
vm details.PNG (14.3 KiB) Viewed 5468 times
list of vms.PNG
list of vms.PNG (21.25 KiB) Viewed 5468 times
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Virtual machine in inaccessible state after taking a snapshot failed

Post by scottgus1 »

Thanks for the info! This being your only snapshot should make the fix a lot easier.

The .vbox files both show the child snapshot file under the base disk, with no snapshot hardware XML included. So I am guessing that removing the reference to the snapshot disk file in the .vbox file might get the VM going again.

Reboot the host so no Virtualbox processes are running.
Rename "Debian10.vbox" to "Debian10.vbox-snapshot"
Put the attached zipped "Debian10.vbox" in the "Debian10" folder.
Start Virtualbox, see what happens.

The .sav file is for saved states, yes. It is not a 'snapshot'-like disk file, though, and to the best of my knowledge CloneVDI cannot use it for cloning. The .vbox file did not refer to a saved state that I saw, so the .sav should be old; unless the VM was running when you tried to take the snapshot, at which the .sav would have become part of the snapshot had it succeeded.

One problem I can foresee is if the base disk has been set to expect a child snapshot disk. Please report any errors you get when trying the zipped .vbox file.
Attachments
debian10.vbox without snapshot.zip
(2 KiB) Downloaded 9 times
honoju
Posts: 5
Joined: 5. Sep 2021, 16:30

Re: Virtual machine in inaccessible state after taking a snapshot failed

Post by honoju »

Great news Scottgus! With your vbox file in debian10 folder I got the vm back.

I had no errors booting the VM. I can share logs if they can be of any interest.
The .vbox file did not refer to a saved state that I saw, so the .sav should be old; unless the VM was running when you tried to take the snapshot, at which the .sav would have become part of the snapshot had it succeeded.
You got it right, I launched the generation of the snapshot while the VM was functionning, that's the source of all this trouble. Happily, lesson is learned.I will search in the future for documentation before launching such an unusual procedure.
The .vbox files both show the child snapshot file under the base disk, with no snapshot hardware XML included. So I am guessing that removing the reference to the snapshot disk file in the .vbox file might get the VM going again.
How do you see that and how do you remove the refernce to the child snapshot? Within XML file? When I click on the vbox file, it boots the VM.

Nevertheless, thanks a lot for your help. It protected a lot of work from collapsing. In the future, I will do more backups.
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Virtual machine in inaccessible state after taking a snapshot failed

Post by scottgus1 »

I'm really glad you're up and running!
honoju wrote:I launched the generation of the snapshot while the VM was functionning, that's the source of all this trouble.
Actually, making a snapshot while the VM is running is perfectly OK. When you look at the tree of snapshots in the VM's Snapshots pane, each snapshot can have a red/orange Square for snapshots of a shut-down VM, or a green arrow for a running VM. The green-arrow snapshots will have a .sav file associated with it, and starting that snapshot will make the VM start already booted up as if it was save-stated.

We don't know what happened to your VM to cause the problem. It appeared to glitch during the snapshot process and only partially wrote the snapshot to the .vbox file. Why that happened is an unknown for now. It's happened before, I haven't learned the cause yet.

FWIW most forum gurus recommend not using snapshots and using other methods instead for staged VM states, like full backups, full clones, in-the-VM backup software with incremental backups, etc., but not snapshotting the VM. Even when snapshots work they make the VM more delicate. I wouldn't use snapshots on VMs I want to preserve.
honoju wrote:How do you see that and how do you remove the refernce to the child snapshot? Within XML file?
I'll write this one up for you tomorrow. BTW you might find it interesting to get a simple small VM, like a MS-DOS VM, for snapshot experimentation. See your PM's.
Post Reply