Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
PCI passthrough - VFIO and QEMU.
View unanswered posts
View posts from last 24 hours

Goto page 1, 2, 3  Next  
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
Kresp
Tux's lil' helper
Tux's lil' helper


Joined: 17 Oct 2016
Posts: 77

PostPosted: Tue Apr 25, 2017 2:12 pm    Post subject: PCI passthrough - VFIO and QEMU. Reply with quote

I'm trying to pass GTX 960 GPU to WIn7 VM.
Currently I'm running single-GPU setup to simplify, since my motherboard lumps both GPU slots into one IOMMU group.

I'm trying to follow this:
https://wiki.archlinux.org/index.php/PCI_passthrough_via_OVMF#Setting_up_IOMMU
https://wiki.installgentoo.com/index.php/PCI_passthrough

This is my IOMMU 2 group with GPU:
Code:

IOMMU group 2
   00:03.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Device [1022:1452]
   00:03.1 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Device [1022:1453]
   25:00.0 VGA compatible controller [0300]: NVIDIA Corporation GM206 [GeForce GTX 960] [10de:1401] (rev a1)
   25:00.1 Audio device [0403]: NVIDIA Corporation Device [10de:0fba] (rev a1)

I blacklisted nouveau and snd_hda_intel and added following to /etc/modprobe.d/vfio.conf:
Code:

options vfio-pci ids=10de:1401,10de:0fba


After reboot, PC does not init KMS mode anymore but there's still boot log in fallback VGA mode.
Now I ssh into the computer from another machine. Turns out, gpu device does not have any modules loaded. So I do modprobe vfio-pci, which loads correctly for both video and audio devices.
At this point monitor freezes (login prompt stops blinking).

Now, I try to launch qemu with following arguments (VM itself is ok, it normally runs fine with qemu VGA adapter without the last three lines):
Code:

qemu-system-x86_64 \
        -drive file=~/vm/win7.qcow2,if=virtio \
        \
        -enable-kvm \
        -cpu host,kvm=off \
        -smp cpus=8,maxcpus=8,cores=8,threads=1,sockets=1 \
        \
        -m 16384 \
        \
        -device vfio-pci,host=25:00.0,x-vga=on \
        -device vfio-pci,host=25:00.1 \
        -vga none

It complains about gtk (X is not running), so I re-emerge with -gtk -vte.

By this point VM launches and judging by htop stats, boots fine. However, display still shows frozen boot log.

Now, if I go back and revert everything, then I can not use this VM with qemu VGA adapter until I re-emerge package with +gtk again.

I tried adding video=efifb:off to GRUB kernel line. Now boot log stops after the following (but it changes nothing else):
Code:

Loading Linux 4.10.6-gentoo ...
Loading initial ramdisk ...
Back to top
View user's profile Send private message
Myu
Apprentice
Apprentice


Joined: 22 Oct 2014
Posts: 164
Location: Belgium

PostPosted: Tue Apr 25, 2017 4:34 pm    Post subject: Reply with quote

Hello !

I wish I could be able to help (I also run a Gentoo/VFIO setup, here with Intel HD + GTX750 Ti) but I don't really have any knowledge about a single GPU passthrough, it indeed add quite a bit of complexity to the debugging.

That being said, a few things :

- Do you boot your VM with EFI ? Afaik you'll have better results with that instead of BIOS (the general idea is that pci-stub+BIOS = old method, UEFI + VFIO = new)

- You should make sure your card loads the vfio_pci module at boot time, perhaps the modules service is not started at boot time ? Check rc-config list

- Also regarding the modules service : /etc/conf.d/modules, this file contains this on my end (among other commented things) :

Code:

modules="vfio vfio-pci vfio_iommu_type1 vfio_virqfd"


- A very good source of information and help is available at https://reddit.com/r/vfio "lots" (relatively speaking :mrgreen: ) of people with working setups.

Let me know if I can help you further, I've some docs but aimed at and Intel/Nvidia setup.

Cheers,

