How to decode or convert UUID of VM under OVM

Oracle PVM assigns UUID code to VMS running under its control. When you log in to DOM 0 and issue xm list command, it will display UUID instead of the real hostname. If less number of hosts then we can go to the mount location and check VM.cfg but for a large pool, some kind of automation is required. The following solution will retrieve the VM simple name based on the UUID of the VM.

Here is the way to show the real VM name from UUID without OVM GUI login. It won’t decode or convert anything from UUID but, it will simply loop to all VMs VM.cfg and grep for a simple name.

During patching time, you can retrieve all dom u names hosted on that dom0 in one shot. Here is the UUID decoder for OVM.


for i in `xm list |awk '{print $1}' |grep -v "Domain-0\|Name"`; do egrep OVM_simple_name `df -h |grep OVS |awk '{print $5}'`/VirtualMachines/*/*.cfg |grep $i |awk -F"'" '{print $2}'; done

Published
Categorized as Linux, SRE

Leave a comment

Your email address will not be published. Required fields are marked *