Skip to content

Instantly share code, notes, and snippets.

@themoses
Created July 5, 2021 12:32
Show Gist options
  • Save themoses/68360831505d7d150fe4c62b2cdf5e7f to your computer and use it in GitHub Desktop.
Save themoses/68360831505d7d150fe4c62b2cdf5e7f to your computer and use it in GitHub Desktop.
Set VirtualBox UUID for VM

Modify the UUID for a VM in VirtualBox (not the HD UUID)

Sometimes you might have to modify the UUID because you want to test something on a cloned VM but you need the original one- for example because a backend authenticates over your UUID.

Files to manipulate

  • virtualBoxFolder/VirtualBox.xml
  • vmFolder/vmname.vbox

First of all, close VirtualBox and shut down the machine or your changes will get overwritten.

Find the machine name within the <MachineRegistry> entry in the VirtualBox.xml file and modify your uuid there:

    <MachineRegistry>
    ...
      <MachineEntry uuid="{MODIFY-THIS-UUID}" src="C:\VirtualBoxFolder\Virtualbox\Machines\test\test.vbox"/>
    </MachineRegistry>

Then modify the UUID within the machine configuration file vmname.vbox itself in the <Machine> field.

<VirtualBox xmlns="http://www.virtualbox.org/" version="1.16-windows">
  <Machine uuid="{MODIFY-THIS-UUID}" name="test" OSType="Linux_64" snapshotFolder="Snapshots" lastStateChange="2021-07-05T09:00:09Z">
    <MediaRegistry>
      <HardDisks>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment