Page 1 of 1

Problem after failing to delete snapshot

Posted: 1. Jun 2020, 21:44
by Yaz
I tried to delete and old snapshot of my VM, but failed to do so, but when I restarted my VM if throws this error:

Could not open the medium 'E:\ptveccss0024\Snapshots/{ac020226-f7e9-488f-b7ed-e5a9d1eb3469}.vdi'.
VD: error VERR_FILE_NOT_FOUND opening image file 'E:\ptveccss0024\Snapshots/{ac020226-f7e9-488f-b7ed-e5a9d1eb3469}.vdi' (VERR_FILE_NOT_FOUND)

I look into the directory there is no file with that UUID.

When In open the Virtual Media Manager it shows the missing image as parent but no way to fix it.

Is there a way to fix this problem, I've reading several other posts and can't find a similar problem.

Re: Problem after failing to delete snapshot

Posted: 1. Jun 2020, 23:33
by scottgus1
Yaz wrote:I tried to delete and old snapshot of my VM, but failed to do so,
How did it fail?

Also, let's take a look at what is in the VM's 'recipe'. 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.

Further, please post the text output of this command, run in the cmd prompt:
dir /s E:\ptveccss0024

Re: Problem after failing to delete snapshot

Posted: 2. Jun 2020, 01:03
by Yaz
Should I upload the logs too?

Re: Problem after failing to delete snapshot

Posted: 2. Jun 2020, 17:15
by Yaz
How did it fail?
When I tried to delete an older snapshot, (the oldest btw),it took like an hour deleting it, and it failed near the end, when I tried to restart the VM it show the error I posted.

Re: Problem after failing to delete snapshot

Posted: 3. Jun 2020, 01:03
by scottgus1
Ok, so it appears that the .vbox file is looking for a snapshot file that no longer exists. Here's what the .vbox expects:
<HardDisk uuid="{4cc81f3b-a8be-4e95-b39a-af79be11c2f5}" location="ptveccss0024.vdi" format="VDI" type="Normal">
<HardDisk uuid="{ac020226-f7e9-488f-b7ed-e5a9d1eb3469}" location="Snapshots/{ac020226-f7e9-488f-b7ed-e5a9d1eb3469}.vdi" format="VDI">
<HardDisk uuid="{20d1dc42-02cc-494a-8325-ab3ed746373f}" location="Snapshots/{20d1dc42-02cc-494a-8325-ab3ed746373f}.vdi" format="VDI">
<HardDisk uuid="{0f0e332e-594f-4c66-9480-78a6b2401f92}" location="Snapshots/{0f0e332e-594f-4c66-9480-78a6b2401f92}.vdi" format="VDI">
<HardDisk uuid="{4345aba4-b0bf-4217-bfb6-935633317b54}" location="Snapshots/{4345aba4-b0bf-4217-bfb6-935633317b54}.vdi" format="VDI">
<HardDisk uuid="{c7ed0be3-c024-43c2-bf17-65b55c5349ce}" location="Snapshots/{c7ed0be3-c024-43c2-bf17-65b55c5349ce}.vdi" format="VDI">
<HardDisk uuid="{1b277683-71cb-4dbb-ab40-b04debc20e0d}" location="Snapshots/{1b277683-71cb-4dbb-ab40-b04debc20e0d}.vdi" format="VDI">
<HardDisk uuid="{e2c133fe-8013-416a-b0ab-8862a3eb8ff0}" location="Snapshots/{e2c133fe-8013-416a-b0ab-8862a3eb8ff0}.vdi" format="VDI"/>
Here's what is on your host PC's disk:
Directory of E:\ptveccss0024:
29/05/2020 11:49 p.m. 322.125.692.928 ptveccss0024.vdi

Directory of E:\ptveccss0024\Snapshots:
03/05/2020 11:33 a.m. 11.696.865.280 {0f0e332e-594f-4c66-9480-78a6b2401f92}.vdi
29/05/2020 11:04 p.m. 6.728.712.192 {1b277683-71cb-4dbb-ab40-b04debc20e0d}.vdi
29/05/2020 11:49 p.m. 39.633.027.072 {20d1dc42-02cc-494a-8325-ab3ed746373f}.vdi
09/05/2020 01:12 p.m. 3.025.141.760 {4345aba4-b0bf-4217-bfb6-935633317b54}.vdi
22/05/2020 11:07 a.m. 8.050.966.528 {c7ed0be3-c024-43c2-bf17-65b55c5349ce}.vdi
29/05/2020 11:14 p.m. 82.837.504 {e2c133fe-8013-416a-b0ab-8862a3eb8ff0}.vdi
The missing file is bolded red, and appears to be the first snapshot disk file you tried to delete.

One thing we may have going for us, if I interpret your PC's date scheme as day/month/year: The base disk "ptveccss0024.vdi" is locked and unchanged when you make a snapshot. But each disk in the snapshot chain has the UUID of the previous and next disks in the chain, so the base and third disks get edited when you delete the next snapshot after the base disk (I think). The base disk "ptveccss0024.vdi" and the .vbox file's third snapshot disk starting '{20d1dc42' both appear to be the last-modified files at May 29, 2020, 11:49PM.

My guess, if I have read this right, is that the missing snapshot disk's data may have been merged into your base disk, but the .vbox file was not updated, or the crash prevented the update.

I am not strong enough in editing XML to fix the .vbox file. My suggestion is to move "ptveccss0024.vdi" into "E:\ptveccss0024\Snapshots" then follow the instructions in Mpack's CloneVDI to try to clone the last snapshot file "{e2c133fe-8013-416a-b0ab-8862a3eb8ff0}.vdi". If the base and next disk files are not corrupted by the crash, CloneVDI will make a new single disk file that is a collapsed copy of the snapshot chain. Make a new guest as close in settings to the old guest, then use the clone disk and see what you get.