[Thincrust-devel] selinux security context

David Lutterkort lutter at redhat.com
Fri Nov 7 23:20:44 UTC 2008


On Fri, 2008-11-07 at 15:58 -0500, David Huff wrote:
> So is there a difference between "libvirt XML" and "virtimg
> XML"?

Yes, they are very different formats; libvirt XML[1] is geared towards
creating a VM on a specific host/hypervisor. The virt-image XML[2] is
focussed on describing a VM image in a way that can be used to run that
image on a variety of hypervisors.

> I have been tinkering around with some of the python-virtinst code to
> convert the appliance-creator generated xml to vmware, however the code 
> is not very straight froward and Im not seeing any good doc on it.

The conversion from virt-image XML to VMWare should be in virt-convert
(if it's not, that's where it should go)

> I am mainly getting confused between the virt-inst and virt-convert code 
> as they seem to have similar functionality.  Virt-inst seems to use 
> ImageParser and UnWarem, and virt-convert uses vmcfg and some other 
> templates that are confusing.

The virt-convert code for handling virt-image files does look a little
strange .. rather than filling in fixed XML templates, it would be much
cleaner to add toXML methods to the various classes in ImageParser so
that you can just call Image.toXML and get an XML representation of the
internal objects.

> What I want to do is creating an IMAGE object that describes the config 
> then use it to generate the xml files.
> 
> What should be the best way to do this?

That seems like the right approach, but it requires that you add toXML
or similar methods to all the classes in ImageParser.

David

[1] http://libvirt.org/format.html
[2] http://linux.die.net/man/5/virt-image and
http://people.redhat.com/dlutter/virt-image/image.rng





More information about the Thincrust-devel mailing list