It is exactly what I have done,But I can't start himThis confirm that you didn't set properly:
GRUB_CMDLINE_LINUX_DEFAULT="quiet amd_iommu=on iommu=pt nomodeset textonly video=vesafb:off video=efifb:off"
Remember todo all the steps
It is exactly what I have done,But I can't start himThis confirm that you didn't set properly:
GRUB_CMDLINE_LINUX_DEFAULT="quiet amd_iommu=on iommu=pt nomodeset textonly video=vesafb:off video=efifb:off"
Remember todo all the steps
Wow, that way AMD's core graphics can't be used for passthroughYou can check which kernel parameters are passed usingcat /proc/cmdline
. It also depends on the bootloader.
Note thatamd_iommu=on
is not needed (and actually invalid),iommu=pt
probably does not what you think it does. And doesnomodeset textonly
actually do anything when turinng offvesafb
andefifb
(and maybe blacklistingamdgpu
)?
As far as I know, nobody has much luck with passthrough of the built-in GPU of a Ryzen APU but maybe I have just missed it. Can anyone point to a success story on the internet?
Can you post the output of:It is exactly what I have done,But I can't start him
cat /boot/grub/grub.cfg | grep nomode
Can you post the output of:
cat /boot/grub/grub.cfg | grep nomode
root@pve:~# cat /boot/grub/grub.cfg | grep nomode
linux /boot/vmlinuz-5.13.19-2-pve root=/dev/mapper/pve-root ro quiet amd_iommu=on iommu=pt nomodeset textonly video=vesafb:off video=efifb:off
linux /boot/vmlinuz-5.13.19-2-pve root=/dev/mapper/pve-root ro quiet amd_iommu=on iommu=pt nomodeset textonly video=vesafb:off video=efifb:off
Ok perfect.Code:root@pve:~# cat /boot/grub/grub.cfg | grep nomode linux /boot/vmlinuz-5.13.19-2-pve root=/dev/mapper/pve-root ro quiet amd_iommu=on iommu=pt nomodeset textonly video=vesafb:off video=efifb:off linux /boot/vmlinuz-5.13.19-2-pve root=/dev/mapper/pve-root ro quiet amd_iommu=on iommu=pt nomodeset textonly video=vesafb:off video=efifb:off
dmesg | grep nomode
didn't output anything.dmesg | grep nomode
output:dmesg | grep nomode
[ 0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-5.13.19-3-pve root=/dev/mapper/pve-root ro quiet amd_iommu=on iommu=pt nomodeset textonly video=vesafb:off video=efifb:off
[ 0.057773] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-5.13.19-3-pve root=/dev/mapper/pve-root ro quiet amd_iommu=on iommu=pt nomodeset textonly video=vesafb:off video=efifb:off
[ 0.057819] You have booted with nomodeset. This means your GPU drivers are DISABLED
[ 0.057820] Unless you actually understand what nomodeset does, you should reboot without enabling it
My dmesg | grep nomode only have theseOk perfect.
Very strange thatdmesg | grep nomode
didn't output anything.
This is mydmesg | grep nomode
output:
Bash:dmesg | grep nomode [ 0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-5.13.19-3-pve root=/dev/mapper/pve-root ro quiet amd_iommu=on iommu=pt nomodeset textonly video=vesafb:off video=efifb:off [ 0.057773] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-5.13.19-3-pve root=/dev/mapper/pve-root ro quiet amd_iommu=on iommu=pt nomodeset textonly video=vesafb:off video=efifb:off [ 0.057819] You have booted with nomodeset. This means your GPU drivers are DISABLED [ 0.057820] Unless you actually understand what nomodeset does, you should reboot without enabling it
root@pve:~# dmesg | grep nomode
[ 0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-5.13.19-2-pve root=/dev/mapper/pve-root ro quiet amd_iommu=on iommu=pt nomodeset textonly video=vesafb:off video=efifb:off
[ 0.017841] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-5.13.19-2-pve root=/dev/mapper/pve-root ro quiet amd_iommu=on iommu=pt nomodeset textonly video=vesafb:off video=efifb:off
[ 0.017884] You have booted with nomodeset. This means your GPU drivers are DISABLED
[ 0.017885] Unless you actually understand what nomodeset does, you should reboot without enabling it
Ah ok, now you have everything setup!My dmesg | grep nomode only have these
Code:root@pve:~# dmesg | grep nomode [ 0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-5.13.19-2-pve root=/dev/mapper/pve-root ro quiet amd_iommu=on iommu=pt nomodeset textonly video=vesafb:off video=efifb:off [ 0.017841] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-5.13.19-2-pve root=/dev/mapper/pve-root ro quiet amd_iommu=on iommu=pt nomodeset textonly video=vesafb:off video=efifb:off [ 0.017884] You have booted with nomodeset. This means your GPU drivers are DISABLED [ 0.017885] Unless you actually understand what nomodeset does, you should reboot without enabling it
cpu: host,hidden=1,flags=+pcid
args: -cpu 'host,+kvm_pv_unhalt,+kvm_pv_eoi,kvm=off'
Where is that set up please?Ah ok, now you have everything setup!
modify your vm config cpu with:
cpu: host,hidden=1,flags=+pcid
and add this line also:
args: -cpu 'host,+kvm_pv_unhalt,+kvm_pv_eoi,kvm=off'
try to boot the vm with attached the pcie vga.
Still doesn't work. . . .nano /etc/pve/qemu-server/100.conf
root@pve:~# dmesg | grep nomode
[ 0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-5.13.19-2-pve root=/dev/mapper/pve-root ro quiet amd_iommu=on iommu=pt nomodeset textonly video=vesafb:off video=efifb:off
[ 0.017612] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-5.13.19-2-pve root=/dev/mapper/pve-root ro quiet amd_iommu=on iommu=pt nomodeset textonly video=vesafb:off video=efifb:off
[ 0.017655] You have booted with nomodeset. This means your GPU drivers are DISABLED
[ 0.017656] Unless you actually understand what nomodeset does, you should reboot without enabling it
args: -cpu 'host,+kvm_pv_unhalt,+kvm_pv_eoi,kvm=off'
bios: ovmf
boot: order=sata0;net0
cores: 6
cpu: host,hidden=1,flags=+pcid
efidisk0: local-lvm:vm-100-disk-1,efitype=4m,pre-enrolled-keys=1,size=4M
hostpci0: 0000:06:00.0
machine: pc-q35-6.1
memory: 4096
meta: creation-qemu=6.1.0,ctime=1643026447
name: win10
net0: virtio=5A:0D:D3:47:AA:58,bridge=vmbr0,firewall=1
numa: 0
ostype: win11
sata0: local-lvm:vm-100-disk-0,size=50G
scsihw: virtio-scsi-pci
smbios1: uuid=9286a924-8435-460e-89a0-0d29c7e5ee86
sockets: 1
tpmstate0: local-lvm:vm-100-disk-2,size=4M,version=v2.0
vmgenid: 554eacdf-0e67-4daa-b07b-82462d057e00
你看到什么了?
错误是什么?
swtpm_setup: Not overwriting existing state file.
TASK ERROR: start failed: command '/usr/bin/kvm -id 100 -name win10 -no-shutdown -chardev 'socket,id=qmp,path=/var/run/qemu-server/100.qmp,server=on,wait=off' -mon 'chardev=qmp,mode=control' -chardev 'socket,id=qmp-event,path=/var/run/qmeventd.sock,reconnect=5' -mon 'chardev=qmp-event,mode=control' -pidfile /var/run/qemu-server/100.pid -daemonize -smbios 'type=1,uuid=9286a924-8435-460e-89a0-0d29c7e5ee86' -drive 'if=pflash,unit=0,format=raw,readonly=on,file=/usr/share/pve-edk2-firmware//OVMF_CODE_4M.secboot.fd' -drive 'if=pflash,unit=1,format=raw,id=drive-efidisk0,size=540672,file=/dev/pve/vm-100-disk-1' -smp '6,sockets=1,cores=6,maxcpus=6' -nodefaults -boot 'menu=on,strict=on,reboot-timeout=1000,splash=/usr/share/qemu-server/bootsplash.jpg' -vnc 'unix:/var/run/qemu-server/100.vnc,password=on' -no-hpet -cpu 'host,hv_ipi,hv_relaxed,hv_reset,hv_runtime,hv_spinlocks=0x1fff,hv_stimer,hv_synic,hv_time,hv_vapic,hv_vpindex,+kvm_pv_eoi,+kvm_pv_unhalt' -m 4096 -readconfig /usr/share/qemu-server/pve-q35-4.0.cfg -device 'vmgenid,guid=554eacdf-0e67-4daa-b07b-82462d057e00' -device 'usb-tablet,id=tablet,bus=ehci.0,port=1' -device 'vfio-pci,host=0000:06:00.0,id=hostpci0,bus=pci.0,addr=0x10' -chardev 'socket,id=tpmchar,path=/var/run/qemu-server/100.swtpm' -tpmdev 'emulator,id=tpmdev,chardev=tpmchar' -device 'tpm-tis,tpmdev=tpmdev' -device 'VGA,id=vga,bus=pcie.0,addr=0x1' -device 'virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3' -iscsi 'initiator-name=iqn.1993-08.org.debian:01:128a4acf23a2' -device 'ahci,id=ahci0,multifunction=on,bus=pci.0,addr=0x7' -drive 'file=/dev/pve/vm-100-disk-0,if=none,id=drive-sata0,format=raw,cache=none,aio=io_uring,detect-zeroes=on' -device 'ide-hd,bus=ahci0.0,drive=drive-sata0,id=sata0,bootindex=100' -netdev 'type=tap,id=net0,ifname=tap100i0,script=/var/lib/qemu-server/pve-bridge,downscript=/var/lib/qemu-server/pve-bridgedown,vhost=on' -device 'virtio-net-pci,mac=5A:0D:D3:47:AA:58,netdev=net0,bus=pci.0,addr=0x12,id=net0,bootindex=101' -rtc 'driftfix=slew,base=localtime' -machine 'type=pc-q35-6.1+pve0' -global 'kvm-pit.lost_tick_policy=discard' -cpu 'host,+kvm_pv_unhalt,+kvm_pv_eoi,kvm=off'' failed: got timeout
Oh, still notOn pcie passthrough Set device to use All functions and PCI Express
Can you show also the result of:
lspci -nn
root@pve:~# lspci -nn
00:00.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Renoir Root Complex [1022:1630]
00:00.2 IOMMU [0806]: Advanced Micro Devices, Inc. [AMD] Renoir IOMMU [1022:1631]
00:01.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Renoir PCIe Dummy Host Bridge [1022:1632]
00:02.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Renoir PCIe Dummy Host Bridge [1022:1632]
00:02.1 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Renoir PCIe GPP Bridge [1022:1634]
00:08.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Renoir PCIe Dummy Host Bridge [1022:1632] M-A Set Mark
00:08.1 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Renoir Internal PCIe GPP Bridge to Bus [1022:1635]y
00:08.2 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Renoir Internal PCIe GPP Bridge to Bus [1022:1635]
00:14.0 SMBus [0c05]: Advanced Micro Devices, Inc. [AMD] FCH SMBus Controller [1022:790b] (rev 51)
00:14.3 ISA bridge [0601]: Advanced Micro Devices, Inc. [AMD] FCH LPC Bridge [1022:790e] (rev 51)
00:18.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Device [1022:166a]
00:18.1 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Device [1022:166b]
00:18.2 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Device [1022:166c]
00:18.3 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Device [1022:166d]
00:18.4 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Device [1022:166e]
00:18.5 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Device [1022:166f]
00:18.6 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Device [1022:1670]
00:18.7 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Device [1022:1671]
01:00.0 USB controller [0c03]: Advanced Micro Devices, Inc. [AMD] 400 Series Chipset USB 3.1 XHCI Controller [1022:43d5] (rev 01)
01:00.1 SATA controller [0106]: Advanced Micro Devices, Inc. [AMD] 400 Series Chipset SATA Controller [1022:43c8] (rev 01)
01:00.2 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] 400 Series Chipset PCIe Bridge [1022:43c6] (rev 01)
02:00.0 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] 400 Series Chipset PCIe Port [1022:43c7] (rev 01)
02:01.0 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] 400 Series Chipset PCIe Port [1022:43c7] (rev 01)
02:04.0 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] 400 Series Chipset PCIe Port [1022:43c7] (rev 01)
04:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 11)
06:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Cezanne [1002:1638] (rev ff)
06:00.1 Audio device [0403]: Advanced Micro Devices, Inc. [AMD/ATI] Device [1002:1637] (rev ff)
06:00.2 Encryption controller [1080]: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 10h-1fh) Platform Security Processor [1022:15df] (rev ff)
06:00.3 USB controller [0c03]: Advanced Micro Devices, Inc. [AMD] Renoir USB 3.1 [1022:1639] (rev ff)
06:00.4 USB controller [0c03]: Advanced Micro Devices, Inc. [AMD] Renoir USB 3.1 [1022:1639] (rev ff)
06:00.6 Audio device [0403]: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 10h-1fh) HD Audio Controller [1022:15e3] (rev ff)
07:00.0 SATA controller [0106]: Advanced Micro Devices, Inc. [AMD] FCH SATA Controller [AHCI mode] [1022:7901] (rev 81)
07:00.1 SATA controller [0106]: Advanced Micro Devices, Inc. [AMD] FCH SATA Controller [AHCI mode] [1022:7901] (rev 81)