Error when cloning a VM

This is for discussing general topics about how to use VirtualBox.
Post Reply
JBentley
Posts: 2
Joined: 6. Jan 2013, 17:58

Error when cloning a VM

Post 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.
Last edited by JBentley on 6. Jan 2013, 18:07, edited 1 time in total.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Error when cloning a VM

Post by Perryg »

Did you leave the old VDI file in the same folder?
JBentley
Posts: 2
Joined: 6. Jan 2013, 17:58

Re: Error when cloning a VM

Post 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.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: Error when cloning a VM

Post 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.
Post Reply