[SOLVED] Can't access console on new VM w/GPU Passthrough: "VM [VMID] qmp command 'set_password' failed - Could not set password"

jsalas424

Active Member
Jul 5, 2020
142
3
38
34
I'm trying to spin up a Debian VM with GPU passthrough. Everything seems to have worked correctly except I cannot connect to the console:

"VM 69420 qmp command 'set_password' failed - Could not set password"

I have also tried to connect a monitor directly to the VGA port of the card but didn't get any video.

Here is the VM config:

Code:
agent: 1
bios: ovmf
boot: order=scsi0;ide2;net0
cores: 1
hostpci0: 0000:01:00,pcie=1,x-vga=1
ide2: local:iso/debian-11.1.0-amd64-netinst.iso,media=cdrom
machine: q35
memory: 4098
meta: creation-qemu=6.1.0,ctime=1637382539
name: test
net0: virtio=26:77:A8:6E:5E:4F,bridge=vmbr0
numa: 0
ostype: l26
scsi0: local-zfs:vm-69420-disk-0,discard=on,size=32G
scsihw: virtio-scsi-pci
smbios1: uuid=a15a0edc-bf44-480d-b910-1a21284c8f8b
sockets: 4
vmgenid: 99d77163-ddce-43bd-8d26-74d23ad6f647

Passthrough seems to be working fine:

Code:
IOMMU is enabled

root@TracheNodeB:~# dmesg | grep -e DMAR -e IOMMU | grep -e "IOMMU enabled"
[    0.060105] DMAR: IOMMU enabled

Modules are loaded:

root@TracheNodeB:~# cat /etc/modules
# /etc/modules: kernel modules to load at boot time.
#
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with "#" are ignored.

vfio
vfio_iommu_type1
vfio_pci
vfio_virqfd

Interrupt Remapping is enabled:

root@TracheNodeB:~# dmesg | grep 'remapping'
[    0.149363] DMAR-IR: Queued invalidation will be enabled to support x2apic and Intr-remapping.
[    0.149723] DMAR-IR: Enabled IRQ remapping in x2apic mode

Verified Isolation:

root@TracheNodeB:~# find /sys/kernel/iommu_groups/ -type l
/sys/kernel/iommu_groups/7/devices/0000:00:1a.0
/sys/kernel/iommu_groups/5/devices/0000:00:16.0
/sys/kernel/iommu_groups/5/devices/0000:00:16.3
/sys/kernel/iommu_groups/13/devices/0000:03:00.0
....

I have the correct card address:

root@TracheNodeB:~# lspci | grep "NVIDIA"
01:00.0 VGA compatible controller: NVIDIA Corporation GT218 [GeForce 310] (rev a2)
01:00.1 Audio device: NVIDIA Corporation High Definition Audio Controller (rev a1)

root@TracheNodeB:~# lspci -n -s 01:00
01:00.0 0300: 10de:0a63 (rev a2)
01:00.1 0403: 10de:0be3 (rev a1)

I set up GPU OVMF PCI Express Passthrough with the aforementioned correct address:

root@TracheNodeB:~# cat /etc/modprobe.d/vfio.conf
options vfio-pci ids=10de:0a63,10de:0be3 disable_vga=1

I've blacklisted drivers:

root@TracheNodeB:~# cat /etc/modprobe.d/blacklist.conf
blacklist radeon
blacklist nouveau
blacklist nvidia

I confirmed the card passed through with qm monitor

root@TracheNodeB:~# qm monitor 69420
Entering Qemu Monitor for VM 69420 - type 'help' for help
qm> info pci
  Bus  1, device   0, function 0:
    VGA controller: PCI device 10de:0a63
      PCI subsystem 1462:1835
      IRQ 10, pin A
      BAR0: 32 bit memory at 0xc0000000 [0xc0ffffff].
      BAR1: 64 bit prefetchable memory at 0x800000000 [0x80fffffff].
      BAR3: 64 bit prefetchable memory at 0x810000000 [0x811ffffff].
      BAR5: I/O at 0xa000 [0xa07f].
      BAR6: 32 bit memory at 0xffffffffffffffff [0x0007fffe].
      id "hostpci0.0"
  Bus  1, device   0, function 1:
    Audio controller: PCI device 10de:0be3
      PCI subsystem 1462:1835
      IRQ 10, pin B
      BAR0: 32 bit memory at 0xc1000000 [0xc1003fff].
      id "hostpci0.1"

PVE Details

