OVMF / UEFI Update: Bug found...XML solution inside...will be fixed in GUI soon


jonp

Recommended Posts

Hey guys, just wanted to give you all an update on the OVMF issues some of you are experiencing.  The issue is the use of the VIRTIO bus for the install media in OVMF.  More simply put:

 

6102ba514f5b3c655c3bef51cc69e224ea134479f987ddf67c3c50202a0acb7e.jpg

 

Here's the quick fix for those that can't wait to play with OVMF and UEFI.  All you need to do is use the XML editor and make a few small changes.  Here's the procedure for Windows.  For Linux, the steps are the same, but you won't have the VirtIO driver iso.

 

1 - Create a new VM using "advanced view" to choose the OVMF setting

2 - Set your install media ISO and VirtIO driver ISO

3 - Set your primary virtual disk as you normally do

4 - Create the VM.

5 - Force shutdown the VM.

6 - Edit the XML for the VM.

7 - Locate this section:

 

    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <source file='/mnt/user/isos/win81.iso'/>
      <target dev='hda' bus='virtio'/>
      <readonly/>
      <boot order='2'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
    </disk>
    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <source file='/mnt/user/isos/virtio-jan15.iso'/>
      <target dev='hdb' bus='virtio'/>
      <readonly/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
    </disk>

 

8 - Remove the <address> section for each <disk>

9 - Change the bus from virtio to ide

10 - Save the XML

11 - Start your VM

12 - You should be prompted to boot from your install media (no UEFI shell commands required)

13 - If not, type the following commands from the UEFI shell:

 

fs0:
cd boot/efi
bootx64.efi

 

If none of this works for you, please report back here sharing your complete XML.  Thank you!

Link to comment

Thanks for the write-up. After your reply in the other thread this is what I ended up doing and I was able to get it booting.

 

I'm able to get the Tiancore and the efi shell to output to my monitor but as soon as I boot windows my monitor freezes. Looking at my GPU in device manager it has a yellow triangle with this error code:

 

Windows has stopped the device because it reported problems (code 43).

 

I believe someone has posted a defect report for this same error. I'm looking into it.

 

Link to comment

Thanks for the write-up. After your reply in the other thread this is what I ended up doing and I was able to get it booting.

 

I'm able to get the Tiancore and the efi shell to output to my monitor but as soon as I boot windows my monitor freezes. Looking at my GPU in device manager...

 

You lost me right there.  How are you looking at your device manager if your monitor is frozen?

Link to comment

Sorry for the confusion. I had VNC AND gpu passthrough enabled, so whenever I started the VM it would output the display to VNC instead of to the monitor immediately after booting the OS. It seems that you cannot have both enabled at the same time, which I did not realize.

 

I've got passthrough working but my VM is running atrociously. Extremely slow and my disk I/O is showing 100% usage when only reading or writing a couple megabytes and latency is in the thousands. I read in another thread to disable indexing which I did but it didn't help. I'm gonna mess with it some more and will probably end up making a new post if I can't figure it out.

 

Link to comment

Sorry for the confusion. I had VNC AND gpu passthrough enabled, so whenever I started the VM it would output the display to VNC instead of to the monitor immediately after booting the OS. It seems that you cannot have both enabled at the same time, which I did not realize.

 

I've got passthrough working but my VM is running atrociously. Extremely slow and my disk I/O is showing 100% usage when only reading or writing a couple megabytes and latency is in the thousands. I read in another thread to disable indexing which I did but it didn't help. I'm gonna mess with it some more and will probably end up making a new post if I can't figure it out.

 

What's slow?  How much memory did you assign?  How many CPUs?  Where is the vdisk stored that you created (on the array or in the cache)?  Are you using an HDD or SSD?

Link to comment
  • 11 months later...

Sorry for bringing this old thread back to life. But I'm experiencing these issues and the presented solution does not seem to work for me.

I got the same problem a couple of days ago, the solution where you edit the XML file did work. Later that day the VM crashed and went in to a reboot loop where it couldnt boot Windows.

 

I've been experiencing really wierd behaviors from my Windows VM. As well as unRAID actually, it has rebooted twice without me asking about it.

I've tried both OVMF and SeaBIOS, where OVMF is the one with the best results yet.

So I created a fresh Windows 10 install yesterday, XML file attached and a picture, it worked great during all of yesterday. Several reboots, lots of gaming etc..

 

Today I booted the VM, worked great, think it wanted to update some software when I shut it down, let it do that, shouldn't be a problem I guess.

But now when i try to start it, it won't boot. I get a question if I want to boot from the Windows install media, I wait it out and end up in Shell mode..

Where i cant write fs0: because of my keyboard being swedish and I cant figure out how to write ":"..

I tried editing the XML file, that has worked earlier on another VM. No luck there.

 

So now I'm stuck.

 

Can someone please help me out, I'd really like to use unRAID, but as of now I'm always afraid my VM will crash and I'm forced to reinstall everything.

gaming.txt

58aad7e971c28_Skarmavbild_2016-04-08_kl._17_00_41.png.011f74d11de7de191ee150bc2009af3d.png

Link to comment
  • 3 weeks later...

