[libvirt] esx driver: XML format for guest OS type/variant

Justin Clift jclift at redhat.com
Wed Jan 12 21:49:36 UTC 2011


On 11/01/2011, at 12:53 PM, Jake Xu wrote:
> Hi,
> 
> I am trying to create a VM using the Python bindings of Libvirt. I can successfully create VM from a XML template, but I can't find any way to define the guest OS type/variant like CentOS 5.5 64bit for my VM. The native format converted from XML is always guestOS="other-64" - which doesn't tell us much about the guest operating system.
> 
> I have looked at the C libvirt source code a bit, and it seems like libvirt does not support defining guest os type using XML description yet. 

Ouch, that sounds less than optimal.


> Is there any way I can set the guest OS type for my VM?

I'm not a Python programmer, but wondering if you'd be able to cheat by looking how virt-manager does it?

  http://virt-manager.org/scmrepo.html

Virt-manager uses Mercurial for source control, which unfortunately I don't know how to work with either, so
can't point you directly to the right file to check.

But, if you want to look, you should be able to check out the repository (however Mercurial does it) and then
find the right code pretty fast.

Is that helpful?

Regards and best wishes,

Justin Clift






More information about the libvir-list mailing list