Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can I change the UUID of a VHD-file?

My problem is that VirtualBox won't accept the VHD-file if it has already been added. But I am moving VHD disks between work/home and cloning them (and keeping them as VHD, not VDI) "at random".

The export/import feature won't work for me because 1) it changes the file to VDI and 2) it takes too damn long, can't wait for it to export+import a 60GB disk every morning/afternoon when I switch locations.

It is important to keep it as VHD so its compatible with HyperV.

share|improve this question
up vote 7 down vote accepted
VBoxManage internalcommands sethduuid "filename" "newUUID"

Type VBoxManage internalcommands to see the other less documented features available.

share|improve this answer
One doesn't need the "newUUID" paramenter. A new one will be generated automatically. Usage: VBoxManage internalcommands <command> [command arguments] and sethduuid <filepath> [<uuid>] – TJ. Jan 31 '13 at 9:55

You can do two things:

1) The storage manager keeps track of where the files are, but not necessarily the files themselves. If you just replace the file on disk (rather than import/export) things should "just work"™ - if you are taking the virtual disks between computers, just copy them over the top of the existing files.

2) If you absolutely need to change the UUID for whatever reason you can run the following command to clone the VHD, which will give it a new UUID:

VBoxManage clonehd source.vhd destination.vhd

You should be able to import the cloned drive and assign it to a machine as you normally would. Here is the relevant info for the clonehd command:

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.