Jump to content

VM BOOTS TO UEFI INTERACTIVE SHELL INSTEAD OF WINDOWS (Passthrough NVME)


Recommended Posts

I just installed a Windows 11 VM on Unraid 6.10.3. I set primary vdisk location to "none" and passed through my NVME drive, instead:

 

 

2144096988_ScreenShot2022-08-18at4_11_58PM.thumb.png.09aa579441b5ce086fbd9c209f58efec.png

 

1114095445_ScreenShot2022-08-18at3_57_23PM.thumb.png.ef3218374b1101c835712f466938766b.png

 

 

 

Install went well and everything seems to work. However, every time I boot up my VM it boots me into the UEFI Interactive Shell instead of Windows:

 

 

993977192_ScreenShot2022-08-18at4_00_04PM.thumb.png.734701e51dc9dd80b6f8c7d09f3d3374.png

 

 

 

I have to exit the shell and then set the boot order in Boot Device Manager -> Boot Options --> Change Boot Order to boot from my NVME drive first:

 

 

1828611667_ScreenShot2022-08-18at4_02_01PM.thumb.png.8b8b59653cd96d679bdab75858deac97.png

 

 

 

Then I select "Boot Manager" and select my NVME again to re-boot into windows:

 

 

1918533922_ScreenShot2022-08-18at4_02_48PM.thumb.png.883547581318d39e92ab60c6b6885864.png

 

 

 

Now Windows boots correctly. However, my boot order selection doesn't stick. When I boot up my VM the next time it again boots into the UEFI interactive shell and the boot order has been reset once again:

 

 

1905647410_ScreenShot2022-08-18at4_06_28PM.thumb.png.0b589e44ba6559057bcfc230aa7243fc.png

 

 

Is there any way I can get my VM to boot directly into Windows when using a passthrough disk?

 

 

 

Here is my VM XML:

<?xml version='1.0' encoding='UTF-8'?>
<domain type='kvm' id='8'>
  <name>Windows 11</name>
  <uuid>866d248b-f751-5434-4fe4-3aab913d584e</uuid>
  <metadata>
    <vmtemplate xmlns="unraid" name="Windows 11" icon="windows11.png" os="windowstpm"/>
  </metadata>
  <memory unit='KiB'>33030144</memory>
  <currentMemory unit='KiB'>33030144</currentMemory>
  <memoryBacking>
    <nosharepages/>
  </memoryBacking>
  <vcpu placement='static'>12</vcpu>
  <cputune>
    <vcpupin vcpu='0' cpuset='1'/>
    <vcpupin vcpu='1' cpuset='9'/>
    <vcpupin vcpu='2' cpuset='3'/>
    <vcpupin vcpu='3' cpuset='11'/>
    <vcpupin vcpu='4' cpuset='4'/>
    <vcpupin vcpu='5' cpuset='12'/>
    <vcpupin vcpu='6' cpuset='5'/>
    <vcpupin vcpu='7' cpuset='13'/>
    <vcpupin vcpu='8' cpuset='6'/>
    <vcpupin vcpu='9' cpuset='14'/>
    <vcpupin vcpu='10' cpuset='7'/>
    <vcpupin vcpu='11' cpuset='15'/>
  </cputune>
  <resource>
    <partition>/machine</partition>
  </resource>
  <os>
    <type arch='x86_64' machine='pc-i440fx-6.2'>hvm</type>
    <loader readonly='yes' type='pflash'>/usr/share/qemu/ovmf-x64/OVMF_CODE-pure-efi-tpm.fd</loader>
    <nvram>/etc/libvirt/qemu/nvram/866d248b-f751-5434-4fe4-3aab913d584e_VARS-pure-efi-tpm.fd</nvram>
  </os>
  <features>
    <acpi/>
    <apic/>
    <hyperv mode='custom'>
      <relaxed state='on'/>
      <vapic state='on'/>
      <spinlocks state='on' retries='8191'/>
      <vendor_id state='on' value='none'/>
    </hyperv>
  </features>
  <cpu mode='host-passthrough' check='none' migratable='on'>
    <topology sockets='1' dies='1' cores='6' threads='2'/>
    <cache mode='passthrough'/>
  </cpu>
  <clock offset='localtime'>
    <timer name='hypervclock' present='yes'/>
    <timer name='hpet' present='no'/>
  </clock>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>restart</on_crash>
  <devices>
    <emulator>/usr/local/sbin/qemu</emulator>
    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <source file='/mnt/user/isos/Win11_English_x64v1.iso' index='2'/>
      <backingStore/>
      <target dev='hda' bus='ide'/>
      <readonly/>
      <boot order='2'/>
      <alias name='ide0-0-0'/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </disk>
    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <source file='/mnt/user/isos/virtio-win-0.1.221-1.iso' index='1'/>
      <backingStore/>
      <target dev='hdb' bus='ide'/>
      <readonly/>
      <alias name='ide0-0-1'/>
      <address type='drive' controller='0' bus='0' target='0' unit='1'/>
    </disk>
    <controller type='usb' index='0' model='ich9-ehci1'>
      <alias name='usb'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x7'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci1'>
      <alias name='usb'/>
      <master startport='0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0' multifunction='on'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci2'>
      <alias name='usb'/>
      <master startport='2'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x1'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci3'>
      <alias name='usb'/>
      <master startport='4'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x2'/>
    </controller>
    <controller type='pci' index='0' model='pci-root'>
      <alias name='pci.0'/>
    </controller>
    <controller type='ide' index='0'>
      <alias name='ide'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
    </controller>
    <controller type='virtio-serial' index='0'>
      <alias name='virtio-serial0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
    </controller>
    <interface type='bridge'>
      <mac address='52:54:00:17:e6:b8'/>
      <source bridge='br0'/>
      <target dev='vnet7'/>
      <model type='virtio-net'/>
      <alias name='net0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </interface>
    <serial type='pty'>
      <source path='/dev/pts/0'/>
      <target type='isa-serial' port='0'>
        <model name='isa-serial'/>
      </target>
      <alias name='serial0'/>
    </serial>
    <console type='pty' tty='/dev/pts/0'>
      <source path='/dev/pts/0'/>
      <target type='serial' port='0'/>
      <alias name='serial0'/>
    </console>
    <channel type='unix'>
      <source mode='bind' path='/var/lib/libvirt/qemu/channel/target/domain-8-Windows 11/org.qemu.guest_agent.0'/>
      <target type='virtio' name='org.qemu.guest_agent.0' state='connected'/>
      <alias name='channel0'/>
      <address type='virtio-serial' controller='0' bus='0' port='1'/>
    </channel>
    <input type='tablet' bus='usb'>
      <alias name='input0'/>
      <address type='usb' bus='0' port='1'/>
    </input>
    <input type='mouse' bus='ps2'>
      <alias name='input1'/>
    </input>
    <input type='keyboard' bus='ps2'>
      <alias name='input2'/>
    </input>
    <tpm model='tpm-tis'>
      <backend type='emulator' version='2.0' persistent_state='yes'/>
      <alias name='tpm0'/>
    </tpm>
    <graphics type='vnc' port='5900' autoport='yes' websocket='5700' listen='0.0.0.0' keymap='en-us'>
      <listen type='address' address='0.0.0.0'/>
    </graphics>
    <sound model='ich9'>
      <alias name='sound0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
    </sound>
    <audio id='1' type='none'/>
    <video>
      <model type='qxl' ram='65536' vram='65536' vgamem='16384' heads='1' primary='yes'/>
      <alias name='video0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </video>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x07' slot='0x00' function='0x0'/>
      </source>
      <alias name='hostdev0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
    </hostdev>
    <memballoon model='none'/>
  </devices>
  <seclabel type='dynamic' model='dac' relabel='yes'>
    <label>+0:+100</label>
    <imagelabel>+0:+100</imagelabel>
  </seclabel>
