[prev in list] [next in list] [prev in thread] [next in thread] 

List:       libvirt-users
Subject:    Re: [libvirt-users] How to find domain os type and ip address
From:       Eric Blake <eblake () redhat ! com>
Date:       2014-01-29 5:29:04
Message-ID: 52E891A0.40603 () redhat ! com
[Download RAW message or body]


On 01/28/2014 09:59 PM, Rathidevi wrote:
> Hi All,
> 
> I am using the libvirt-0.5.1.jar and downloaded from this link
> ftp://libvirt.org/libvirt/java.
> 
> 1) To find the os type of domain I use this method getOSType(). But it
> returns the kvm or hvm instead of windows and linux. Is the any way to
> find the original os type of domain?

The libvirt getOSType is probably misnamed; you are referring to the
Java bindings, but it is a wrapper around the C api virDomainGetOSType,
which in turn is merely a shorthand for accesssing part of the domain
XML for determining whether your guest is hardware-accelerated (kvm) or not.

But the question you are asking is an easy task for libguestfs; in
particular, the virt-inspector command is able to tell you quite a bit
of information about the OS running in your guest.  Libguestfs also
comes with Java bindings, but this is probably not the best list for
getting help with using libguestfs.

> 2) Please give is there any option or method available to find the
> ipaddress of domain?

Not yet.  Nehal is working on adding such an API, but it has been slow
going, because the problem is not very straightforward.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


["signature.asc" (application/pgp-signature)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic