virtualization - libvirt + qemu PCI passthrough and NVIDIA drivers not working on Ubuntu 16.04 - Ask Ubuntu


i've setup virtual machine nvidia graphics card passthrough, , after installing necessary drivers, lightdm session doesn't start (i can see greeter, user session doesn't start).

the machine's xml definition in libvirt following:

<domain type='kvm' id='8' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>   <name>ubuntu</name>   <uuid>63f0800e-73f8-27ac-59a0-791fc68f7e25</uuid>   <description>none</description>   <memory unit='kib'>4194304</memory>   <currentmemory unit='kib'>4194304</currentmemory>   <vcpu placement='static'>2</vcpu>   <resource>     <partition>/machine</partition>   </resource>   <os>     <type arch='x86_64' machine='pc-i440fx-xenial'>hvm</type>     <boot dev='hd'/>     <boot dev='cdrom'/>     <bootmenu enable='yes'/>   </os>   <features>     <acpi/>     <apic/>     <pae/>   </features>   <cpu mode='host-passthrough'>     <topology sockets='1' cores='2' threads='1'/>     <feature policy='require' name='abm'/>     <feature policy='require' name='pdpe1gb'/>     <feature policy='require' name='rdrand'/>     <feature policy='require' name='f16c'/>     <feature policy='require' name='osxsave'/>     <feature policy='require' name='pdcm'/>     <feature policy='require' name='xtpr'/>     <feature policy='require' name='tm2'/>     <feature policy='require' name='est'/>     <feature policy='require' name='vmx'/>     <feature policy='require' name='ds_cpl'/>     <feature policy='require' name='monitor'/>     <feature policy='require' name='dtes64'/>     <feature policy='require' name='pbe'/>     <feature policy='require' name='tm'/>     <feature policy='require' name='ht'/>     <feature policy='require' name='ss'/>     <feature policy='require' name='acpi'/>     <feature policy='require' name='ds'/>     <feature policy='require' name='vme'/>   </cpu>   <clock offset='utc'/>   <on_poweroff>destroy</on_poweroff>   <on_reboot>restart</on_reboot>   <on_crash>restart</on_crash>   <devices>     <emulator>/usr/bin/kvm-spice</emulator>     <disk type='file' device='disk'>       <driver name='qemu' type='qcow2'/>       <source file='/virtualstorage/vms/ubuntu.img'/>       <backingstore/>       <target dev='vda' bus='virtio'/>       <alias name='virtio-disk0'/>       <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>     </disk>     <disk type='file' device='cdrom'>       <driver name='qemu' type='raw'/>       <source file='/virtualstorage/iso/ubuntu-16.04.1-desktop-amd64.iso'/>       <backingstore/>       <target dev='hda' bus='ide'/>       <readonly/>       <alias name='ide0-1-1'/>       <address type='drive' controller='0' bus='1' target='0' unit='1'/>     </disk>     <controller type='ide' index='0'>       <alias name='ide'/>       <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>     </controller>     <controller type='usb' index='0'>       <alias name='usb'/>       <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>     </controller>     <controller type='pci' index='0' model='pci-root'>       <alias name='pci.0'/>     </controller>     <interface type='network'>       <mac address='52:54:00:40:2b:aa'/>       <source network='default' bridge='virbr0'/>       <target dev='vnet0'/>       <model type='virtio'/>       <alias name='net0'/>       <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>     </interface>     <serial type='pty'>       <source path='/dev/pts/0'/>       <target port='0'/>       <alias name='serial0'/>     </serial>     <console type='pty' tty='/dev/pts/0'>       <source path='/dev/pts/0'/>       <target type='serial' port='0'/>       <alias name='serial0'/>     </console>     <input type='tablet' bus='usb'>       <alias name='input0'/>     </input>     <input type='mouse' bus='ps2'/>     <input type='keyboard' bus='ps2'/>     <graphics type='vnc' port='5900' autoport='yes' listen='0.0.0.0'>       <listen type='address' address='0.0.0.0'/>     </graphics>     <video>       <model type='cirrus' vram='16384' heads='1'/>       <alias name='video0'/>       <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>     </video>     <hostdev mode='subsystem' type='pci' managed='yes'>       <driver name='vfio'/>       <source>         <address domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>       </source>       <alias name='hostdev0'/>       <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0' multifunction='on'/>     </hostdev>     <hostdev mode='subsystem' type='pci' managed='yes'>       <driver name='vfio'/>       <source>         <address domain='0x0000' bus='0x01' slot='0x00' function='0x1'/>       </source>       <alias name='hostdev1'/>       <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x1'/>     </hostdev>     <memballoon model='none'>       <alias name='balloon0'/>     </memballoon>   </devices>   <qemu:commandline>     <qemu:arg value='-vga'/>     <qemu:arg value='none'/>   </qemu:commandline> </domain> 

installed nvidia driver nvidia-linux-x86_64-367.57.

dmesg | grep -i nvidia:  [    1.263194] nvidia: module license 'nvidia' taints kernel. [    1.266276] nvidia: module verification failed: signature and/or required key missing - tainting kernel [    1.330297] nvidia-nvlink: nvlink core being initialized, major device number 247 [    1.330312] nvrm: loading nvidia unix x86_64 kernel module  367.57  mon oct  3 20:37:01 pdt 2016 [    1.407850] nvidia-modeset: loading nvidia kernel mode setting driver unix platforms  367.57  mon oct  3 20:32:57 pdt 2016 [    1.424992] [drm] [nvidia-drm] [gpu id 0x00000006] loading driver [    2.078662] input: hda nvidia hdmi/dp,pcm=3 /devices/pci0000:00/0000:00:06.1/sound/card0/input6 [    2.078733] input: hda nvidia hdmi/dp,pcm=7 /devices/pci0000:00/0000:00:06.1/sound/card0/input7 [    2.078794] input: hda nvidia hdmi/dp,pcm=8 /devices/pci0000:00/0000:00:06.1/sound/card0/input8 [    2.078832] input: hda nvidia hdmi/dp,pcm=9 /devices/pci0000:00/0000:00:06.1/sound/card0/input9 

thanks in advance.


Comments

Popular posts from this blog

download - Firefox cannot save files (most of the time), how to solve? - Super User

windows - "-2146893807 NTE_NOT_FOUND" when repair certificate store - Super User