Virtual machine on ASRock FM2A88M-HD+ R2.0 / AMD A10-7850K / HD 5450


Recommended Posts

Hi yall,

 

I'm trying to run up an instance of XBMC in a VM with PCIe passthrough for the video card.

 

I have the following settings configured under the ASROCK BIOS :

 

* IOMMU - Enabled

* SVM (AMD-V) - Enabled

 

Which results in nice messages being displayed on the info tab in unRAID (Screen Shot 1)

 

I've got an SSD formatted as BTRFS and mounted using the "Unassigned Devices" plugin, located at /mnt/disks/virtual.

 

On this disk I've created two folders "filesys" and "iso", where the latter folder contains an image of Kodibuntu titled "kodibuntu-14.0-helix_amd64.iso".

 

I've configured a VM under the VMs tab, with the following configuration (Screen Shot 2) :

 

<domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
  <name>VirtualHelix</name>
  <uuid>a3cf9aa9-f5db-1476-7cae-2659900d1e52</uuid>
  <description>A virtual machine.</description>
  <metadata>
    <vmtemplate name="Custom" icon="ubuntu.png" os="ubuntu"/>
  </metadata>
  <memory unit='KiB'>2097152</memory>
  <currentMemory unit='KiB'>2097152</currentMemory>
  <memoryBacking>
    <nosharepages/>
    <locked/>
  </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-q35-2.3'>hvm</type>
  </os>
  <features>
    <acpi/>
    <apic/>
  </features>
  <cpu>
    <topology sockets='1' cores='2' threads='1'/>
  </cpu>
  <clock offset='utc'>
    <timer name='rtc' tickpolicy='catchup'/>
    <timer name='pit' tickpolicy='delay'/>
    <timer name='hpet' present='no'/>
  </clock>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>restart</on_crash>
  <devices>
    <emulator>/usr/bin/qemu-system-x86_64</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw' cache='writeback'/>
      <source file='/mnt/disks/virtual/filesys/VirtualHelix/vdisk1.img'/>
      <target dev='hdb' bus='virtio'/>
      <boot order='1'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x05' function='0x0'/>
    </disk>
    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <source file='/mnt/disks/virtual/iso/kodibuntu-14.0-helix_amd64.iso'/>
      <target dev='hda' bus='sata'/>
      <readonly/>
      <boot order='2'/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </disk>
    <controller type='usb' index='0' model='ich9-ehci1'>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x03' function='0x7'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci1'>
      <master startport='0'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x03' function='0x0' multifunction='on'/>
    </controller>
    <controller type='sata' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>
    </controller>
    <controller type='pci' index='0' model='pcie-root'/>
    <controller type='pci' index='1' model='dmi-to-pci-bridge'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x1e' function='0x0'/>
    </controller>
    <controller type='pci' index='2' model='pci-bridge'>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x01' function='0x0'/>
    </controller>
    <controller type='virtio-serial' index='0'>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x04' function='0x0'/>
    </controller>
    <filesystem type='mount' accessmode='passthrough'>
      <source dir='/mnt/user/test/'/>
      <target dir='shared'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x01' function='0x0'/>
    </filesystem>
    <interface type='bridge'>
      <mac address='52:54:00:c3:c0:43'/>
      <source bridge='br0'/>
      <model type='virtio'/>
      <address type='pci' domain='0x0000' bus='0x02' 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='bind' path='/var/lib/libvirt/qemu/channel/target/VirtualHelix.org.qemu.guest_agent.0'/>
      <target type='virtio' name='org.qemu.guest_agent.0'/>
      <address type='virtio-serial' controller='0' bus='0' port='1'/>
    </channel>
    <memballoon model='virtio'>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x06' function='0x0'/>
    </memballoon>
  </devices>
  <qemu:commandline>
    <qemu:arg value='-device'/>
    <qemu:arg value='ioh3420,bus=pcie.0,addr=1c.0,multifunction=on,port=2,chassis=1,id=root.1'/>
    <qemu:arg value='-device'/>
    <qemu:arg value='vfio-pci,host=01:00.0,bus=pcie.0,multifunction=on,x-vga=on'/>
    <qemu:arg value='-device'/>
    <qemu:arg value='vfio-pci,host=01:00.1,bus=pcie.0'/>
  </qemu:commandline>
</domain>

 

When using OVMF, I get a blank screen (no light, nothing...) but keyboard control appears to be removed from the unRAID host.

When using SeaBIOS, I get the Kodibuntu install screen appear on the appropriate graphics card, but the USB keyboard does not respond (and appears to have been removed from the host also).

 

Any suggestions?  I'd really like to get this VM up an running ASAP :P

 

 

 

Screen_Shot_2015-06-14_at_11_12.26_am.png.056722ac0ce4d308e2d39689343cf947.png

Screen_Shot_2015-06-14_at_11_25.14_am.png.9637efa4e6364c934dc356fc07e517ee.png

Link to comment

Update :

 

After some scratching around I've got a feeling that this has something to do with the keyboard that I'm attempting to pass through. 

 

It's a Dell USB keyboard with a couple of USB ports on the back.  I'm starting to suspect that it might have something to do with the inbuilt USB hub.

 

Does anyone have any experience with anything along these lines?

Link to comment

Yup - keyboard it was.  Simple trip down to the Supermarket (too late for the IT shop :P) and $20 on a elcheapo Logitech USB keyboard and we are off and running...

 

Good hunch, thanks for posting, I can imagine how much head scratching that would generate for me.

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.