copy of vdi with same uuid

This is for discussing general topics about how to use VirtualBox.
Post Reply
loitador
Posts: 7
Joined: 28. Jan 2011, 15:34
Primary OS: MS Windows XP
VBox Version: OSE other
Guest OSses: windows xp

copy of vdi with same uuid

Post 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
loitador
Posts: 7
Joined: 28. Jan 2011, 15:34
Primary OS: MS Windows XP
VBox Version: OSE other
Guest OSses: windows xp

Re: copy of vdi with same uuid

Post 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
loitador
Posts: 7
Joined: 28. Jan 2011, 15:34
Primary OS: MS Windows XP
VBox Version: OSE other
Guest OSses: windows xp

Re: copy of vdi with same uuid

Post 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?
FrodoHobbits
Posts: 237
Joined: 18. Apr 2009, 08:20
Primary OS: MS Windows 7
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows, QNX & Linux
Location: Radstock, UK

Re: copy of vdi with same uuid

Post by FrodoHobbits »

Search this forum for CloneVDI, this is an excellent little program created by mpack.
Should be what you are looking for.
loitador
Posts: 7
Joined: 28. Jan 2011, 15:34
Primary OS: MS Windows XP
VBox Version: OSE other
Guest OSses: windows xp

Re: copy of vdi with same uuid

Post 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
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: copy of vdi with same uuid

Post 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.
loitador
Posts: 7
Joined: 28. Jan 2011, 15:34
Primary OS: MS Windows XP
VBox Version: OSE other
Guest OSses: windows xp

Re: copy of vdi with same uuid

Post 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.
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: copy of vdi with same uuid

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