[Libguestfs] [PATCH v2v 0/2] output: Add new -o kubevirt mode
Richard W.M. Jones
rjones at redhat.com
Tue Apr 26 09:44:03 UTC 2022
On Tue, Apr 26, 2022 at 11:35:38AM +0200, Laszlo Ersek wrote:
> On 04/25/22 15:55, Richard W.M. Jones wrote:
> > This is very bare-bones at the moment. It only has minimal
> > documentation and has no tests at all.
> >
> > Nevertheless, this adds a new -o kubevirt mode, so you can import
> > guests into Kubevirt, a system which adds virtualization support to
> > Kubernetes[0]. Example of generated YAML metadata can be found at the
> > end of this cover email. Upstream examples of metadata to compare it
> > to can be found in [1].
> >
> > I wasn't able to test this yet since my Kubernetes instance died and
> > no one knows how to fix it ...
> >
> > I only bothered to map out the basic hardware and disks, there are
> > many to-dos which will require reading the Kubevirt source code to
> > finish.
> >
> > Generating YAML is an adventure. The format is full of nasty
> > beartraps. What I'm doing is probably mostly safe, but I wouldn't be
> > surprised if there are security holes.
>
> This must have been a lot of work, and not without significant amounts
> of "head, meet desk"!
>
> Acked-by: Laszlo Ersek <lersek at redhat.com>
I realised that I _can_ actually test this (since it relies on basic
Kubevirt, which is still working, not Konveyor, broken). And I fixed
a few things and am adding support for some of the missing features.
So I'm going to let this one stew out of tree for a bit longer and
post a v2 later with more features.
Thanks,
Rich.
> Thank you!
> Laszlo
>
> >
> > Rich.
> >
> > ---
> > # generated by virt-v2v 2.1.1local,libvirt
> > apiVersion: kubevirt.io/v1
> > kind: VirtualMachineInstance
> > metadata:
> > name: fedora-35
> > spec:
> > domain:
> > devices:
> > disks:
> > - disk:
> > bus: virtio
> > name: disk-0
> > resources:
> > requests:
> > memory: 2048Mi
> > cpu:
> > cores: 1
> > features:
> > acpi: {}
> > apic: {}
> > pae: {}
> > volumes:
> > - hostDisk:
> > path: /var/tmp//fedora-35-sda
> > type: Disk
> > name: disk-0
> > terminationGracePeriodSeconds: 0
> >
> >
> > [0] https://github.com/kubevirt/kubevirt
> > [1] https://github.com/kubevirt/kubevirt/tree/main/examples
> >
> >
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
libguestfs lets you edit virtual machines. Supports shell scripting,
bindings from many languages. http://libguestfs.org
More information about the Libguestfs
mailing list