Re: [Libguestfs] translating CD-ROM device paths from i440fx to Q35 in virt-v2v (was: test-v2v-cdrom: update the CD-ROM's bus to SATA in the converted domain)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Sep 30, 2021 at 12:53:51PM +0100, Richard W.M. Jones wrote:
> On Thu, Sep 30, 2021 at 01:12:39PM +0200, Laszlo Ersek wrote:
> > All this requires virt-v2v to parse complete <address> elements from the
> > original domain XML, and to generate complete <address> elements in the
> > destination domain XML. Is that feasible?

Just to put a bit of flesh on these bones, links to the source:

> The input is not always (in fact, hardly ever) full libvirt XML.  It's
> input specific to the hypervisor.  For VMware it might be:
> 
>  - the *.vmx file (the real source of truth) (-i vmx)

Here's the virt-v2v code that can parse either a local or remote (over
ssh) *.vmx file into virt-v2v's internal metadata representation:

https://github.com/libguestfs/virt-v2v/blob/master/input/parse_domain_from_vmx.ml

Libvirt also has a vmx driver, but I decided not to use it because it
just adds an extra translation step and probably loses fidelity in the
process.

In all cases, the *.vmx file is the source of truth for VMware.

>  - partial libvirt XML generated by libvirt's vpx driver, but this is
>    derived from information from VMware APIs and ultimately that comes
>    from the *.vmx file (-i libvirt -ic esx:// or -ic vpx://)

The libvirt driver:

https://gitlab.com/libvirt/libvirt/-/tree/master/src/esx

I've hacked on this one a little bit in the past, and ... it's complicated.

>  - the *.ovf file (-i ova)

OVF is a pseudo-standard invented by VMware, but essentially a plot so
they can say they are "standard" when in fact it's just a data dump of
internal VMware structures with no compatibility across software that
generates or consumes OVF.

Here's our OVF parser (for VMware-OVF):

https://github.com/libguestfs/virt-v2v/blob/master/input/OVF.ml

We can also generate OVF, but we generate the RHV-flavour of OVF which
(see above) is not related except that some XML element names overlap.

>  - nothing at all! (-i disk)

If you give virt-v2v just a disk then it will invent some metadata:

https://github.com/libguestfs/virt-v2v/blob/5adf437bcc00586961d8aa058559f86eb5165149/input/input.ml#L235

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-top is 'top' for virtual machines.  Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://people.redhat.com/~rjones/virt-top




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux