[et-mgmt-tools] [PATCH 05 of 11] Allow output in libvirt.rng format

Daniel P. Berrange berrange at redhat.com
Tue Jul 8 12:25:08 UTC 2008


On Mon, Jul 07, 2008 at 03:51:35PM -0700, john.levon at sun.com wrote:
> # HG changeset patch
> # User john.levon at sun.com
> # Date 1215470429 25200
> # Node ID 4528daf7a40728f906e1843b8368198ce9d438c5
> # Parent  6042ba3dce6a57dbe7ee547ae65be93dbef1b0a2
> Allow output in libvirt.rng format
> 
> Add "virt-instance" formatter.
> 
> Signed-off-by: John Levon <john.levon at sun.com>

This is overlapping quite alot with what virt-image does when it
converts 'image' format XML  into the libvirt XML, and its never
going to give satisfactory results because virt-image is operating
standalone without any libvirt connection. This means it is unable
to get any hypervisor specific capabilities data to determine what
the required OS / boot type options are.

> +bootloaders = {
> +    vmconfig.VM_TYPE_PV: "<bootloader>/usr/lib/xen/bin/pygrub</bootloader>",
> +    vmconfig.VM_TYPE_HVM: "",
> +}
> +
> +bootdevs = {
> +    vmconfig.VM_TYPE_PV: "",
> +    vmconfig.VM_TYPE_HVM: "<boot dev='hd' />",
> +}
> +
> +loaders = {
> +    vmconfig.VM_TYPE_PV: "",
> +    vmconfig.VM_TYPE_HVM: "<loader>/usr/lib/xen/boot/hvmloader</loader>",
> +}
> +
> +emulators = {
> +    vmconfig.VM_TYPE_PV: "",
> +    vmconfig.VM_TYPE_HVM: "<emulator>/usr/lib/xen/bin/qemu-dm</emulator>",
> +}

This kind of data all has to be taken from the capabilities XML for a
specific hypervisor - there's no generic libvirt domain XML config you
can generate which will work portably, which is why we have the separate
virt-image XML format. 

So IMHO, virt-convert should only deal in the virt-image XML format, and
if you want to immediately get a launchable config, then we should make
it so that you can easily run virt-image with the output of virt-convert
in some way.

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 :|




More information about the et-mgmt-tools mailing list