[SOLVED] VM refuses to boot from virtual disk when PCI passthrough is enabled

Gerald Tan

Member
Sep 27, 2017
2
0
21
46
I'm installing FreeNAS on a VM with a 128GB boot disk (Virtio / ZFS zvol) with PCI passthrough to a LSI SAS 9207-8i with 4 disks attached. The FreeNAS installation detects all 5 disks, so I install FreeNAS onto the 128GB /dev/vtbd0, however it refuses to boot from the virtio disk after the installation.

I destroyed the VM, recreated it without the PCI passthrough, and repeated the installation onto the lone virtio drive. This time FreeNAS boots up fine after installation. I shutdown the VM to enable PCI passthrough, and restarted the VM and the VM refuses to boot from the virtio drive again.

Any ideas what I may have done wrong?

vm configuration:

bootdisk: virtio0
cores: 16
cpu: host
ide2: nfserver9-pve:iso/FreeNAS-11.0-U4.iso,media=cdrom
memory: 12288
name: storage1
net0: virtio=CA:4E:3A:CD:7D:78,bridge=vmbr1
numa: 0
ostype: other
scsihw: virtio-scsi-pci
smbios1: uuid=bc758b91-d2b5-46de-86e8-1fb11192350b
sockets: 1
virtio0: local-zfs:vm-116-disk-1,size=128G
hostpci0: 04:00.0,pcie=1
machine: q35

Thanks
 
have you tried virtio-scsi instead of virtio-blk ?
i have no idea how exactly the freenas boot process works, but maybe it has to do with how it enumerates pci/pcie devices (virtio-blk uses one controller per disk)
 
I was able to solve the problem after finding this reddit thread titled "kvm_hba_passthrough_will_not_boot_form_virtual" (sorry, can't post link as new user) and the linked post on freenas forums.

TLDR, disable BIOS boot option in the HBA configuration
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!