Jump to content
We're Hiring! Full Stack Developer ×

Problem with VM and PCIe Passthrough [Solved]


Brainsalad

Recommended Posts

Hardware specs:

 

Mainboard : Intel DQ35JO socket 775

CPU : Core 2 Duo E8500

Ram :  4 GB 677 DDR2

External GPU : Radeon HD 5450 1GB

Hard Drive : Toshiba DT01ACA100 1TB

IOMMU and HVM enabled

 

So I ran into a Problem when I was trying to configure a NAS-MediaCenter Combo PC. The Problem is that I can´t get the Windows 10 VM to run/start. Everytime I try to create and start a new one I get the following Error:

 

Execution error

internal error: early end of file from monitor: possible problem:

2016-01-29T12:01:40.658637Z qemu-system-x86_64: -device vfio-pci,host=01:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on: vfio: failed to set iommu for container: Operation not permitted

2016-01-29T12:01:40.658703Z qemu-system-x86_64: -device vfio-pci,host=01:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on: vfio: failed to setup container for group 1

2016-01-29T12:01:40.658715Z qemu-system-x86_64: -device vfio-pci,host=01:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on: vfio: failed to get group 1

2016-01-29T12:01:40.658730Z qemu-system-x86_64: -device vfio-pci,host=01:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on: Device initialization failed

2016-01-29T12:01:40.658744Z qemu-system-x86_64: -device vfio-pci,host=01:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on: Device 'vfio-pci' could not be initialized

 

 

 

This is my XML:

 

 

<domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>

  <name>Win10</name>

  <uuid>8fd42ed3-96db-fbb4-dadf-29fa6cb09328</uuid>

  <metadata>

    <vmtemplate name="Custom" icon="windows.png" os="windows"/>

  </metadata>

  <memory unit='KiB'>2621440</memory>

  <currentMemory unit='KiB'>2621440</currentMemory>

  <memoryBacking>

    <nosharepages/>

    <locked/>

  </memoryBacking>

  <vcpu placement='static'>1</vcpu>

  <cputune>

    <vcpupin vcpu='0' cpuset='0'/>

  </cputune>

  <os>

    <type arch='x86_64' machine='pc-i440fx-2.3'>hvm</type>

  </os>

  <features>

    <acpi/>

    <apic/>

    <hyperv>

      <relaxed state='on'/>

      <vapic state='on'/>

      <spinlocks state='on' retries='8191'/>

    </hyperv>

  </features>

  <cpu mode='host-passthrough'>

    <topology sockets='1' cores='1' threads='1'/>

  </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/bin/qemu-system-x86_64</emulator>

    <disk type='file' device='disk'>

      <driver name='qemu' type='raw' cache='writeback'/>

      <source file='/mnt/user/vdisks/Win10/vdisk1.img'/>

      <target dev='hdc' bus='virtio'/>

      <boot order='1'/>

      <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/Windows10.iso'/>

      <target dev='hda' bus='ide'/>

      <readonly/>

      <boot order='2'/>

      <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.102.iso'/>

      <target dev='hdb' bus='ide'/>

      <readonly/>

      <address type='drive' controller='0' bus='0' target='0' unit='1'/>

    </disk>

    <controller type='usb' index='0'>

      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' 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:ab:e0:32'/>

      <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='bind' path='/var/lib/libvirt/qemu/channel/target/Win10.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='0x00' slot='0x05' function='0x0'/>

    </memballoon>

  </devices>

  <qemu:commandline>

    <qemu:arg value='-device'/>

    <qemu:arg value='ioh3420,bus=pci.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=root.1,addr=00.0,multifunction=on,x-vga=on'/>

    <qemu:arg value='-device'/>

    <qemu:arg value='vfio-pci,host=01:00.1,bus=root.1,addr=00.1'/>

  </qemu:commandline>

</domain>

 

 

I searched on the Internet for a solution but I can´t find one that solves the Problem for me.

Would be great if you could help me. Thank you beforehand.

 

 

Brian

 

Link to comment

Here you have it.

 

/sys/kernel/iommu_groups/0/devices/0000:00:00.0

/sys/kernel/iommu_groups/1/devices/0000:00:01.0

/sys/kernel/iommu_groups/2/devices/0000:00:02.0

/sys/kernel/iommu_groups/2/devices/0000:00:02.1

/sys/kernel/iommu_groups/3/devices/0000:00:03.0

/sys/kernel/iommu_groups/4/devices/0000:00:19.0

/sys/kernel/iommu_groups/5/devices/0000:00:1a.0

/sys/kernel/iommu_groups/5/devices/0000:00:1a.1

/sys/kernel/iommu_groups/5/devices/0000:00:1a.2

/sys/kernel/iommu_groups/5/devices/0000:00:1a.7

/sys/kernel/iommu_groups/6/devices/0000:00:1b.0

/sys/kernel/iommu_groups/7/devices/0000:00:1c.0

/sys/kernel/iommu_groups/7/devices/0000:00:1c.1

/sys/kernel/iommu_groups/7/devices/0000:00:1c.2

/sys/kernel/iommu_groups/7/devices/0000:00:1c.3

/sys/kernel/iommu_groups/7/devices/0000:00:1c.4

/sys/kernel/iommu_groups/8/devices/0000:00:1d.0

/sys/kernel/iommu_groups/8/devices/0000:00:1d.1

/sys/kernel/iommu_groups/8/devices/0000:00:1d.2

/sys/kernel/iommu_groups/8/devices/0000:00:1d.7

/sys/kernel/iommu_groups/9/devices/0000:00:1e.0

/sys/kernel/iommu_groups/9/devices/0000:07:03.0

/sys/kernel/iommu_groups/10/devices/0000:00:1f.0

/sys/kernel/iommu_groups/10/devices/0000:00:1f.2

/sys/kernel/iommu_groups/10/devices/0000:00:1f.3

 

I tried turning on ACS Override and now I am getting this error:

 

Hook script execution failed: internal error: Child process (LC_ALL=C PATH=/bin:/sbin:/usr/bin:/usr/sbin HOME=/ /etc/libvirt/hooks/qemu Win10 start begin -) unexpected exit status 1: Failed to bind device 01:00.0 to vfio-pci driver

 

And thank you that you are trying to help me.

 

 

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...