Page 1 of 1

copy of vdi with same uuid

Posted: 28. Jan 2011, 16:07
by loitador
Hello, I have a vdi with a system already stored in it and an application that can only be installed once in only one computer.
I need to make that vdi fixed-size and bigger.
I need to keep the uuid of the vdi in order not to get my application lost.

My idea is to:
-create a vdi with my specifications
-assign to this new vdi the uuid of the old vdi
-change the old vdi uuid
-mount both in a virtual machine
-inside the virtual machine, clone the content of the original vdi into the new original vdi with a clone cd.
-delete the original vdi and work with the new.

¿Is this possible? ¿how can i assign one vdi another's uuid?

Thank you

Re: copy of vdi with same uuid

Posted: 29. Jan 2011, 08:44
by loitador
I have been investigating and have found the solution.

In case it's useful for someone:

First I created my new vdi (disk_b.vdi) with my specifications,
then I mounted a virtual machine with both vdis attached to it,
I cloned one partition to the other,
unlinked both vdi's from the virtual machine,
and then get the disk_a uuid and put it in the disk_b uuid.

The last step was what i wanted when i asked, and i did it this way:

in a dos console:

VboxManage showhdinfo disk_a.vdi
(here i find original's disk uuid)
VboxManage internalcommands sethduuid disk_b.vdi uuid
(assign uuid in format xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)
VboxManage showhdinfo disk_a.vdi

Re: copy of vdi with same uuid

Posted: 30. Jan 2011, 09:18
by loitador
It didn't worked.
When I clone the two disks with a clone boot cd inside the guest operating system (windows xp in this case) the result is two harddisk with different uuids, and changing the vdi uuid seems not to change the uuid of the disk insife the guest machine.
This is a bit extrange, isn't it? Why all this uuid stuff with vdis if it seems not to have any relationship with the internal uuid of the mounted system?

Re: copy of vdi with same uuid

Posted: 30. Jan 2011, 11:24
by FrodoHobbits
Search this forum for CloneVDI, this is an excellent little program created by mpack.
Should be what you are looking for.

Re: copy of vdi with same uuid

Posted: 30. Jan 2011, 15:11
by loitador
Thank you for the answer, but it doesn't serve as it can't make a fixed size copy of my dynamic sized vdi. I had already tried :D

Re: copy of vdi with same uuid

Posted: 30. Jan 2011, 15:51
by mpack
One thing CloneVDI can do for you is provide simple verification (using "Show Header" feature) that the UUID in your VDI changed as you expected it to. Did it? If yes then your current problem must be something else.

Re: copy of vdi with same uuid

Posted: 4. Feb 2011, 00:42
by loitador
It's the uuid of an vdi, when i see it outside the machine, the same uuid that could be seen inside the guest operating system?
Cause then i can't find the problem.

Re: copy of vdi with same uuid

Posted: 4. Feb 2011, 12:37
by mpack
I'm not very sure what you are asking, so I'll just try to be as clear as possible. Yes, a VDI has a UUID (several in fact, but only one that guests might care about), and yes, the UUID reported by CloneVDI is the same UUID that the guest will see (the same cannot be said for UUIDs seen in xml files - so I ask once more, did you check the UUID using CloneVDI?). It is worth noting that the boot disk UUID is not the only hardware signature visible to guests. E.g. there is also the network MAC address and the VM UUID. If you move between hosts then a CPU change may also be visible.