Page 1 of 1

sethduuid claims that uuid has changed, but in reality not

Posted: 26. Jun 2014, 14:12
by franz1234
I try to change uuid, sethduuid says yes, changed, but in reality and proven by dumphdinfo the uuid has not changed.

Host OS: Windows 7
Virtualbox: 4.3.12

c:\Program Files\Oracle\VirtualBox>vboxmanage.exe internalcommands dumphdinfo "E:\BAO-disk1.vmdk"
--- Dumping VD Disk, Images=1
Dumping VD image "E:\BAO-disk1.vmdk" (Backend=VMDK)
Header: Geometry PCHS=16383/16/63 LCHS=1024/255/63 cbSector=314572800
Header: uuidCreation={2c5ca471-5bdf-4250-b085-b9a2cbc0f250}Header: uuidModification={60e14268-5b9b-481c-8bd2-e343daf7cec7}
Header: uuidParent={00000000-0000-0000-0000-000000000000}
Header: uuidParentModification={00000000-0000-0000-0000-000000000000}

c:\Program Files\Oracle\VirtualBox>vboxmanage.exe internalcommands sethduuid "E:\BAO-disk1.vmdk"
UUID changed to: d397030d-ae38-4377-8f63-ed784ad4080f

c:\Program Files\Oracle\VirtualBox>vboxmanage.exe internalcommands dumphdinfo "E:\BAO-disk1.vmdk"
--- Dumping VD Disk, Images=1
Dumping VD image "E:\BAO-disk1.vmdk" (Backend=VMDK)
Header: Geometry PCHS=16383/16/63 LCHS=1024/255/63 cbSector=314572800
Header: uuidCreation={2c5ca471-5bdf-4250-b085-b9a2cbc0f250}
Header: uuidModification={60e14268-5b9b-481c-8bd2-e343daf7cec7}
Header: uuidParent={00000000-0000-0000-0000-000000000000}
Header: uuidParentModification={00000000-0000-0000-0000-000000000000}

c:\Program Files\Oracle\VirtualBox>

Re: sethduuid claims that uuid has changed, but in reality n

Posted: 26. Jun 2014, 16:02
by mpack
Moved to "Using VirtualBox" since your question has nothing to do with "Windows Hosts".

As to your issue: VirtualBox 4.3.12 works fine for me. The picture below shows what CloneVDI says about a VMDK header before and after running the "VBoxManage internalcommands sethduuid" command on it. The image is a composite: above and below the red line are two different results for the same file. Notice that the UUID changed.

Possible explanations I can think of are :-
  1. The dumphdinfo you have reads from a cache, not from the file. Since a documented command (showhdinfo) exists for this function I'm surprised you elected to use an undocumented one.
  2. You have the vmdk located on a media that is write protected, or which your user doesn't have permission to write to.
Image1.png
Image1.png (12.84 KiB) Viewed 3026 times

Re: sethduuid claims that uuid has changed, but in reality n

Posted: 27. Jun 2014, 11:30
by franz1234
I tried again with showhdinfo, same result:

c:\Program Files\Oracle\VirtualBox>vboxmanage.exe showhdinfo "C:\Watson\BAO-disk2 - Copy.vmdk"
VBoxManage.exe: error: Cannot register the hard disk 'C:\Watson\BAO-disk2 - Copy.vmdk' {d14fba3c-72f9-452d-861d-71fec5c1f5ea} because a
hard disk 'C:\Watson\BAO-disk2.vmdk' with UUID {d14fba3c-72f9-452d-861d-71fec5c1f5ea} already exists
VBoxManage.exe: error: Details: code E_INVALIDARG (0x80070057), component VirtualBox, interface IVirtualBox, callee IUnknown
VBoxManage.exe: error: Context: "OpenMedium(Bstr(pszFilenameOrUuid).raw(), enmDevType, enmAccessMode, fForceNewUuidOnOpen, pMedium.asOu
tParam())" at line 178 of file VBoxManageDisk.cpp

c:\Program Files\Oracle\VirtualBox>vboxmanage.exe internalcommands sethduuid "C:\Watson\BAO-disk2 - Copy.vmdk"
UUID changed to: 4b8ba57c-771d-4bca-8bc7-bbbef0e2e6ce

c:\Program Files\Oracle\VirtualBox>vboxmanage.exe showhdinfo "C:\Watson\BAO-disk2 - Copy.vmdk"
VBoxManage.exe: error: Cannot register the hard disk 'C:\Watson\BAO-disk2 - Copy.vmdk' {d14fba3c-72f9-452d-861d-71fec5c1f5ea} because a
hard disk 'C:\Watson\BAO-disk2.vmdk' with UUID {d14fba3c-72f9-452d-861d-71fec5c1f5ea} already exists
VBoxManage.exe: error: Details: code E_INVALIDARG (0x80070057), component VirtualBox, interface IVirtualBox, callee IUnknown
VBoxManage.exe: error: Context: "OpenMedium(Bstr(pszFilenameOrUuid).raw(), enmDevType, enmAccessMode, fForceNewUuidOnOpen, pMedium.asOu
tParam())" at line 178 of file VBoxManageDisk.cpp

c:\Program Files\Oracle\VirtualBox>

Regarding your second guess: the vmdk is not write protected, it is in the same directory on a local disk as the others.


When I clone the virtual machine everything works fine, the cloned files have another uuid.
So the clone-process can change the uuid, sethduuid can obviously not.

Do you have another idea ?

Re: sethduuid claims that uuid has changed, but in reality n

Posted: 27. Jun 2014, 11:35
by mpack
No, I have no further suggestions, except... I would suggest raising a BugTracker ticket, though given that I've already failed to reproduce the problem I don't know how much traction you'll get.

What type of VMDK is it? I.e. the integrated binary type, or the type with a small ascii descriptor file separate from the image?