Migrating VMware virtual machines with Porter
Porter converts a VMware virtual machine (VM) into a bootable KVM/QEMU virtual machine in QCOW2 format on an SC//Reliantâ„¢ host, start to finish, from a single command.
What Porter does
Porter performs the entire VMware-to-KVM conversion from a single command. In one run it:
- Locates the source VM, either on a remote ESXi host or in an exported file on the SC//Reliant host.
- Converts the virtual disk to QCOW2.
- Injects the VirtIO drivers so that disk and network devices function under KVM.
- Removes VMware Tools from the guest.
- Registers the resulting VM with libvirt and starts it.
What Porter is not
Porter is not a backup tool, it is not an equivalent of vMotion, and it works only with VMware sources. To back up and restore VMs that already run on the SC//Reliant platform, see Backing up and restoring your virtual machines.
Prerequisites
Have all of the following in place before the first run:
- An SC//Reliant host, and
sudopermissions for your user. - Porter installed. See Installing Porter.
- The exact name of the VM you are migrating, as it appears on the source.
- Sufficient free space in both the temporary working directory (default
/mnt/kvm_backups) and the output directory. - Knowledge of whether the guest operating system is Windows or Linux, because this determines which flags you use.
- For ESXi mode, SSH enabled on the ESXi host and one of the three supported authentication methods. See Running a Porter migration.
Porter installs its own Linux tool dependencies (virt-v2v, qemu-img, sshpass, and lsof) the first time it runs. virsh and rvc are expected to already be present on the host.
Installing Porter
Install Porter from the apt repository.
sudo apt install porter
Porter installs to /usr/local/sbin/porter and requires root to run. Confirm that it is on your path.
sudo which porter
The following is example output from an installation.
test.user@sit0001red0:~$ sudo apt install porter=1.0.0~2be6f916
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following NEW packages will be installed:
porter
0 upgraded, 1 newly installed, 0 to remove and 17 not upgraded.
Need to get 3,006 kB of archives.
Get:1 http://mirror3.reliantsec.net reliant-testing-bookworm/main amd64 porter amd64 1.0.0~2be6f916 [3,006 kB]
Fetched 3,006 kB in 0s (91.1 MB/s)
Selecting previously unselected package porter.
Preparing to unpack .../porter_1.0.0~2be6f916_amd64.deb ...
Unpacking porter (1.0.0~2be6f916) ...
Setting up porter (1.0.0~2be6f916) ...
Choosing a source mode
Porter has two input modes. Choose the one that matches where the VM lives now.
| Mode | Flag | When to use it |
|---|---|---|
| ESXi streaming | --esxi | The VM is still on an ESXi host. Porter streams the disk off the host over SSH and converts it in one pass, so you do not have to export and copy the disk first. |
| Local file | --local | You already have an exported .ova, .ovf, or .vmdk file on the SC//Reliant host. This is the default mode. |
Most migrations use ESXi streaming.
Expected duration
On a real disk, expect the conversion to take a while. A representative Windows migration took 10 to 15 minutes, including the remove-vmware-tools.ps1 cleanup script and the reboots that follow conversion.