I'm trying to image a disk into KVM and I'm stuck on the UEFI. I've tried running the series of commands listed, but it says it can't find fs0:

 

<domain type='kvm'>
  <name>NAS2</name>
  <uuid>43d09710-fe91-120f-7638-e6255f354d90</uuid>
  <metadata>
    <vmtemplate xmlns="unraid" name="Windows Server 2012" icon="windows.png" os="windows2012"/>
  </metadata>
  <memory unit='KiB'>4194304</memory>
  <currentMemory unit='KiB'>4194304</currentMemory>
  <memoryBacking>
    <nosharepages/>
  </memoryBacking>
  <vcpu placement='static'>2</vcpu>
  <cputune>
    <vcpupin vcpu='0' cpuset='0'/>
    <vcpupin vcpu='1' cpuset='1'/>
  </cputune>
  <os>
    <type arch='x86_64' machine='pc-i440fx-2.5'>hvm</type>
    <loader readonly='yes' type='pflash'>/usr/share/qemu/ovmf-x64/OVMF_CODE-pure-efi.fd</loader>
    <nvram>/etc/libvirt/qemu/nvram/43d09710-fe91-120f-7638-e6255f354d90_VARS-pure-efi.fd</nvram>
  </os>
  <features>
    <acpi/>
    <apic/>
    <hyperv>
      <relaxed state='on'/>
      <vapic state='on'/>
      <spinlocks state='on' retries='8191'/>
      <vendor id='none'/>
    </hyperv>
  </features>
  <cpu mode='host-passthrough'>
    <topology sockets='1' cores='1' threads='2'/>
  </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/virtio-win-0.1.112-1.iso'/>
      <target dev='hdb' bus='ide'/>
      <readonly/>
      <address type='drive' controller='0' bus='0' target='0' unit='1'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw' cache='writeback'/>
      <source file='/mnt/user/system/NAS2/vdisk1.img'/>
      <target dev='hdc' bus='ide'/>
      <boot order='1'/>
      <address type='drive' controller='0' bus='1' target='0' unit='0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw' cache='writeback'/>
      <source file='/mnt/user/system/NAS2/vdisk2.img'/>
      <target dev='hdd' bus='ide'/>
      <address type='drive' controller='0' bus='1' target='0' unit='1'/>
    </disk>
    <controller type='usb' index='0' model='ich9-ehci1'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x7'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci1'>
      <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'>
      <master startport='2'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x1'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci3'>
      <master startport='4'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x2'/>
    </controller>
    <controller type='pci' index='0' model='pci-root'/>
    <controller type='ide' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
    </controller>
    <controller type='virtio-serial' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
    </controller>
    <interface type='bridge'>
      <mac address='52:54:00:44:2a:a2'/>
      <source bridge='virbr0'/>
      <model type='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </interface>
    <serial type='pty'>
      <target port='0'/>
    </serial>
    <console type='pty'>
      <target type='serial' port='0'/>
    </console>
    <channel type='unix'>
      <source mode='connect'/>
      <target type='virtio' name='org.qemu.guest_agent.0'/>
      <address type='virtio-serial' controller='0' bus='0' port='1'/>
    </channel>
    <input type='tablet' bus='usb'/>
    <input type='mouse' bus='ps2'/>
    <input type='keyboard' bus='ps2'/>
    <graphics type='vnc' port='-1' autoport='yes' websocket='-1' listen='0.0.0.0' keymap='en-us'>
      <listen type='address' address='0.0.0.0'/>
    </graphics>
    <video>
      <model type='qxl' ram='65536' vram='65536' vgamem='16384' heads='1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </video>
    <memballoon model='virtio'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/>
    </memballoon>
  </devices>
</domain>

vm_UEFI_Stuck.PNG.db54411ebbb4c34e51149bfae62aed6f.PNG

Link to comment
  • 6 months later...

I have this exact same issue. I'd happily just create a new Win10 Vm but there are solme important files on this image I would like to get hold of again.

 

Thanks.

 

so you have made a windows 10 image from a real machine?

It doesnt boot when you try and run it gets stuck on uefi boot.

 

Please try to setting up as bios type to seabios then run the vm.

  • Upvote 1
Link to comment
  • 2 weeks later...
  • 5 months later...
  • 8 months later...

Gridrunner - i was following you video with Win10 install but seems like u had some "better" iso then me...

 

Had same issue ISO which working on SeaBIOS, is giving me the command line.

vm_UEFI_Stuck.PNG.db54411ebbb4c34e51149bfae62aed6f.PNG

 

"FS0:" is not working...so i had to use "Rufus" to create UEFI bootable USB Drive and then passthrough it into VM to be able to start the installation...

 

After i passed USB i was able to enter "FS0:" and start installation....

 

---

Now trying again to pass GPU and still not working :( but i moved a bit i guess...

Link to comment
  • 1 year later...
29 minutes ago, ymin said:

i try to install system with mac on win 10

This is the Unraid forum. This particular section of our forum is dedicated to installing Unraid as a virtual machine.

 

Are you interested in Unraid? Do you even know what it is?

 

Your post doesn't mention Unraid at all. Perhaps you could get better help with your problem on some other forum.

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.