title: How to get unique ID of a Citrix XenServer VM from the guest OS?
body: <p>Let's say I have multiple Citrix XenServer VMs with the same name.  Or, the names are garbage, doesn't matter.</p>
  
  <p>From the guest OS on one of those VMs, how can I programatically determine the ID of the VM?  I was hoping the UUID of the VM would should as the guest OS's BIOS serial number, but it doesn't.  Have looked everywhere, registry, WMI, you name it.</p>
  
  <p>Now, the reason I won't just use the hostname, is that I might have multiple machines with same hostname (e.g. a full lab with copies of VMs).</p>
  
  <p>Using XenServer 5.x and 6.x.</p>
  
  <p>Cheers.</p>