2

The problem

I accidentally deleted the snapshot file located at <virtualbox-folder>/vms/<vm-name>/Snapshots. When I try to start the VM (which the .vdi file is intact), the following error appears:

C:\Users\Administrator>"C:\Program Files\Oracle\VirtualBox\VBoxHeadless.exe" -st
artvm vmname
Oracle VM VirtualBox Headless Interface 4.3.24
(C) 2008-2015 Oracle Corporation
All rights reserved.

Error: failed to start machine. Error message: Could not open the medium 'C:\Pro
gram Files\Oracle\VirtualBox\vms\vmname\Snapshots/{5605a6c5-c4c2-45ef-b70e-62ccb
b104991}.vdi'.
VD: error VERR_PATH_NOT_FOUND opening image file 'C:\Program Files\Oracle\Virtua
lBox\vms\vmname\Snapshots/{5605a6c5-c4c2-45ef-b70e-62ccbb104991}.vdi' (VERR_PATH
_NOT_FOUND)

Can I recover from this error?


What I've tried

Deleting the snapshot info in the .vbox file

The .vbox file, which is a xml, has metadata about the VM. I've removed the snapshot in this xml, but the error somehow persists.

Clone with no snapshots

When I try to clone via UI right click > Clone... > Full clone > Current state the same error appears.

Creating a new VM using the same .vdi

This attempt didn't show any erros, but the VM just didn't load. Right after the grub screen, a black screen appeared (the VM seemed frozen).


Additional info

  • Host OS: Windows Server 2012 R2 Datacenter
  • Guest OS: Ubuntu Server 12.04 LTS (32 bit)
  • Virtualbox version 4.3.24 r98716
1
  • The simpler way is the third you've tried, but the success of it depends on what you had before you took the snapshot, as you have lost everything since then. Commented Jul 10, 2015 at 12:52

3 Answers 3

2

Not sure how to rescue the old broken vm, maintaining snapshots, but here's a possible workaround. Make a new VM without a disk. Then use vboxmanage to clone the disk (it should automatically find all the snapshots and other things it needs... if not, try qemu-img convert) which will make a single non-snapshotted copy of it (I think...). And then you can add this new disk to your new VM and start the new vm. If this doesn't work (when you boot, it will look like an old version of the system for example), try cloning the snapshot disks instead of the main one.

1

Virtual box now allows you to fix this through the GUI. Click on the drop down arrow by Global Tools, Select Virtual Media Manager. Scroll to the .vdi harddisk of your OS and click the arrow to the left of it, another .vdi (now indented) Should now appear (if it was not already appearing), with a yellow warning sign, Click the new .vdi (it should have a string of numbers as the name) then click remove, Ignore the warning. Then it should boot as normal.

0

2021 Update: Making a new VM from the existing .vdi lets me boot the vdi with no editing of xml files or anything. (Host OS is OSX, VM Win 10 - hopefully doesn't matter)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .