Taddeusz Posted October 8, 2022 Share Posted October 8, 2022 I have an NVME passed through to my VM as the OS drive. In order for OVMF to boot from it I have to edit the XML and specify the boot order. Any time I modify my VM I have to go back in and modify the XML. If I forget to do this step it won't automatically boot from the NVME but will instead boot straight to the UEFI shell. Quote Link to comment
SimonF Posted October 8, 2022 Share Posted October 8, 2022 15 minutes ago, Taddeusz said: I have an NVME passed through to my VM as the OS drive. In order for OVMF to boot from it I have to edit the XML and specify the boot order. Any time I modify my VM I have to go back in and modify the XML. If I forget to do this step it won't automatically boot from the NVME but will instead boot straight to the UEFI shell. Boot order has been added to the gui in 6.11 Quote Link to comment
Taddeusz Posted October 8, 2022 Author Share Posted October 8, 2022 29 minutes ago, SimonF said: Boot order has been added to the gui in 6.11 The problem is that if you pass through the device as a PCIe device the OVMF doesn't see it as a bootable device unless you add the boot order the the XML. I've changed it to a physical drive pass through but that's different. It shows up in the guest OS as a "QEMU HARDDISK" rather than a PCIe device. Apparently there's a slight performance penalty from doing it this way rather than just passing through the entire PCIe device. Quote Link to comment
Taddeusz Posted October 8, 2022 Author Share Posted October 8, 2022 It would be nice to be able specify a bound PCIe device as bootable drive and be able to specify a boot order for that device. I'm not the only one to be doing this. Quote Link to comment
SimonF Posted October 8, 2022 Share Posted October 8, 2022 So you are looking for the following boot order options. So do you bind NVME on sysdevs but you want to be able to put a boot order next to a NVME drive on the PCI dev list here Quote Link to comment
Taddeusz Posted October 8, 2022 Author Share Posted October 8, 2022 @SimonF Yes Quote Link to comment
SimonF Posted October 9, 2022 Share Posted October 9, 2022 21 hours ago, Taddeusz said: @SimonF Yes Just to confirm your XML will have an entry similar to this. But guessing if you add/change hardware you could break source address? <hostdev mode='subsystem' type='pci' managed='yes'> <driver name='vfio'/> <source> <address domain='0x0000' bus='0x02' slot='0x00' function='0x0'/> </source> <boot order='5'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/> </hostdev> Quote Link to comment
Taddeusz Posted October 9, 2022 Author Share Posted October 9, 2022 6 minutes ago, SimonF said: Just to confirm your XML will have an entry similar to this. But guessing if you add/change hardware you could break source address? <hostdev mode='subsystem' type='pci' managed='yes'> <driver name='vfio'/> <source> <address domain='0x0000' bus='0x02' slot='0x00' function='0x0'/> </source> <boot order='5'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/> </hostdev> Yes, that's correct. Quote Link to comment
Solution SimonF Posted October 11, 2022 Solution Share Posted October 11, 2022 On 10/9/2022 at 6:49 PM, Taddeusz said: Yes, that's correct. Created the following, but not tested booting from the NVME. Only type 0108(NVME) devices will have boot order input. <hostdev mode='subsystem' type='pci' managed='yes'> <driver name='vfio'/> <source> <address domain='0x0000' bus='0x02' slot='0x00' function='0x0'/> </source> <boot order='1'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/> </hostdev> Quote Link to comment
Taddeusz Posted October 11, 2022 Author Share Posted October 11, 2022 @SimonF That looks perfect! Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.