Yes, works. I have Asrock TRX40 Creator and Radeon VII. Need to work around the GPU reset bug though. (If you stop the VM and start again the Radeon VII will not initialise, need to reboot the host)
I found a working trick with a start hookscript: (this will briefly stand-by the host before starting the VM and it works to reset the GPU)
root@ryzen:/var/lib/vz/snippets# more reset-gpu.pl
#!/usr/bin/perl
# Hook script for PVE guests to reset AMD GPU before VM start
# qm set 100 -hookscript local:snippets/reset-gpu.pl
use strict;
use warnings;
print “HOOK: ” . join(‘ ‘, @ARGV). “\n”;
# First argument is the vmid
my $vmid = shift;
# Second argument is the phase
my $phase = shift;
if ($phase eq ‘pre-start’) {
print “HOOK: $vmid is stopped.\n”;
system(“rtcwake -m mem -s 3”);
} else {
print “HOOK: got unknown phase ‘$phase’\n”;
}
exit(0);