Migrating a Windows Server 2022 virtual machine from ESXi to Proxmox
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:
- In the PVE web interface, change the SCSI Controller to “VMware PVSCSI”
- Add an additional hard disk as a VirtIO block device, of nominal size (I used 2GB).
- 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).
- Boot the VM.
- Login and confirm there is a RedHat VirtIO storage adapter visible in Device Manager.
- Shutdown the VM. Remove the additional hard disk.
- In
/etc/pve/qemu-server
, edit the corresponding VM configuration file (202.conf
for me). - Change the hard disk line to use VirtIO:
virtio0: vmNvmePool:vm-202-disk-0,discard=on,size=64G,iothread=1
for me.