
23 Aug
2012
23 Aug
'12
8:07 a.m.
[please drop spurious in-reply-to headers when starting a new thread. Also, your mailer needs to learn to wrap long lines] On 08/22/2012 09:57 PM, 张章 wrote:
hi,all Does any of you know how to get the vnc port of a running vm through libvirt API instead of virsh vncdisplay ? I can't find any relevent API from libvirt, many thanks!
Looking at the source code of virsh, 'vncdisplay' boils down to a call to virDomainGetXMLDesc followed by scraping the XML for the XPath /domain/devices/graphics[@type='vnc']/@port -- Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org