On Thu, Aug 13, 2015 at 07:30:22PM +0000, Jean-Pierre Ribeauville wrote:
Are there some kind of UUIDs for Host and Guest ?
If yes , how may I retrieve them programmatically ?
My goal is to trace GUEST migrations.
Guests have a UUID, it's part of the XML description, e.g.,
$ virsh dumpxml myguest | head -3
<domain type='kvm' id='10'>
<name>myguest</name>
<uuid>b392ddf3-ed7a-4a4d-ba22-159d87bd601d</uuid>
You can get this using the virDomainGetUUID() api call.
Hosts have a UUID that is visible via the 'capabilities' information:
$ virsh capabilities | head -4
<capabilities>
<host>
<uuid>65bf8701-5216-11cb-baa9-9ee038331cdf</uuid>
This information is available via the virConnectGetCapabilities() api call.
--
Lars Kellogg-Stedman <lars(a)redhat.com> | larsks @ {freenode,twitter,github}
Cloud Engineering / OpenStack |
http://blog.oddbit.com/