Migrating from VMware to Proxmox (ESXi, VMDK, OVF)

How does a VM get from ESXi to Proxmox VE?

The Proxmox wiki names two methods: “There are two methods for migrating Virtual Machines: manual or automatic import of the full VM.” For machines on an ESXi host, the automatic way is the import wizard. In Proxmox VE you add a storage of type ESXi, select the machine and start the import in the web interface.

OVF and OVA files go through the same wizard, OVF files also through qm importovf. Single VMDK disks you import with qm disk import.

Practice the migration first with one or more test VMs, as the wiki recommends. According to the Administration Guide (version 9.2.13) the import wizard is in “tech preview” state, but works stably. For whether Proxmox VE fits your environment at all, see Proxmox as a VMware alternative.

What needs doing before the import?

For the source VM the wiki lists:

  • Remove the guest tools of the old hypervisor, “as it might be difficult to remove them after”.
  • Note down the guest’s network configuration.
  • On Windows, consider removing a static network configuration, because the adapter changes after the migration. With DHCP reservations, enter the new MAC address or set the MAC on the target VM yourself.
  • If full-disk encryption keeps its keys in a virtual TPM, consider disabling it: the wiki says the vTPM state currently cannot be migrated from VMware to Proxmox VE.
  • Power down the source VM.

What should the target VM look like?

For the new VM the wiki recommends:

  • CPU type: host if all nodes have the same CPU model, a generic x86-64-v<X> model for mixed ones
  • Network card: VirtIO
  • Disks: SCSI on the controller “VirtIO SCSI single”, with discard and IO thread
  • QEMU guest agent: installed

If the source VM boots in legacy BIOS mode, set SeaBIOS; if in UEFI mode, set OVMF (UEFI). Install the VirtIO drivers in the guest before the migration. If a migrated VM does not boot because the VirtIO SCSI driver is missing, the wiki says you can attach the disk as IDE or SATA instead, whose drivers should normally always be installed.

How does the import wizard for ESXi work?

According to the wiki, this way requires Proxmox VE 8 or above with the latest updates. The steps:

  1. Under Datacenter, Storage, Add create a storage of type “ESXi” and enter the address and the credentials of an administrator account. With a self-signed certificate, add the CA or set “Skip Certificate Verification”.
  2. Select the storage and check in the import panel that all machines show up.
  3. Select a machine, click “Import”, give at least target storage and network bridge. “Advanced” sets disks and network devices individually.
  4. Power down the source VM, start the import, then boot the VM.

The guide says the wizard is tested with ESXi 6.5 through 8.0. A vCenter as the source is possible, but performance is “dramatically degraded”, 5 to 10 times slower per the guide.

What applies to live import and several machines?

  • Live import: Proxmox VE can start the VM while the import is still running. The VM on the ESXi stays powered off, so there is still some downtime. If the import fails, all data written since its start is lost; the wiki advises testing on a test VM.
  • Several machines: The wiki advises running imports one after another where possible, because of the ESXi API’s low connection limit and the memory demand: at most four disks at once.

Where does the import have limits?

  • Machines with disks on VMware vSAN; move the disks to other storage first.
  • Encrypted disks, for example through a storage policy.
  • VMs with snapshots: the import can be significantly slower.
  • A datastore with a special character such as “+” in its name might not work.

How do OVF and OVA files get into Proxmox VE?

For OVA and OVF files the guide requires a file-based storage with the content type “import”. You put the files in its “import” folder (OVF with its images next to it, flat) or upload OVA files through the web interface; the import then runs through the same wizard.

According to the guide, the SCSI controller type is almost never defined in OVA and OVF files, and the default is unbootable with OVMF (UEFI). Choose “VirtIO SCSI” or “VMware PVSCSI” in that case.

What does the command for OVF look like?

The commands come from the Proxmox documentation and have not been run on a test system. For an OVF file, the wiki gives this command:

qm importovf 100 Server.ovf local-zfs

The command creates the VM from the OVF file’s parameters. With --format you can choose raw, vmdk or qcow2 for file-based targets. The qm documentation says --dryrun only prints the parsed OVF parameters and creates no VM.

Afterwards add a network card and align the settings with the recommendations above. For a Windows guest the disk bus has to be switched from the default SCSI to IDE or SATA.

Exporting from VMware with ovftool

For the export the wiki names ovftool, downloadable from VMware:

./ovftool vi://root@{IP or FQDN of ESXi host}/{VM name} /path/to/export/location

What if you only have VMDK files?

Then the guide points to qm disk import (qm importdisk is an alias). It imports an external image as an unused disk of a VM; the format has to be supported by qemu-img. According to the wiki, Proxmox VE needs access to the files *.vmdk and *-flat.vmdk, most easily through a network share. The command converts the image to the target format on the fly:

qm disk import 104 Server.vmdk local-zfs

According to the wiki, you proceed like this:

  1. Create a new VM and remove the default disk.
  2. After the import the disk appears as “unusedX” in the hardware view; attach it to a bus.
  3. If it is the boot disk, select it under Options, Boot Order.

On Windows only IDE or SATA work out of the box.

What other ways are there?

For these ways the wiki warns: never power on the VM in Proxmox VE and VMware at once, to avoid disk corruption.

Backup, cloning, moving the disk

The wiki also names restoring from a backup (if the backup solution integrates with Proxmox VE), cloning with Clonezilla, and “Attach Disk & Move Disk”: the VMDK is attached and moved while the VM runs. According to the wiki this has minimal downtime but is more involved.

What comes after the migration, and what about Windows?

After the import, update the network settings: the adapter name has most likely changed, according to the wiki.

For Windows, the guide says a successful import or export of Windows machines cannot be guaranteed in all cases. GNU/Linux and other free Unix systems can usually be imported without hassle.

Sources

Let's talk

Free initial consultation - no sales pitch, just an honest assessment.

Request a consultation →