Deleted a snapshot file, VM doesn't start

Discussions about using Linux guests in VirtualBox.
Post Reply
Linuxnewbies11
Posts: 2
Joined: 9. Jun 2021, 18:48

Deleted a snapshot file, VM doesn't start

Post by Linuxnewbies11 »

(mod edit - Original title "Please help!!")

Hi, everyone i lastly have a problem of low memory on debian because of overload log files that i was not aware of because i am new with linux. So, i delete an old snapshot file that was not needed anymore for me to free space and debug the system. But now, because of this my vm not start anymore and said this message: Could not open the medium '/home/user/VirtualBox VMs/kali/Snapshots/{03d60b2e-24c5-4b63-8568-855aeea15586}.vdi'.
VD: error VERR_FILE_NOT_FOUND opening image file '/home/user/VirtualBox VMs/kali/Snapshots/{03d60b2e-24c5-4b63-8568-855aeea15586}.vdi' (VERR_FILE_NOT_FOUND).

I need to know if it is possible that i fix or restore my vm or i lose everything because of the old snapshot file was more important for the current state that i was thought? thank you.
Last edited by scottgus1 on 9. Jun 2021, 19:07, edited 2 times in total.
Reason: changed title to reflect problem
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Please help!!

Post by scottgus1 »

Linuxnewbies11 wrote:i delete an old snapshot file
This killed the VM. You'll have to find it in your backups and put it back to get back to where you were.

Snapshots cannot just be deleted by clicking the snapshot disk file in the host OS's Explorer/Finder/File Manager and "deleting" it. You have to use the Virtualbox command to Delete the snapshot, then you get space back and the VM remains usable (provided the host PC doesn't glitch while the Virtualbox Delete is taking place. Fundamental rule of PC usage: backup before doing anything possibly dangerous to something you really need to keep.)

Snapshots are not backups.

Mpack's CloneVDI contains a way to make a clone of the still-intact portion of the snapshot disk chain between the base disk up to the file you deleted for use as a new VM. Snapshots after the deleted disk file are orphaned and unusable. If you cannot find your missing snapshot file in your backups, you'll have to see if CloneVDI can get something to work. Instructions are provided.
Linuxnewbies11
Posts: 2
Joined: 9. Jun 2021, 18:48

Re: Please help!!

Post by Linuxnewbies11 »

Find in which backup you mean? i don't have backup of this snap file. So, i cannot restore anything from the actual files without the deleted snap file? That is weird because no vm have natively a snapshot unless we create it.
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Deleted a snapshot file, VM doesn't start

Post by scottgus1 »

Linuxnewbies11 wrote:which backup
Yours. The ones you keep of your host's disks, because the data is important.
Linuxnewbies11 wrote:i cannot restore anything from the actual files without the deleted snap file?
Correct, unless you can get the missing file from your backups or can recover something with CloneVDI, see the above.
Linuxnewbies11 wrote:no vm have natively a snapshot unless we create it.
Correct. And we must know what we create and what it's used for before we create/rely on/delete it.

Snapshot disk files are a chain of disk sectors that the VM OS changed since the last snapshot or base disk, which may or may not include the entire file that was stored in it. See "Snapshot Basics" viewtopic.php?f=35&t=84332
Post Reply