-
Notifications
You must be signed in to change notification settings - Fork 2
1. Requirements
- Ubuntu 24.04 is highly recommended as the distribution to run this as it includes:
- libguestfs 1.52
- virt-v2v 2.4.0
- libvirt 10.0.0
- OpenNebula, with any necessary resources configured including hypervisors, networks, and datastores.
- A solid connection to your vCenter Server, LAN is recommended if possible since disk transfers can be slow via vCenter API
- You may also need to increase your vCenter API timeout. The default is 120 minutes and this can be changed in vCenter at Administration -> Deployment -> Client Configuration, up to 1440 minutes (24 hours).
- If you are running OneSwap on a different machine than the frontend is on, you will also need to install the OpenNebula CLI tools, or just install the opennebula frontend but do not start oned or anything else. You must also use the HTTP Transfer, see Parameters.
- The guest must be powered off in vCenter
- The guest cannot have any snapshots
- virt-v2v (≥1.44.2, recommended compiling a newer version if it's <2.4.0, see recommended actions)
- libguestfs-tools (≥1.46.1, ≥1.50 for Windows QEMU Guest Agent and VirtIO injections)
- nbdkit (≥1.24.0)
- nbdkit-plugin-dev (≥1.24.0)
- nbdkit-plugin-libvirt (≥1.24.0)
- libguestfs-xfs ( for XFS guests ) (≥1.46.1)
- libguestfs-zfs ( for ZFS guests ) (≥1.46.1)
- VDDK Library (Matching Your vCenter Version), for improved disk transfer speeds
- VDDK library is not freely redistributable but you can download it from VMWare's Developers Portal. As of writing, the latest version is 8.0.2 and available to download from this page.. To find another version go to the Customer Connect's main "All Downloads" page, then click on "Drivers & Tools" link under "VMWare vSphere". Then, expand the "Automation and SDK" section on this page to find the Virtual Disk Developer Kit download near the top.
- Download and extract library to an accessible location, define with the --vddk parameter
- Download and install rhsrvany tools from GitHub:
- Download latest version of the RPM found at https://rpmfind.net/linux/rpm2html/search.php?query=mingw32-srvany
- Extract EXE's from rpm package by executing:
rpm2cpio srvany.rpm | cpio -idmv \
&& mkdir -p /usr/local/share/virt-tools \
&& mv ./usr/i686-w64-mingw32/sys-root/mingw/bin/*exe /usr/local/share/virt-tools/
-
Download VirtIO ISO drivers for Windows to the /usr/local/share/virtio-win/ directory:
-
Note: For older versions of virt-v2v they may look in /usr/share/virtio-tools/ and /usr/share/virtio-win/. You may want to make symlinks:
ln -s /usr/share/virt-tools /usr/local/share/virt-tools
ln -s /usr/share/virtio-win /usr/local/share/virtio-win
- Download necessary context packages from the OpenNebula's one-apps github repository: https://github.com/OpenNebula/one-apps/releases
- Place them all in a specific directory, default at /var/lib/one/context/ ( --context argument, see Parameters )
libguestfs
Depending on the distribution that you do run this on, the installed libguestfs-tools package could be below the required version mainly for the options --win-qemu-ga
and --virtio
options. virt-customize
is the tool used for this operation, and those features were not available until version 1.50, which is newer than the version that ships with Ubuntu 22.04 ( 1.46.1 ).
Libguestfs can be compiled once cloned from their repository . Please follow their instructions carefully, and make note of the fact that they do not recommend to actually install the library, but use the ./run
script they provide which will set environment variables so that your programs should use the newer version.
You can then run oneswap by using:
/path/to/libguestfs/run oneswap convert 'vm-name' $VOPTS --win-qemu-ga /path/to/virtio --virto /path/to/virtio
virt-v2v
It is also recommended to get the latest versions of virt-v2v, there are many improvements including automatically installing VirtIO and QEMU Guest Agent into Windows guests. Here is a link to the virt-v2v github
Once compiled, you can install it or you can use the --v2v-path
parameter to specify where this new executable is.
Compiling this latest version and utilizing it should also increase compatibility for various distributions, such as RHEL-based 8 and 9 distributions, and some lesser known distributions. The latest version during writing this (2.5.3) will attempt conversions on these distribution families: "fedora", "rhel", "centos", "circle", "scientificlinux", "redhat-based", "oraclelinux", "rocky", "sles", "suse-based", "opensuse", "altlinux", "debian", "ubuntu", "linuxmint", "kalilinux".
libvirt
The same is true for the libvirt version. virt-v2v
and other tools will use libvirt for vCenter VM inspection and a few other things. There are a few minor bugs in the version that ships with Ubuntu 22.04 ( 8.0.0 ) that was resolved in a bit more recent version of libvirt ( 8.7.0 ). If you are able to get these installed via your package manager we would suggest that, however libvirt also has their repository with many versions and instructions on how to build them: https://github.com/libvirt/libvirt
Since the frontend is not a node, the libvirt version used here can be different from the rest of the cloud.
Proceed to Workload Preparaton