Code:
root@TracheNodeB:~# pveversion -v
proxmox-ve: 7.1-1 (running kernel: 5.13.19-1-pve)
pve-manager: 7.1-5 (running version: 7.1-5/6fe299a0)
pve-kernel-5.13: 7.1-4
pve-kernel-helper: 7.1-4
pve-kernel-5.11: 7.0-10
pve-kernel-5.13.19-1-pve: 5.13.19-2
pve-kernel-5.11.22-7-pve: 5.11.22-12
pve-kernel-5.11.22-5-pve: 5.11.22-10
pve-kernel-5.11.22-1-pve: 5.11.22-2
ceph-fuse: 15.2.13-pve1
corosync: 3.1.5-pve2
criu: 3.15-1+pve-1
glusterfs-client: 9.2-1
ifupdown2: 3.1.0-1+pmx3
ksm-control-daemon: 1.4-1
libjs-extjs: 7.0.0-1
libknet1: 1.22-pve2
libproxmox-acme-perl: 1.4.0
libproxmox-backup-qemu0: 1.2.0-1
libpve-access-control: 7.1-2
libpve-apiclient-perl: 3.2-1
libpve-common-perl: 7.0-14
libpve-guest-common-perl: 4.0-3
libpve-http-server-perl: 4.0-3
libpve-storage-perl: 7.0-15
libspice-server1: 0.14.3-2.1
lvm2: 2.03.11-2.1
lxc-pve: 4.0.9-4
lxcfs: 4.0.8-pve2
novnc-pve: 1.2.0-3
openvswitch-switch: 2.15.0+ds1-2
proxmox-backup-client: 2.0.14-1
proxmox-backup-file-restore: 2.0.14-1
proxmox-mini-journalreader: 1.2-1
proxmox-widget-toolkit: 3.4-2
pve-cluster: 7.1-2
pve-container: 4.1-2
pve-docs: 7.1-2
pve-edk2-firmware: 3.20210831-2
pve-firewall: 4.2-5
pve-firmware: 3.3-3
pve-ha-manager: 3.3-1
pve-i18n: 2.6-1
pve-qemu-kvm: 6.1.0-2
pve-xtermjs: 4.12.0-1
qemu-server: 7.1-3
smartmontools: 7.2-1
spiceterm: 3.2-2
swtpm: 0.7.0~rc1+2
vncterm: 1.7-1
zfsutils-linux: 2.1.1-pve3

This PVE is otherwise a completely vanilla setup, as I've exclusively used it thus far for getting this one VM running.
 
Last edited:
"VM 69420 qmp command 'set_password' failed - Could not set password"
thats expected, since there is no virtual gpu where the vnc could attach to

the usual method is to attach a monitor to the gpu itself and get an output there

I have also tried to connect a monitor directly to the VGA port of the card but didn't get any video.
does this card have multiple video outs? maybe try a different one?

alternatively, you can set the display manually in the gui to e.g. std vga. then it is possible to connect via vnc (but note that this does not use the passed through gpu)
 
thats expected, since there is no virtual gpu where the vnc could attach to

the usual method is to attach a monitor to the gpu itself and get an output there


does this card have multiple video outs? maybe try a different one?

alternatively, you can set the display manually in the gui to e.g. std vga. then it is possible to connect via vnc (but note that this does not use the passed through gpu)
I set the display to VGA and it worked! Thank you!
 
So initially the display is fine1638537796500.png
but as soon as I proceed to install Debian, I get this chaos

1638537755916.png

There is a 2nd display output on the graphics card, but I don't have an adapter on hand to try it.
 
i remember there is some issue in the debian kernel with some configurations ... could you try setting the gpu to 'virtio-gpu'?
 
i remember there is some issue in the debian kernel with some configurations ... could you try setting the gpu to 'virtio-gpu'?
So far so good! 1638540384004.png

Could you briefly elaborate on what's going on here? What does setting 'virtio-gpu' do?
 
Could you briefly elaborate on what's going on here? What does setting 'virtio-gpu' do?
it emulates a different virtual gpu. there seems to be an issue currently where the kernel in the debian installer does not include/configure the proper driver for the 'std vga' device
 
@dcsapak,

Main Node CPU: AMD EPYC 7543
# of CPU Cores 32
# of Threads 64
NVMe Disks - no issues for the disks.
 

Attachments

  • Screenshot(166).png
    Screenshot(166).png
    72.3 KB · Views: 36
@dcsapak,

Main Node CPU: AMD EPYC 7543
# of CPU Cores 32
# of Threads 64
NVMe Disks - no issues for the disks.
hi, how does this relate to the thread?

the issue described by @jsalas424 is caused by a bug in the debian installer, where we cannot really do anything
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!