previously at may 2017 I have configured a virtual qemu machine with a gpu passthrought of a radeon 5450, it works fine except a kernel panic (on VM) after the 2nd boot of the VM...
Now I am trying to remake this machine with the same configuration ( just 1-2 things different) formerly :
- Gigabyte GA-990-FXA-ud3
- AMD FX6300
- 1st graphic card : NVidia GT210
- 2nd graphic card : AMD Radeon HD5450
- debian 8
changes since :
- AMD FX8350
- 1st graphic card : NVidia GT710
(I know its a little bit outdated configuration but I am not a gamer so I do not need more)
I have written this startup script :
#/bin/sh
echo '0000:02:00.1' | tee /sys/bus/pci/devices/0000:02:00.1/driver/unbind
modprobe vfio
modprobe vfio_pci
echo 1002 68f9 | sudo tee /sys/bus/pci/drivers/vfio-pci/new_id
echo 1002 aa68 | sudo tee /sys/bus/pci/drivers/vfio-pci/new_id
qemu-system-x86_64 -M q35 -m 2048 -enable-kvm \
-bios OVMF.fd \
-device ioh3420,bus=pcie.0,addr=1c.0,multifunction=on,port=1,chassis=1,id=root.1 \
-soundhw ac97 \
-hda virtualrawdrive -cdrom ubuntuinstall.iso \
-device piix4-ide,bus=pcie.0,id=piix4-ide -device vfio-pci,host=02:00.0,bus=root.1,addr=00.0,multifunction=on -device vfio-pci,host=02:00.1,bus=pcie.0 \
-vnc :0
but Its not working, when I launch the script, 2nd graphic card VGA screen lights up, displays ubuntu plymouth screen, and after nothing, the screen stays on, but displays a black screen.
My lspci -nnk :
[...]
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GK208B [GeForce GT 710] [10de:128b] (rev a1)
Subsystem: Gigabyte Technology Co., Ltd GK208B [GeForce GT 710] [1458:36f7]
Kernel driver in use: nvidia
Kernel modules: nvidiafb, nouveau, nvidia_drm, nvidia
01:00.1 Audio device [0403]: NVIDIA Corporation GK208 HDMI/DP Audio Controller [10de:0e0f] (rev a1)
Subsystem: Gigabyte Technology Co., Ltd GK208 HDMI/DP Audio Controller [1458:36f7]
Kernel driver in use: snd_hda_intel
Kernel modules: snd_hda_intel
02:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Cedar [Radeon HD 5000/6000/7350/8350 Series] [1002:68f9]
Subsystem: Micro-Star International Co., Ltd. [MSI] Cedar [Radeon HD 5000/6000/7350/8350 Series] [1462:2127]
Kernel driver in use: vfio-pci
Kernel modules: radeon
02:00.1 Audio device [0403]: Advanced Micro Devices, Inc. [AMD/ATI] Cedar HDMI Audio [Radeon HD 5400/6300/7300 Series] [1002:aa68]
Subsystem: Micro-Star International Co., Ltd. [MSI] Cedar HDMI Audio [Radeon HD 5400/6300/7300 Series] [1462:aa68]
Kernel driver in use: vfio-pci
Kernel modules: snd_hda_intel
[...]
My former 2017 script :
echo '0000:02:00.1' | sudo tee /sys/bus/pci/devices/0000:02:00.1/driver/unbind
modprobe vfio
modprobe vfio_pci
echo 1002 68f9 | sudo tee /sys/bus/pci/drivers/vfio-pci/new_id
echo 1002 aa68 | sudo tee /sys/bus/pci/drivers/vfio-pci/new_id
qemu-system-x86_64 -enable-kvm -M q35 -m 2048 -cpu host -smp 2,sockets=1,cores=2,threads=1 \
-bios /usr/share/qemu/bios.bin \
-vga none -device ioh3420,bus=pcie.0,addr=1c.0,multifunction=on,port=1,chassis=1,id=root.1 \
-device piix4-ide,bus=pcie.0,id=piix4-ide -device vfio-pci,host=02:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on -device vfio-pci,host=02:00.1,bus=pcie.0 \
-soundhw ac97 \
-drive file=/home/user/ubuntuimage,id=disk,format=raw,if=none -device ide-hd,bus=piix4-ide.0,drive=disk
I think the problem comes from the "x-vga=on" option, but it not works on the new versions, I have got this error :
qemu-system-x86_64: -device vfio-pci,host=02:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on: vfio 0000:02:00.0: failed getting region info for VGA region index 8: Invalid argument
device does not support requested feature x-vga
I have try use a "fresh" version of qemu (4.0.0) and OVMF (compiled from the GIT sources) but It does not changes anything...
So thanks by advance for your aswers
PS : sorry for my bad english, I am french
according to last comment, I have installed the OS in emulated graphic card, then I reboot from gpu passtrought and everything works perfectly !
My start script :