You told me earlier that I can pass the name of the VM (which has a
corresponding .cfg file in /etc/xen) to lookupByName() and then use
getXMLDesc() to get information in XML format about the VM, but it
would appear that at least the first function is only useful for
running VM's not for VM's that are not running.
Example to clarify my goals:
I use xen-create-image to create the VM. It puts a config file
called host1.cfg in /etc/xen.
I would like to have a python script to automatically convert
this .cfg file to something libvirt can use to start the VM.
Or another option would be some automated method of creating the VM
in a similar fashion as xen-create-image.
thanks,
tom
On Jul 6, 2008, at 4:34 AM, Daniel P. Berrange wrote:
On Sat, Jul 05, 2008 at 10:21:36PM -0400, Thomas Moyer wrote:
> I've seen in the src tree that there are functions to read and use
> Xen
> configuration files. Are these functions available in the Python
> bindings or do I need to use C to get access to them? What I am
> mostly interested in doing is parsing the Xen config file and getting
> back the XML version that I can store and use later on.
No, these methods are for internal use only. All acccess to the Xen
config
files must go via the public interfaces and XML format. Internally
we use
the config file API to convert from XML into the config file format
and
vica-verca
Daniel
--
|: Red Hat, Engineering, London -o-
http://people.redhat.com/berrange/
:|
|:
http://libvirt.org -o-
http://virt-manager.org -o-
http://ovirt.org
:|
|:
http://autobuild.org -o-
http://search.cpan.org/~danberr/
:|
|: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742
7D3B 9505 :|
--
Thomas Moyer
Graduate Student
CSE Department
Penn State University
tmmoyer(a)cse.psu.edu
http://www.cse.psu.edu/~tmmoyer