- Myu
_________________
Gentoo stable with bits of ~amd64 // Xfce 4.13 + Compiz Reloaded.
Back to top
View user's profile Send private message
Kresp
Tux's lil' helper
Tux's lil' helper


Joined: 17 Oct 2016
Posts: 77

PostPosted: Tue Apr 25, 2017 11:11 pm    Post subject: Reply with quote

Code:
$ rc-config list | grep -i modules
  modules                   boot
  modules-load


I currently use Seabios. Where do I get OVMF binaries? It does not seem to be in the portage overlay.
Back to top
View user's profile Send private message
Myu
Apprentice
Apprentice


Joined: 22 Oct 2014
Posts: 164
Location: Belgium

PostPosted: Wed Apr 26, 2017 5:30 am    Post subject: Reply with quote

I've grabbed mine from the builds available there : https://www.kraxel.org/repos/jenkins/edk2/, specifically the edk2.git-ovmf-x64-0-*.noarch.rpm
_________________
Gentoo stable with bits of ~amd64 // Xfce 4.13 + Compiz Reloaded.
Back to top
View user's profile Send private message
Kresp
Tux's lil' helper
Tux's lil' helper


Joined: 17 Oct 2016
Posts: 77

PostPosted: Sat Apr 29, 2017 7:32 am    Post subject: Reply with quote

So, I grabbed UEFI Win7 installation, and reinstalled it with OVMF efi.

Now, when I start VM, monitor instead of keeping frozen bootlog, blackens out and goes to standy mode (as if PC is powered down).
Qemu reports that it failed to mmap to device ID.

So I grep'd over /proc/iomem and found out that efifb is holding some of device memory.
After recompiling without FB_EFI, this warning is gone, but monitor still does not display a thing.
Back to top
View user's profile Send private message
archenroot
Apprentice
Apprentice


Joined: 13 Dec 2011
Posts: 218
Location: Lake Macha, Czech republic

PostPosted: Mon Sep 18, 2017 8:41 pm    Post subject: Reply with quote

It should be worth to write an article on Gentoo wiki about this. I tried some time ago on laptop without luck.
_________________
Emperor wants to control outer space Yoda wants to explore inner space that's the fundamental difference between good and bad sides of the Force
Back to top
View user's profile Send private message
Quazil
n00b
n00b


Joined: 08 Jun 2016
Posts: 10

PostPosted: Sat Sep 30, 2017 2:51 pm    Post subject: Reply with quote

Windows 7 is particularly difficult to install with GPU pass-through.
I have not gotten Windows 7 to work. I ended up going to Windows 10.

> After reboot, PC does not init KMS mode anymore but there's still boot log in fallback VGA mode.

Yeah you can't do that.
You'd have to boot the host OS in headless mode if you only have 1 video card.

The other video device does not have to be a GPU but whatever it is, you have to boot using it.
Back to top
View user's profile Send private message
dylanmc
Apprentice
Apprentice


Joined: 18 Apr 2014
Posts: 157
Location: Modena, Italy

PostPosted: Sun Dec 10, 2017 7:40 pm    Post subject: Reply with quote

Hi to all, I've bought a new pc and I want to get VGA passtrought to work.
I've two gpus, and I want to buy a new monitor with two hdmi ports, in order to bypass the two monitor space problem.

I'm read some guides, but for other distros.

Code:
luca@snoopx ~ $ dmesg |grep IOMMU
[    0.288498] AMD-Vi: IOMMU performance counters supported
[    0.289165] AMD-Vi: Found IOMMU at 0000:00:00.2 cap 0x40
[    0.289894] perf/amd_iommu: Detected AMD IOMMU #0 (2 banks, 4 counters/bank).
[    0.302138] AMD IOMMUv2 driver by Joerg Roedel <jroedel@suse.de>

