42

How can I check the uuid of a vdi or vmdk?

There should be some command line on VBoxManage to show it.

I know I read it some place in the docs, but now for some reason I can't find it...

Wai Ha Lee
  • 8,598
  • 83
  • 57
  • 92
Radagast the Brown
  • 3,156
  • 3
  • 27
  • 40

3 Answers3

41

VBoxManage list vms will list the virtual machines and their uuids without having to know the path to the particular vdi.

David T
  • 765
  • 6
  • 18
41

Run VBoxManage and pass it showhdinfo and your VDI:

VBoxManage.exe showhdinfo "c:\MyMachine.vdi"
Chris Haas
  • 53,986
  • 12
  • 141
  • 274
  • 1
    For the record, I learned today this will also register the VDI if it wasn't already registered. This was great as I had just rebuilt my host machine after a crash and had to setup virtualbox all over again. I couldn't figure out how to register them, so I used this command to get the UUID so I could find the right VDI that I was missing and as a by product it registered it for me! – RDT2 Jun 15 '14 at 18:25
  • shows "cannot get format..." probably corrupted. any clue about how can this be recovered? – parasrish Apr 10 '18 at 05:16
1

You can open C:\Users\username\.VirtualBox\VirtualBox.xml for .vbox files:

<VirtualBox>
  <Global>
    <MachineRegistry>
      <MachineEntry uuid="{11111111-1111-1111-1111-111111111111}" src="C:/mybox.vbox"/>
    </MachineRegistry>
  </Global>
</VirtualBox>
Lemmings19
  • 1,383
  • 3
  • 21
  • 34