Page 1 of 1

Error when cloning a VM

Posted: 6. Jan 2013, 18:02
by JBentley
Host: Windows 7 Ultimate 64-bit
Guest: Windows 7 Ultimate 64-bit
VirtualBox version: 4.2.6 r82870

When I try to clone a virtual machine, I get the following error:

Code: Select all

Failed to clone the virtual machine Lithium - Desktop (Windows 7 Ultimate 64-bit).
Could not open the medium 'E:\virtual machines\Lithium - Desktop (Windows 7 Ultimate 64-bit)\Test Platform Windows 7 Ultimate 64-bit.vdi'.
VD: error VERR_FILE_NOT_FOUND opening image file 'E:\virtual machines\Lithium - Desktop (Windows 7 Ultimate 64-bit)\Test Platform Windows 7 Ultimate 64-bit.vdi' (VERR_FILE_NOT_FOUND).
Result Code: E_FAIL (0x80004005)
Component: Medium
Interface: IMedium {29989373-b111-4654-8493-2e1176cba890}
Note, that the .vdi location in the error message is incorrect - although I used to have that .vdi file, I have since renamed it to "drive 01.vdi" (and given it a new UUID to fix a separate error when I tried to rename it). My interpretation of the error message is that it is trying to look for image under it's original name (although that makes no sense, as I get the error AFTER it's already done copying it). How do I "force" it to look for the new file name? This error is particularly annoying as it occurs at the end of the process, which is around 45 minutes on my machine.

Re: Error when cloning a VM

Posted: 6. Jan 2013, 18:05
by Perryg
Did you leave the old VDI file in the same folder?

Re: Error when cloning a VM

Posted: 6. Jan 2013, 18:08
by JBentley
It's the same VDI, just renamed. It is in the same folder, although the folder itself has been renamed as well (by VirtualBox) when I renamed the virtual machine. However the error message contains the correct folder path, just the wrong VDI file name.

Re: Error when cloning a VM

Posted: 6. Jan 2013, 18:15
by mpack
It doesn't matter what folder it's in, you can't rename files that VirtualBox is using, otherwise the result is the kind of error message you see there. You have to release and remove the file from File | Virtual Media Registry, then you can rename the file, then you can use the Storage section of the VM settings to add the renamed file back. I suggest you rename the file back then follow the procedure.

Due to a current VirtualBox bug, you need to shut down VirtualBox after removing media from the registry, and leave it 30 seconds or so to ensure that it forgets having seen that media UUID before.