qm showcmd <vmid> --pretty
and modify it to enable SEV-SNP:cat /run/qemu-server/host-hw-capabilities.json
-machine memory-encryption=sev0,vmport=off \
-object sev-snp-guest,id=sev0,cbitpos=51,reduced-phys-bits=5,policy=0x30000 \
-D ./log.txt \
-bios '/root/OVMF.fd'
Hi @nico_ ,Hi @MarkusF,
adding the following to the QEMU command
Bash:-machine memory-encryption=sev0,vmport=off \ -object sev-snp-guest,id=sev0,cbitpos=51,reduced-phys-bits=5,policy=0x30000 \ -D ./log.txt \ -bios '/root/OVMF.fd'
and changing the CPU from qemu64 to EPYC-v4 allows us to boot an SNP CVM. Note that this requires QEMU v9.2; other than that, so far we did not see any limitations specific to SNP.
How can we help prioritise this so that SNP gets mainline support in Proxmox sooner than later?
qemu-server is not the same as qemu.Hi @nico_ ,
how did you upgrade the qemu server to version 9.2 on proxmox?
I've installed the latest version of proxmox (8.3.0) but the qemu server is at the 8.3.3.
qemu-system-x86_64 --version
or apt info pve-qemu-kvm
will show the current qemu version.Thanks Markus for the quick response and sorry for the confusion, theqemu-server is not the same as qemu.
qemu-system-x86_64 --version
orapt info pve-qemu-kvm
will show the current qemu version.
SEV-SNP support should also work with QEMU-9.1.
pve-qemu-kvm: 9.0.2-4
is the one provided in the current proxmox.Hi Markus, I've followed the provided guide to build the pve-common successfully.Edit: Either you wait until it is in your repository or you try to build it yourself (do at your own risk):
https://pve.proxmox.com/wiki/Developer_Documentation
make dinstall
return this error when I try to run it inside the pve-qemu folder:ERROR: missing subprojects
--disable-download specified but subprojects were not
checked out. Please invoke "meson subprojects download"
before configuring QEMU, or remove --disable-download
from the command line.
make[1]: *** [debian/rules:34: build/config.status] Error 1
make[1]: Leaving directory '/root/proxmox/pve-qemu/pve-qemu-kvm-9.1.2'
dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2
make: *** [Makefile:61: pve-qemu-kvm_9.1.2-1_amd64.deb] Error 2
meson subprojects download
without resolving the error./root/proxmox/pve-qemu/pve-qemu-kvm-9.1.2/build/config.log
:# QEMU configure log Fri Jan 17 05:16:53 PM CET 2025# Configured with: '/root/proxmox/pve-qemu/pve-qemu-kvm-9.1.2/configure' '--disable-download' '--docdir=/usr/share/doc/pve-qemu-kvm' '--localstatedir=/var' '--prefix=/usr' '--sysconfdir=/etc' '--target-list=x86_64-softmmu,aarch64-softmmu' '--with-suffix=kvm' '--with-pkgversion=pve-qemu-kvm_9.1.2-1' '--audio-drv-list=alsa' '--datadir=/usr/share' '--libexecdir=/usr/lib/kvm' '--disable-capstone' '--disable-gtk' '--disable-guest-agent' '--disable-guest-agent-msi' '--disable-libnfs' '--disable-libssh' '--disable-sdl' '--disable-smartcard' '--disable-strip' '--disable-xen' '--enable-curl' '--enable-docs' '--enable-glusterfs' '--enable-gnutls' '--enable-libiscsi' '--enable-libusb' '--enable-linux-aio' '--enable-linux-io-uring' '--enable-numa' '--enable-opengl' '--enable-rbd' '--enable-seccomp' '--enable-slirp' '--enable-spice' '--enable-usb-redir' '--enable-virglrenderer' '--enable-virtfs' '--enable-zstd'
#
cc -g -O2 -ffile-prefix-map=/root/proxmox/pve-qemu/pve-qemu-kvm-9.1.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wall -c -o config-temp/qemu-conf.o config-temp/qemu-conf.c
cc -g -O2 -ffile-prefix-map=/root/proxmox/pve-qemu/pve-qemu-kvm-9.1.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wall -c -o config-temp/qemu-conf.o config-temp/qemu-conf.c
config-temp/qemu-conf.c:2:2: error: #error __i386__ not defined
2 | #error __i386__ not defined
| ^~~~~
cc -g -O2 -ffile-prefix-map=/root/proxmox/pve-qemu/pve-qemu-kvm-9.1.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wall -c -o config-temp/qemu-conf.o config-temp/qemu-conf.c
cc -g -O2 -ffile-prefix-map=/root/proxmox/pve-qemu/pve-qemu-kvm-9.1.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wall -c -o config-temp/qemu-conf.o config-temp/qemu-conf.c
config-temp/qemu-conf.c:2:2: error: #error __ILP32__ not defined
2 | #error __ILP32__ not defined
| ^~~~~
Thank you @pipo! I was running the meson command in the wrong folder... I was able to install the pve-qemu 9.1 version.Hi,
we haven't used QEMU 9.2 but rather the latest checkout of pve-qemu (9.1.2-1).
@piers Running `meson subprojects download` from pve-qemu/qemu fixed the issue for me. Have you ran `git submodule sync` after updating the subhook reference?
root@:/usr/share/pve-edk2-firmware# qm start 100
kvm: pflash with kvm requires KVM readonly memory support
start failed: QEMU exited with code 1
root@:/usr/share/pve-edk2-firmware# qm showcmd 100 --pretty
/usr/bin/kvm \
-id 100 \
-name 'test-snp01,debug-threads=on' \
-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=f6aa99df-bbc2-4a19-93e1-5ae418f3f683' \
-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,id=drive-efidisk0,format=raw,file=/dev/pve/vm-100-disk-0,size=540672' \
-global 'ICH9-LPC.acpi-pci-hotplug-with-bridge-support=off' \
-smp '4,sockets=4,cores=1,maxcpus=4' \
-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' \
-cpu 'EPYC-Rome-v4,enforce,+kvm_pv_eoi,+kvm_pv_unhalt,vendor=AuthenticAMD' \
-m 4096 \
-object 'iothread,id=iothread-virtioscsi0' \
-readconfig /usr/share/qemu-server/pve-q35-4.0.cfg \
-device 'vmgenid,guid=0bee9fce-8d09-4d87-8524-08485cb5db9f' \
-device 'usb-tablet,id=tablet,bus=ehci.0,port=1' \
-device 'VGA,id=vga,bus=pcie.0,addr=0x1' \
-device 'virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3,free-page-reporting=on' \
-iscsi 'initiator-name=iqn.1993-08.org.debian:01:d69f83d64b64' \
-drive 'file=/var/lib/vz/template/iso/ubuntu-22.04.5-live-server-amd64.iso,if=none,id=drive-ide2,media=cdrom,format=raw,aio=io_uring' \
-device 'ide-cd,bus=ide.1,unit=0,drive=drive-ide2,id=ide2,bootindex=101' \
-device 'virtio-scsi-pci,id=virtioscsi0,bus=pci.3,addr=0x1,iothread=iothread-virtioscsi0' \
-drive 'file=/dev/pve/vm-100-disk-1,if=none,id=drive-scsi0,format=raw,cache=none,aio=io_uring,detect-zeroes=on' \
-device 'scsi-hd,bus=virtioscsi0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0,id=scsi0,bootindex=100' \
-machine 'type=q35+pve0' \
-machine 'memory-encryption=sev0,vmport=off' \
-object 'sev-snp-guest,id=sev0,cbitpos=51,reduced-phys-bits=6,policy=0x30000'
OVMF.fd
via the -bios
option../snphost ok
(https://github.com/virtee/snphost).-drive if=pflash
option. However, I haven’t been able to make this setup work with SNP. Reference scripts for SNP utilize the -bios
option instead (https://github.com/AMDESE/AMDSEV/issues/218).-bios
option when working with SNP?Hi @pipo, I had the same problem, theHi @MarkusF,
I am looking into adding support for SEV-SNP in Proxmox myself, building upon the existing code for SEV(-ES). While I’ve made some progress, I’ve encountered an issue with OVMF that I’m unsure how to approach.
Currently, Proxmox uses OVMF_CODE.fd and OVMF_VARS.fd with the-drive if=pflash
option. However, I haven’t been able to make this setup work with SNP. Reference scripts for SNP utilize the-bios
option instead (https://github.com/AMDESE/AMDSEV/issues/218).
Would you happen to have any suggestions on this? Specifically, would it be fine to use the-bios
option when working with SNP?
Thanks in advance for your guidance!
bios: ovmf
configuration in the <vmid>.conf file was the issue. In my case I resolved it by removing it and adding the -bios
option as below:boot: order=scsi0;ide2;net0
cores: 1
cpu: EPYC-Rome-v4
efidisk0: local-lvm:vm-103-disk-0,efitype=4m,pre-enrolled-keys=1,size=4M
ide2: local:iso/ubuntu-24.04.1-live-server-amd64.iso,media=cdrom,size=2708862K
memory: 4096
meta: creation-qemu=9.1.2,ctime=1737633630
name: test-snp3-nino
net0: virtio=BC:24:11:46:E2:AE,bridge=vmbr0,firewall=1
numa: 0
ostype: l26
scsi0: local-lvm:vm-103-disk-1,iothread=1,size=32G
scsihw: virtio-scsi-single
smbios1: uuid=2e0364bc-d77c-4bfe-9fac-31fe119c3d2c
sockets: 4
vmgenid: 5c70992e-8383-410c-808c-687285d91b0e
args: -bios '/root/OVMF.fd' -machine memory-encryption=sev0,vmport=off -object sev-snp-guest,id=sev0,cbitpos=51,reduced-phys-bits=6,policy=0x30000
OVMF.fd
like this:git clone https://github.com/tianocore/edk2.git
cd edk2
git submodule update --init
make -C BaseTools
export EDK_TOOLS_PATH=/root/tianocore-edk2-git/edk2/BaseTools
. edksetup.sh BaseTools
nano Config/target.txt
'''
ACTIVE_PLATFORM = OvmfPkg/OvmfPkgX64.dsc
TARGET_ARCH = X64
TOOL_CHAIN_TAG = GCC5
'''
build
Given the available OVMF targets in pve-edk2-firmware, what would you recommend? Would it make sense to introduce a new target that builds OVMF without these flags specifically for SEV-ES and SEV-SNP?The following features are not supported when SEV-ES is enabled:
- UEFI Secure Boot
We use essential cookies to make this site work, and optional cookies to enhance your experience.