Page 1 of 1

use an exiting Virtual Hard Disk

Posted: 26. Sep 2008, 10:46
by jeremili
Hello,

My english is poor, i'm french, but i will try to explain my problem as better as possible.

I whish to use a existing Virtual Hard Disk (i have make a copy) for create a new virtual machine without reinstall all the Operating System.

When i select Hard Disk i have an error:

A hard disk with UUID {9a1d447c-8a5c-47a2-8f38-6f1d6a5546d9} or with the same properties ('D:\Disques Machines Virtuelles\Debian4_bind.vdi') is already registered.


Code de résultat :
E_INVALIDARG (0x80070057)
Composant :
VirtualBox
Interface :
IVirtualBox {2d3b9ea7-25f5-4f07-a8e1-7dd7e0dcf667}
Is existing a solution??

you understand me???


Thanks

JEREMY

Posted: 26. Sep 2008, 12:29
by dmfhhp
Hi,
you can use the command line:
vboxmanage clonevdi oldname.vdi newname.vdi

If it is on a real physical disk, you could use any linux system (knoppix, Ubuntu, ...) to make a 1:1 copy.
Look for the commands dd or ddrescue (I just used the latter with Ubuntu).

The .vdi contain a GUID, so a normal copy will probably lead to trouble (therefore the clone command).
I don't know about physical disks with VB though.

Posted: 26. Sep 2008, 15:19
by TerryE
A VDI can only belong to one VM at a time, unless it is an immutable drive (which is a fairly advanced use). As dmfhhp says you need to copy the VDI if you need to use it in more than one VM and then you need to ensure that they have different UUIDs.

Posted: 26. Sep 2008, 23:11
by Sasquatch
There is an undocumented command that lets you change the UUID of the VDI file. VBoxManage clonevdi does the same while it copies the existing VDI to a new file.