How do I change the UUID of a virtual disk?

CJAY picture CJAY · Jul 23, 2013 · Viewed 224k times · Source

I am trying to create a new virtual machine with Oracle VirtualBox, using an already-existing hard disk. When I try to select the existing hard disk file, a .vhd file, it displays an error saying the virtual hard disk cannot be used because the UUID already exists.

So I tried the following command to change its UUID.

VBoxManage internalcommands sethduuid /home/user/VirtualBox VMs/drupal/drupal.vhd

I get this error.

Syntax error: Invalid UUID parameter

How can I resolve this?

Answer

CJAY picture CJAY · Jul 23, 2013

The correct command is the following one.

VBoxManage internalcommands sethduuid "/home/user/VirtualBox VMs/drupal/drupal.vhd"

The path for the virtual disk contains a space, so it must be enclosed in double quotes to avoid it is parsed as two parameters.