luca@snoopx ~ $ lsmod
Module                  Size  Used by
vboxdrv               372736  0
nvidia_modeset        843776  9
vfio_pci               40960  0
vfio_virqfd            16384  1 vfio_pci
vfio_iommu_type1       24576  0
vfio                   28672  2 vfio_iommu_type1,vfio_pci
tuner_xc2028           32768  1
zl10353                16384  1
em28xx_dvb             36864  0
hid_generic            16384  0
kvm_amd              2166784  0
kvm                   368640  1 kvm_amd
irqbypass              16384  2 kvm,vfio_pci
em28xx                 90112  1 em28xx_dvb
tveeprom               24576  1 em28xx
usbhid                 32768  0
hid                   110592  3 hid_generic,usbhid
nvidia              13107200  1159 nvidia_modeset
nvidia_drm             16384  0


I've read that if all works fine, virt-pci will be in use by my gpu passtrought card, but I didin't see it.

Code:
lspci -nnv
3:00.0 VGA compatible controller [0300]: NVIDIA Corporation GM200 [GeForce GTX 980 Ti] [10de:17c8] (rev a1) (prog-if 00 [VGA controller])
        Subsystem: Gigabyte Technology Co., Ltd GM200 [GeForce GTX 980 Ti] [1458:36b6]
        Flags: bus master, fast devsel, latency 0, IRQ 45
        Memory at f6000000 (32-bit, non-prefetchable) [size=16M]
        Memory at d0000000 (64-bit, prefetchable) [size=256M]
        Memory at e0000000 (64-bit, prefetchable) [size=32M]
        I/O ports at f000 [size=128]
        [virtual] Expansion ROM at 000c0000 [disabled] [size=128K]
        Capabilities: [60] Power Management version 3
        Capabilities: [68] MSI: Enable+ Count=1/1 Maskable- 64bit+
        Capabilities: [78] Express Legacy Endpoint, MSI 00
        Kernel driver in use: nvidia
        Kernel modules: nvidiafb, nvidia_drm, nvidia


Virt manager says that all ok
Code:


noopx luca # virt-host-validate
  QEMU: Checking for hardware virtualization                                 : PASS
  QEMU: Checking if device /dev/kvm exists                                   : PASS
  QEMU: Checking if device /dev/kvm is accessible                            : PASS
  QEMU: Checking if device /dev/vhost-net exists                             : PASS
  QEMU: Checking if device /dev/net/tun exists                               : PASS
  QEMU: Checking for cgroup 'memory' controller support                      : PASS
  QEMU: Checking for cgroup 'memory' controller mount-point                  : PASS
  QEMU: Checking for cgroup 'cpu' controller support                         : PASS
  QEMU: Checking for cgroup 'cpu' controller mount-point                     : PASS
  QEMU: Checking for cgroup 'cpuacct' controller support                     : PASS
  QEMU: Checking for cgroup 'cpuacct' controller mount-point                 : PASS
  QEMU: Checking for cgroup 'cpuset' controller support                      : PASS
  QEMU: Checking for cgroup 'cpuset' controller mount-point                  : PASS
  QEMU: Checking for cgroup 'devices' controller support                     : PASS
  QEMU: Checking for cgroup 'devices' controller mount-point                 : PASS
  QEMU: Checking for cgroup 'blkio' controller support                       : PASS
  QEMU: Checking for cgroup 'blkio' controller mount-point                   : PASS
  QEMU: Checking for device assignment IOMMU support                         : PASS
  QEMU: Checking if IOMMU is enabled by kernel                               : PASS
snoopx luca #



any suggestion?
Back to top
View user's profile Send private message
Myu
Apprentice
Apprentice


Joined: 22 Oct 2014
Posts: 164
Location: Belgium

PostPosted: Sun Dec 10, 2017 8:12 pm    Post subject: Reply with quote

Hello dylanmc,

Code:

Kernel driver in use: nvidia


It seems that your 980 is currently using the nvidia driver while it should use the vfio-pci one

Did you added the various ID's to /etc/motdporbe.d/vfio.conf ? here's mine for reference :

Code:
cat /etc/modprobe.d/vfio.conf
options vfio-pci ids=10de:1380,10de:0fbc,8086:1e20


Here's the longer version on how to isolate the GPU :

Get your vendor-id :

lspci | grep -i vga

> note down the first number, it is the slot number i.e 01:00.0

lspci -nns 01:00.0

> Note down the last number between "[]", this is the vendor-id, i.e 10de:1380

