Jump to content

no keyboard during vm boot?


Recommended Posts

i am having problems getting keyboard to respond during boot, so i cant make selections in bootloaders, f8, or type in  encryption passwords. it works fine as soon as iam in windows and also in vnc. seems like keyboard dosnt get initiated until it hits windows.

tried every port on motherboard, and on pcie usb controller, also tried passthrough of controllers, and q35/fx440 nothing seems to work

I only have 2keyboards at hand so i do wonder if its just some compatibility issues or if theres some seabois/qemu setting problem?

 

 

<domain type='kvm'>
  <name>Windows 77</name>
  <uuid>7ab87333-e96b-e71a-a67b-a7372f11c978</uuid>
  <metadata>
    <vmtemplate xmlns="unraid" name="Windows 7" icon="windows7.png" os="windows7"/>
  </metadata>
  <memory unit='KiB'>4194304</memory>
  <currentMemory unit='KiB'>4194304</currentMemory>
  <memoryBacking>
    <nosharepages/>
    <locked/>
  </memoryBacking>
  <vcpu placement='static'>8</vcpu>
  <cputune>
    <vcpupin vcpu='0' cpuset='0'/>
    <vcpupin vcpu='1' cpuset='1'/>
    <vcpupin vcpu='2' cpuset='2'/>
    <vcpupin vcpu='3' cpuset='3'/>
    <vcpupin vcpu='4' cpuset='4'/>
    <vcpupin vcpu='5' cpuset='5'/>
    <vcpupin vcpu='6' cpuset='6'/>
    <vcpupin vcpu='7' cpuset='7'/>
  </cputune>
  <os>
    <type arch='x86_64' machine='pc-i440fx-2.5'>hvm</type>
  </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='4' 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='disk'>
      <driver name='qemu' type='raw' cache='writeback'/>
      <source file='/mnt/user/Vidisks/Windows 77/vdisk1.img'/>
      <target dev='hdc' bus='virtio'/>
      <boot order='1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
    </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='0x03' function='0x0'/>
    </controller>
    <interface type='bridge'>
      <mac address='52:54:00:3b:f4:9f'/>
      <source bridge='br0'/>
      <model type='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' 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>
    <hostdev mode='subsystem' type='pci' managed='yes' xvga='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x04' slot='0x00' function='0x0'/>
      </source>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
    </hostdev>
    <hostdev mode='subsystem' type='usb' managed='no'>
      <source>
        <vendor id='0x04b4'/>
        <product id='0x0101'/>
      </source>
    </hostdev>
    <hostdev mode='subsystem' type='usb' managed='no'>
      <source>
        <vendor id='0x1532'/>
        <product id='0x0029'/>
      </source>
    </hostdev>
    <memballoon model='virtio'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
    </memballoon>
  </devices>
</domain>

 

Edit:Or if no one has a solution, could they confirm or not if their keyboard is active during boot, or only after windows has loaded?

Seabios only, it does seem to work in ovmf but dont think win7 is supported there?

Link to comment

Someone with more experience than me will be able to confirm, but I think this is a limitation of seabios when using GPU passthrough.

 

I have the same problem installing some flavours of Linux (like SteamOS) - where they require you to press Enter at the bootloader to continue. There does not seem to be a problem with ovmf (e.g. keyboard works with SteamOS & ovmf), but not all flavours of Linux boot with ovmf! My workaround was to use VNC for boot and installation, then power-off the VM, re-enable GPU passthrough and reboot. Most recent Linux distros are good enough to pick the right display driver on boot (don't try this with Windows though).

Link to comment

Someone with more experience than me will be able to confirm, but I think this is a limitation of seabios when using GPU passthrough.

 

I have the same problem installing some flavours of Linux (like SteamOS) - where they require you to press Enter at the bootloader to continue. There does not seem to be a problem with ovmf (e.g. keyboard works with SteamOS & ovmf), but not all flavours of Linux boot with ovmf! My workaround was to use VNC for boot and installation, then power-off the VM, re-enable GPU passthrough and reboot. Most recent Linux distros are good enough to pick the right display driver on boot (don't try this with Windows though).

even when using VNC it wouldnt respond to keyboard inputs except through vnc, so iguess iam only left with OVMF as an option, the only problem there is i need windows7, and thats not supported it seems, i managed to get it to install and run but only with hyper-v off, and couldnt get gpu passthrough working, ill have to play around with it some more i guess. I do wonder if theres a way to get keyboard responding in seabios though would be way easier.

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