Add PCIe NVME Devices To Boot Order in GUI


Go to solution Solved by SimonF,

Recommended Posts

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.

Link to comment
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

Link to comment
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.

Link to comment
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>

Link to comment
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.

Link to comment
  • Solution
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.

 

image.thumb.png.32585db38031fca969a296f510d5bda8.png

 

    <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>

Link to comment

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.