lspci -nnk -d vendor-id

Edit `/etc/modprobe.d/vfio.conf` with the vendor-id from your GPU you want to isolate gathered from the previous command, in this __example__, the vendor-id is __10de:13c2__ for the GPU and __10de:0fbb__ for the audio

options vfio-pci ids=10de:13c2,10de:0fbb

Add these modules to `/etc/conf.d/modules` (Gentoo/OpenRC specific)

modules="vfio vfio-pci vfio_iommu_type1 vfio_virqfd"

module loading at boot is enabled by

rc-update add modules boot

Hope this helps :)
_________________
Gentoo stable with bits of ~amd64 // Xfce 4.13 + Compiz Reloaded.
Back to top
View user's profile Send private message
dylanmc
Apprentice
Apprentice


Joined: 18 Apr 2014
Posts: 157
Location: Modena, Italy

PostPosted: Sun Dec 10, 2017 8:57 pm    Post subject: Reply with quote

Thanks for the reply, but I sill don't understand where do you get

Code:
8086:1e20
in your /etc/conf.d/vfio.conf

That's mine

Code:
luca@snoopx ~ $ cat /etc/modprobe.d/vfio.conf
options vfio-pci ids=10de:17c8,10de:0fb0


where 17c8 is for the video, 0fb0 for the audio.

Infact, the driver in use for my 980ti is still the nvidia one kernel driver.
Back to top
View user's profile Send private message
dylanmc
Apprentice
Apprentice


Joined: 18 Apr 2014
Posts: 157
Location: Modena, Italy

PostPosted: Sun Dec 10, 2017 8:59 pm    Post subject: Reply with quote

my lsmod

Code:
luca@snoopx ~ $ lsmod
Module                  Size  Used by
nvidia_modeset        843776  8
vfio_pci               40960  0
vfio_virqfd            16384  1 vfio_pci
vfio_iommu_type1       24576  0
vfio                   28672  2 vfio_iommu_type1,vfio_pci
vboxpci                24576  0
vboxnetadp             28672  0
vboxnetflt             28672  0
vboxdrv               372736  3 vboxnetadp,vboxnetflt,vboxpci
tuner_xc2028           32768  1
zl10353                16384  1
em28xx_dvb             36864  0
hid_generic            16384  0
kvm_amd              2166784  0
kvm                   368640  1 kvm_amd
irqbypass              16384  2 kvm,vfio_pci
em28xx                 90112  1 em28xx_dvb
tveeprom               24576  1 em28xx
usbhid                 32768  0
hid                   110592  3 hid_generic,usbhid
nvidia              13107200  878 nvidia_modeset
nvidia_drm             16384  0
Back to top
View user's profile Send private message
Myu
Apprentice
Apprentice


Joined: 22 Oct 2014
Posts: 164
Location: Belgium

PostPosted: Sun Dec 10, 2017 9:05 pm    Post subject: Reply with quote

Ah, nevermind the 8086:1e20, it's the MB audio chipset that I'm passing through to the VM as well, nothing to do with the GPU :)

So if you reboot your Gentoo, the nvidia driver get picked up even with vfio properly set to load at boot time ? (i.e the part of my previous post with /etc/conf.d/modules)

What does dmesg | grep -i vfio gives ? A proper isolation should look like this :
Code:

[    1.886071] vfio_pci: add [10de:1380[ffff:ffff]] class 0x000000/00000000
[    1.898075] vfio_pci: add [10de:0fbc[ffff:ffff]] class 0x000000/00000000
[    1.911066] vfio_pci: add [8086:1e20[ffff:ffff]] class 0x000000/00000000


Are you sure you're properly booting to the second card when that happens ?
_________________
Gentoo stable with bits of ~amd64 // Xfce 4.13 + Compiz Reloaded.
Back to top
View user's profile Send private message
dylanmc
Apprentice
Apprentice


Joined: 18 Apr 2014
Posts: 157
Location: Modena, Italy

PostPosted: Sun Dec 10, 2017 9:18 pm    Post subject: Reply with quote

