This repository contains the recipe to build and run virt-v2v inside a Docker container, using a shim script so it can be executed as if it were natively installed on the host system.
The base distribution of choice is Fedora (the upstream of Red Hat), which provides more bleeding-edge packages and avoids the need for any Enterprise Linux licensing.
Originally, the idea for this solution came from ShapeBlue (Lucian Burlacu's talk), while assisting their clients in migrating VMware virtual machines into Apache CloudStack.
Thanks to the power of containerization, any OCI-compliant system, either x86 or ARM, can potentially take advantage of this approach.
This repository also includes a fully auditable build pipeline, using GitHub Actions to automatically build the image and push it to Docker Hub, making it easy to consume and deploy.
Requirements: Docker or any OCI-compatible container runtime and elevated privileges to the system.
The following command installs the shim script and pulls the pre-built image from Docker Hub (a huge time saver).
curl -s https://raw.githubusercontent.com/davift/lazy-virt-v2v/refs/heads/master/virt-v2v | sed 's_lazy_davift/lazy_g' | tee /usr/bin/virt-v2v && chmod +x /usr/bin/virt-v2v
Available at Docker Hub: https://hub.docker.com/r/davift/lazy-virt-v2v
docker build --tag lazy-virt-v2v .docker run --rm -it -v /mnt:/mnt lazy-virt-v2v /usr/sbin/virt-v2v --versionvirt-v2v 2.10.0fedora=43,release=1.fc43
docker run --init --privileged --rm -it -v /mnt:/mnt lazy-virt-v2v /usr/sbin/virt-v2v -v -x -i vmx /mnt/virtualmachine/disk.vmx -o local -os /mnt/converteddocker run --init --privileged --rm -it -v /mnt:/mnt lazy-virt-v2v /usr/sbin/virt-v2v -v -x -i ova /mnt/virtualmachine/disk.ova -o local -os /mnt/convertedcp virt-v2v /usr/bin/
