[libvirt] get domU hostname

Daniel Veillard veillard at redhat.com
Thu Mar 19 10:57:37 UTC 2009

On Wed, Mar 18, 2009 at 12:06:57PM -0400, jim_marshall at msn.com wrote:
> Hello,
>  Sorry if this has been asked before, I did some searches and came up empty. I am writing a tool to get data on Xen using libvirt everything is going great, however; I have a need to get the hostname of domU from the program running in dom0. Is this possible using libvirt?

  No. At best you may find the IP address of the primary interface
and try to find out the name from there, but the hostname is basically
an OS setting and libvirt has no way to communicate with the OS.


Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
daniel at veillard.com  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/

More information about the libvir-list mailing list