Code:
snoopx luca #  dmesg | grep -i vfio
[    0.000000] Command line: BOOT_IMAGE=4.13.13 ro root=/dev/sda3 rootfstype=ext4 iommu=1 amd_iommu=on rd.driver.pre=vfio-pci
[    0.000000] Kernel command line: BOOT_IMAGE=4.13.13 ro root=/dev/sda3 rootfstype=ext4 iommu=1 amd_iommu=on rd.driver.pre=vfio-pci
[    3.861433] VFIO - User Level meta-driver version: 0.3
[    3.870849] vfio_pci: add [10de:17c8[ffff:ffff]] class 0x000000/00000000
[    3.870851] vfio_pci: add [10de:0fb0[ffff:ffff]] class 0x000000/00000000


It seems fine.

Quote:
Are you sure you're properly booting to the second card when that happens ?


Actually I'm still booting with the primary device card, the GT980ti.
If I have understood well, I've to plug my monitor to the 710 nvidia card, and I will get my GPU 980ti isolated? (and with the vfio-pci module ,loaded instead of the nvidia one?)
Back to top
View user's profile Send private message
Myu
Apprentice
Apprentice


Joined: 22 Oct 2014
Posts: 164
Location: Belgium

PostPosted: Mon Dec 11, 2017 12:57 pm    Post subject: Reply with quote

Quote:
Actually I'm still booting with the primary device card, the GT980ti.


It shouldn't be the case if you wish to isolate that card, you'll have to set your BIOS/UEFI to boot to the 710 and hook it to a monitor, yes.
_________________
Gentoo stable with bits of ~amd64 // Xfce 4.13 + Compiz Reloaded.
Back to top
View user's profile Send private message
dylanmc
Apprentice
Apprentice


Joined: 18 Apr 2014
Posts: 157
Location: Modena, Italy

PostPosted: Mon Dec 11, 2017 8:00 pm    Post subject: Reply with quote

I'm ok with it.
But I've tried to isolate de 710b, and I have booted as usual from the 980ti.

I still get that the two cards are managed by the nvidia driver.

Maybe the nvidiafb can create issues?
I've to create an initramfs?

PS: i'm still using lilo, but I don't think is the problem.
Back to top
View user's profile Send private message
Myu
Apprentice
Apprentice


Joined: 22 Oct 2014
Posts: 164
Location: Belgium

PostPosted: Mon Dec 11, 2017 8:06 pm    Post subject: Reply with quote

Good question(s), I'm not super knowledgable about a setup with two nvidia cards but yeah, if you can scratch nvidiafb from the equation, that might help.

Also, can you clarify what card is set to primary on your BIOS/UEFI ?

I'm not using an initramfs personally.
_________________
Gentoo stable with bits of ~amd64 // Xfce 4.13 + Compiz Reloaded.
Back to top
View user's profile Send private message
dylanmc
Apprentice
Apprentice


Joined: 18 Apr 2014
Posts: 157
Location: Modena, Italy

PostPosted: Mon Dec 11, 2017 8:19 pm    Post subject: Reply with quote

Code:
Also, can you clarify what card is set to primary on your BIOS/UEFI ?


In my bios I don't find any type of settings about which card is set to primary or else.

The nvidia-fb was already blacklisted,because he was blocking my system to recognize the two nvidia cards (with nvidafb I see only the 980ti)

mybee I have to load vfio-pci before the nvidia one?
Bit I don't know to do it.. :/
Back to top
View user's profile Send private message
Myu
Apprentice
Apprentice


Joined: 22 Oct 2014
Posts: 164
Location: Belgium

PostPosted: Mon Dec 11, 2017 8:28 pm    Post subject: Reply with quote

Quote:
In my bios I don't find any type of settings about which card is set to primary or else.


Ah, then it's likely determined by where you plug it (the PCIe port), there has to be a kind of "master" one to figure out.

As far as I know, adding the proper ID's to /etc/modprobe.d/vfio.conf instruct the vfio_pci kernel module to be loaded on the GPU instead of nvidia.

