Migrating a Windows Server 2022 virtual machine from ESXi to Proxmox

1 minute read

Between VMware being harder and harder to run on ’legacy’ hardware and Broadcom generally being shithouse, I’ve been moving off of vSAN/ESXi to Proxmox/Ceph. All going well enough, until I moved a couple of Windows VMs, which didn’t apparently want to boot with the new VirtIO SCSI controller (despite installing the VirtIO driver set before migrating the VM off the ESXi host).

As suggested by the Proxmox Wiki, I used VMware’s OVFTool installed on the PVE host to transfer the VM semi-automagically from vSphere across to Proxmox:

~/ovftool/ovftool vi://vcenter_username:[email protected]/Wattle\ Park/vm/Linux\ Servers/Jellyfin .

And then imported it into Proxmox:

qm importovf 202 Jellyfin.ovf vmNvmePool

Windows through a BSOD with the error message, “INACCESSIBLE BOOT DEVICE”. This thread on the Proxmox forum was the first clue on the hunt, but the post that ultimately helped me to fix the problem was a bit cryptic.

I needed to get Windows to load the VirtIO driver (apparently installing it isn’t enough). I achieved this by adding a separate VirtIO device alongside the imported disk, which needs to have a VMware PVSCSI controller:

  1. In the PVE web interface, change the SCSI Controller to “VMware PVSCSI”
  2. Add an additional hard disk as a VirtIO block device, of nominal size (I used 2GB).
  3. Change/add anything else you’d like prior to first boot (Display: VirtIO-GPU, Options: QEMU Guest Agent Enabled and added a Network Adapter (VirtIO) for me).
  4. Boot the VM.
  5. Login and confirm there is a RedHat VirtIO storage adapter visible in Device Manager.
  6. Shutdown the VM. Remove the additional hard disk.
  7. In /etc/pve/qemu-server, edit the corresponding VM configuration file (202.conf for me).
  8. Change the hard disk line to use VirtIO: virtio0: vmNvmePool:vm-202-disk-0,discard=on,size=64G,iothread=1 for me.