[libvirt] Get Virtual Machine Information

Hi 1. We need to know how to get the IP addresses of virtual machines running in Novel Xen Server? 2. We need to know how to get the proper operating system like Windows XP or 2000 or 2003? Thanks in advance Regards, Gandhiraj Natarajan Connect more, do more and share more with Yahoo! India Mail. Learn more. http://in.overview.mail.yahoo.com/

On Thu, Oct 22, 2009 at 02:09:01PM +0530, Gandhiraj Natarajan wrote:
1. We need to know how to get the IP addresses of virtual machines running in Novel Xen Server?
There's not really a good way to do this. One possibility is to run '/sbin/arp -an' but it's not a reliable method.
2. We need to know how to get the proper operating system like Windows XP or 2000 or 2003?
virt-inspector can tell you it is Windows, and with a bit of extra work we could work out what version of Windows it is too. (In fact virt-inspector can't do this last bit at the moment, mainly because I have no idea how). Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones virt-p2v converts physical machines to virtual machines. Boot with a live CD or over the network (PXE) and turn machines into Xen guests. http://et.redhat.com/~rjones/virt-p2v

On Fri, Oct 23, 2009 at 04:04:23PM +0100, Richard W.M. Jones wrote:
On Thu, Oct 22, 2009 at 02:09:01PM +0530, Gandhiraj Natarajan wrote:
2. We need to know how to get the proper operating system like Windows XP or 2000 or 2003?
virt-inspector can tell you it is Windows, and with a bit of extra work we could work out what version of Windows it is too. (In fact virt-inspector can't do this last bit at the moment, mainly because I have no idea how).
Apparently it is contained in the file %systemroot%\system32\ prodspec.ini so as a temporary measure you could use virt-cat. This works for me: $ virt-cat Win2003x32 /WINDOWS/system32/prodspec.ini ; ;Note to user: DO NOT ALTER OR DELETE THIS FILE. ; [SMS Inventory Identification] Version=1.0 [Product Specification] Product=Windows Server 2003, Enterprise Edition Version=5.0 Localization=English ServicePackNumber=0 BitVersion=40 [Version] DriverVer=10/01/2002,5.2.3790.0 Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones libguestfs lets you edit virtual machines. Supports shell scripting, bindings from many languages. http://et.redhat.com/~rjones/libguestfs/ See what it can do: http://et.redhat.com/~rjones/libguestfs/recipes.html

On Fri, Oct 23, 2009 at 04:15:03PM +0100, Richard W.M. Jones wrote:
Apparently it is contained in the file %systemroot%\system32\ prodspec.ini so as a temporary measure you could use virt-cat. This works for me:
$ virt-cat Win2003x32 /WINDOWS/system32/prodspec.ini
Further to this, someone on my blog discovered that the prodspec.ini file was discontinued in Windows Vista, so the above doesn't work universally. Instead you can download and decode the appropriate entry from the Windows Registry "hive". Currently this is described here: http://rwmj.wordpress.com/2009/06/08/explore-the-windows-registry-with-libgu... but we plan to make this even simpler shortly. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones virt-p2v converts physical machines to virtual machines. Boot with a live CD or over the network (PXE) and turn machines into Xen guests. http://et.redhat.com/~rjones/virt-p2v
participants (2)
-
Gandhiraj Natarajan
-
Richard W.M. Jones