Is the module "service" properly set to load at boot time ? If you're on OpenRC, you can check with :

Code:
# rc-config list | grep module
  modules                   boot
  modules-load


I would recheck this step (again OpenRC specific, adjust if you're on systemd) :

Add these modules to /etc/conf.d/modules

Code:
    modules="vfio vfio-pci vfio_iommu_type1 vfio_virqfd"


module loading at boot is enabled by

Code:
        rc-update add modules boot


Hope this helps !
_________________
Gentoo stable with bits of ~amd64 // Xfce 4.13 + Compiz Reloaded.
Back to top
View user's profile Send private message
dylanmc
Apprentice
Apprentice


Joined: 18 Apr 2014
Posts: 157
Location: Modena, Italy

PostPosted: Mon Dec 11, 2017 8:41 pm    Post subject: Reply with quote

Code:
snoopx luca # rc-config list | grep module
  modules                   boot
  modules-load


Modules loading is enabled, I load also the modules for virtualbox.
I don't think that those modules conflict with vfio-pci.

Quote:
As far as I know, adding the proper ID's to /etc/modprobe.d/vfio.conf instruct the vfio_pci kernel module to be loaded on the GPU instead of nvidia.


I'm sure I'm passing the corect IDS to the vfio-pici mdules, but all the two cards are with the nvidia module :(
Back to top
View user's profile Send private message
dylanmc
Apprentice
Apprentice


Joined: 18 Apr 2014
Posts: 157
Location: Modena, Italy

PostPosted: Mon Dec 11, 2017 8:46 pm    Post subject: Reply with quote

Another thing

If I execute

Code:
noopx luca # modinfo vfio-pci
filename:       /lib/modules/4.13.13-gentoo/kernel/drivers/vfio/pci/vfio-pci.ko
description:    VFIO PCI - User Level meta-driver
author:         Alex Williamson <alex.williamson@redhat.com>
license:        GPL v2
version:        0.2
srcversion:     DB8F55EC2187EC83F7E71EA
depends:        vfio,irqbypass,vfio_virqfd
intree:         Y
name:           vfio_pci
vermagic:       4.13.13-gentoo SMP mod_unload
parm:           ids:Initial PCI IDs to add to the vfio driver, format is "[b]vendor:device[:subvendor[:subdevice[:class[:class_mask[/b]]]]]" and multiple comma separated entries can be specified (string)
parm:           nointxmask:Disable support for PCI 2.3 style INTx masking.  If this resolves problems for specific devices, report lspci -vvvxxx to linux-pci@vger.kernel.org so the device can be fixed automatically via the broken_intx_masking flag. (bool)
parm:           disable_vga:Disable VGA resource access through vfio-pci (bool)
parm:           disable_idle_d3:Disable using the PCI D3 low power state for idle, unused devices (bool)


maybe I can try adding subvendor/subdevice ?
Back to top
View user's profile Send private message
dylanmc
Apprentice
Apprentice


Joined: 18 Apr 2014
Posts: 157
Location: Modena, Italy

PostPosted: Mon Dec 11, 2017 9:00 pm    Post subject: Reply with quote

Finally I got this working.

I've do this

Code:
options vfio-pci ids=10de:128b,10de:0e0f
softdep nvdia pre: vfio-pci
softdep nvidia_modeset pre: vfio-pci
softdep nvidia_drm pre: vfio-pci


in the file /etc/conf.d/vfio.conf

and this

Code:

mage=/boot/vmlinuz-4.13.13-gentoo
  label=4.13.13
  read-only
  append="root=/dev/sda3 rootfstype=ext4 iommu=1 amd_iommu=on rd.driver.pre=[b]vfio-pci.ids=10de:128b,10de:0e0f[/b]"


in /etc/lilo.conf

Code:
22:00.0 VGA compatible controller [0300]: NVIDIA Corporation GK208 [GeForce GT 710B] [10de:128b] (rev a1) (prog-if 00 [VGA controller])
        Subsystem: ASUSTeK Computer Inc. GK208 [GeForce GT 710B] [1043:8576]
        Flags: fast devsel, IRQ 11
        Memory at f4000000 (32-bit, non-prefetchable) [disabled] [size=16M]
        Memory at e8000000 (64-bit, prefetchable) [disabled] [size=128M]
        Memory at f0000000 (64-bit, prefetchable) [disabled] [size=32M]
        I/O ports at d000 [disabled] [size=128]
        Expansion ROM at f5000000 [disabled] [size=512K]
        Capabilities: [60] Power Management version 3
        Capabilities: [68] MSI: Enable- Count=1/1 Maskable- 64bit+
        Capabilities: [78] Express Legacy Endpoint, MSI 00
        Kernel driver in use:[b] vfio-pci[/b]
        Kernel modules: nvidiafb, nvidia_drm, nvidia


Thanks for the help! now I have to set qemu, but I have to buy a second monitor first.
For emulation, do you use virt-manager or a line command qemu?
Back to top
View user's profile Send private message
Myu
Apprentice
Apprentice


Joined: 22 Oct 2014
Posts: 164
Location: Belgium

PostPosted: Mon Dec 11, 2017 9:46 pm    Post subject: Reply with quote

Cool, I'm glad you managed to get it working and took the time to document it here :)

I personally use virt-manager, it provide a nice abstraction to the qemu cli, making it easy to select your 980 once it's binded to the vfio_pci driver but also other components (HD Audio, ...)

Many ofther vfio users are using virt-manager so there's quite some documentation available (see reddit.com/r/vfio)

There's a few quirks regarding setting up Windows with a nvidia card since nvidia basically doesn't want you to do that and throws an infamous error 43, you have to hide the fact you're using an hypervisor with this (if you're using virt-manger)

Code:
# virsh edit vm_name


Add inside the <features> </features> tag :

Code:

    <kvm>
      <hidden state='on'/>
    </kvm>


Happy setup !
_________________
Gentoo stable with bits of ~amd64 // Xfce 4.13 + Compiz Reloaded.
Back to top
View user's profile Send private message
dylanmc
Apprentice
Apprentice


Joined: 18 Apr 2014
Posts: 157
Location: Modena, Italy

PostPosted: Mon Dec 11, 2017 10:22 pm    Post subject: Reply with quote

The next step is create a virbr0, virt-manager is asking me for setting up a new vm.


I've to isolate also the network interface?
Back to top
View user's profile Send private message
Myu
Apprentice
Apprentice


Joined: 22 Oct 2014
Posts: 164
Location: Belgium

PostPosted: Tue Dec 12, 2017 6:09 am    Post subject: Reply with quote

It's up to you for the networking, you can setup a bridge like virbr0 or if you have the hardware, you can passthrough a wifi dongle, an ethernet adapter, ...
_________________
Gentoo stable with bits of ~amd64 // Xfce 4.13 + Compiz Reloaded.
Back to top
View user's profile Send private message
dylanmc
Apprentice
Apprentice


Joined: 18 Apr 2014
Posts: 157
Location: Modena, Italy

PostPosted: Sun Dec 17, 2017 12:28 pm    Post subject: Reply with quote

Now I'm tryng to start a WM, with virt manager but I get some errors :(

I'f I select "customize installation" I get this error

Code:
Errore nell'avvio dell'installazione: 'nome-mv'

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/create.py", line 2199, in _finish_clicked
    self._show_customize_dialog(guest)
  File "/usr/share/virt-manager/virtManager/create.py", line 2230, in _show_customize_dialog
    self._customize_window = vmmDetails(virtinst_guest, self.topwin)
  File "/usr/share/virt-manager/virtManager/details.py", line 363, in __init__
    self.console = vmmConsolePages(self.vm, self.builder, self.topwin)
  File "/usr/share/virt-manager/virtManager/console.py", line 128, in __init__
    self._change_title()
  File "/usr/share/virt-manager/virtManager/console.py", line 291, in _change_title
    "connection-name": self.vm.conn.get_pretty_desc(),
KeyError: 'nome-mv'


I'm not sure, but I think it's a python error :(
[/code]
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Goto page 1, 2, 3  Next
Page 1 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum