Wednesday, January 26, 2011

VirtualBox: Get Guest UUID from within the Guest computer

Is there any way to get a Guest VM's UUID from within the Guest VM itself? From the Host I can do vboxmanage list vms to get a list of all vm names and their user ids. From the Guest, even with VirtualBox Additions, I can't see a way to do it. The closest I've come was vboxcontrol guestproperty enumerate, but it doesn't seem to have UUID as a guest property.

  • Best I could come up with:

    • On the host, make a script that uses vboxmanage to list all the vms, and set a custom property (like /Custom/UUID) to the UUID. Run this manually whenever a new VM is created.
    • On the guest, just read that property /Custom/UUID. If it's not there, explode.
    From Claudiu

0 comments:

Post a Comment