VMware import script sanity check

etfz

Member
Aug 29, 2025
47
4
8
Hi,

I have a substantial VMware migration coming up, and have written a little script in order to facilitate the procedure. Namely, I'm migrating the VM "hardware" to VirtIO equivalents. What I'm doing is basically using qm import while substituting parameters based on metadata imported from VMware.

An example resulting command for a Windows VM:

Code:
qm import 104 k1-nod1:ha-datacenter/PVE-MIGRATION/GW/GW.vmx \
  --storage ceph-volume \
  --scsihw virtio-scsi-single \
  --delete scsi0 \
  --sata0 esxi:1,format=vmdk,discard=on,ssd=1 \
  --net0 virtio=00:50:56:9e:dc:66,bridge=BACKUP

  • Use VirtIO SCSI single.
  • Exclude SCSI drive and import it as SATA instead, for Windows driver shenanigans later.
    • A placeholder drive is created, to be migrated via shared storage after the fact.
  • Replace the vmxnet NIC with a VirtIO NIC, using the same MAC address.
Does this seem sensible? Anything I'm overlooking?
 
It seems sensible but testing on a guinea pig server is always best.

If you want to facilitate your import direcly to VirtIO you can also install the virtio drivers before on the vmware side too, it was written by my coworker, it always comes in handy.

https://github.com/croit/load-virtio-scsi-on-boot
 
  • Like
Reactions: etfz