On Thu, Jul 20, 2006 at 11:44:54AM -0400, Juan Walker wrote:
Hi,
I have a question regarding the XML format that libvir uses for domain configuration.
I was wondering if there is a way to use the configuration format that xm uses or if a
tool exists to convert to XML. I'm writing an app to help users manage their Xen
domains but I'm hoping to be able to use any .sxp files that the user already has.
This is basically impossible in general, as the xm current configuration
format is a Python *script*, it is code, not data. Have a look at
/etc/xen/xmexample.vti
shipped as part of the Xen distribution, you will see imports and variables.
This is recognized as a problem by the Xen people themselve now, and one
of the reason that they are migrating to an XML format too.
I suspect I missed something in the documentation about why the XML
format is better, but if there is no such tool maybe I should volunteer to write one?
If you have xm configuration files containing just the declarations needed
for xm in static form, then such a tool should be relatively easy, especially
if written into Python, but as said it's not possible in the general case.
Maybe such a python script could be provided in the distribution, if you
provide one, but I expect the Xensource people to provide conversion to XML
python code too, the only question is how differetn their XML will end up being
compared to libvirt one now ;-)
Daniel
--
Daniel Veillard | Red Hat
http://redhat.com/
veillard(a)redhat.com | libxml GNOME XML XSLT toolkit
http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine
http://rpmfind.net/