Re: vnc port of VM

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



[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@xxxxxxxxxx    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
libvirt-users mailing list
libvirt-users@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvirt-users

[Index of Archives]     [Virt Tools]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]

  Powered by Linux