Booth demo content for importing a VM from libvirt to kubevirt
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
data
.gitignore
README.md
asciinema-demo.gif
libvirt-to-kubevirt

README.md

A small script to import a local libvirt VM into KubeVirt.

asciicast

This includes

  1. Creating a OfflineVirtualMachine definition
  2. Uploading the disk image from the local host to a PV

Limitations:

  • Limited to a single disk (can be easily extended, PRs welcome)
  • Limited to a single nic
  • Subset of libvirt domain features supported

Notes:

  • This is probably a subset of what virt-v2v can do

Preparations

If you don't have a VM, setup a new one:

Setup your demo environment:

Importing the libvirt domain

Just run the provided script and use your domain as a parameter (fedora28 in the following example):

$ ./libvirt-to-kubevirt fedora28
offlinevirtualmachine.kubevirt.io "fedora28" created
Creating PVC
persistentvolumeclaim "fedora28-disk-1" created
Populating PVC
pod "fedora28-disk-1" created
Unable to use a TTY - input is not a terminal or the right kind of file
total 1745924
1745924 -rw-r--r--    1 root     root        1.7G May  3 13:34 disk.img
Cleanup
pod "fedora28-disk-1" deleted
$

That's all. The VM is imported and can be launched as described in the demo flow.

Links