</domain>

 

Edited by venicenerd
Link to comment
3 minutes ago, venicenerd said:
<hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x07' slot='0x00' function='0x0'/>
      </source>
      <alias name='hostdev0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
    </hostdev>

Change to

3 minutes ago, venicenerd said:
<hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
      <boot order='1'/>
        <address domain='0x0000' bus='0x07' slot='0x00' function='0x0'/>
      </source>
      <alias name='hostdev0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
    </hostdev>

 

 

Link to comment

Hey @JorgeBthank you so much for the quick reply! Unfortunately the changes don't seem to take. I right click on the VM and select "edit" then in XML View I replace the existing hostdev code with the one you posted and click "update". Unfortunately, when I click edit again, to check if the changes were made it has gone back to the original code. It won't let me save your changes. 

 

Any idea why that may be?

Link to comment
5 minutes ago, JorgeB said:

Not really, always worked for me.

Seems like it's a general issue for me. It won't save ANY changes I make via the XML view. Only changes I make via the form view. This is so bizarre. I just made an XML change 30 minutes ago and that worked but now I am no longer able to save any changes.

Link to comment
9 minutes ago, venicenerd said:

Seems like it's a general issue for me. It won't save ANY changes I make via the XML view. Only changes I make via the form view. This is so bizarre. I just made an XML change 30 minutes ago and that worked but now I am no longer able to save any changes.

 

Hmmm that's actually not quite true. It allowed me to remove this from the XML

<sound model='ich9'>
      <alias name='sound0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
    </sound>

 

which I had added previously (minus the address line... not sure how that ended up in there...) but it won't let me add your code or remove this line, for example:

  <audio id='1' type='none'/>

 

So it seems my XML is very selective on the changes it allows me to make. Is that normal? 

Link to comment
2 hours ago, ilarion said:

Just put 

  <boot order='1'/>

somewhere between <hostdev> </hostdev>

 

Now THAT worked!!!! Thank you @ilarion and @JorgeB. I am curious, though, why it didn't work to just replace the entire string. Also, after I placed "<boot order='1'/>" in between <hostdev> and  </hostdev> and checked afterwards the new code was still in there but it had moved in another location than where I had put it.

 

Is it normal for Unraid to change up the code?

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.

×
×
  • Create New...