Pass AES to the cpu - cpu: invalid format - format error cpu.flags

openaspace

Active Member
Sep 16, 2019
486
13
38
Italy
Hi.
I need to pass the AES capabilities to a virtual machine but when I enable it with kvm64 virtualization the error is:

Parameter verification failed. (400)
cpu: invalid format - format error cpu.flags: value does not match the regex pattern

the host CPu is:

model name : Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz

the CPU have aes support:

sort -u /proc/crypto | grep module
module : aesni_intel
module : aes_x86_64
module : crc32_pclmul
module : crct10dif_pclmul
module : ghash_clmulni_intel
module : kernel

I don't find in any manual how to set this "flag"
Please help.
 
can you post your pveversion -v and the vm config with 'qm config ID'
 
Hi, thank you for the help.
Setting the cpu to "host" i can see the aes support in the virtual machine now.

All ok.

Code:
qm config 102
agent: 1
balloon: 0
boot: c
bootdisk: scsi0
cores: 8
cpu: host,flags=+spec-ctrl
cpuunits: 2048
ide2: none,media=cdrom
memory: 9600
name: ftpserver
net0: virtio=E2:2C:F7:D6:F2:10,bridge=vmbr1,firewall=1
numa: 1
onboot: 1
ostype: l26
scsi0: local:102/vm-102-disk-0.raw,size=20G
scsi1: DATA:102/vm-102-disk-0.raw,backup=0,iothread=1,replicate=0,size=4999G
scsihw: virtio-scsi-single
smbios1: uuid=f04d87f5-ec05-417c-a622-efa55a9ede35
sockets: 1
startup: order=2,up=60
vmgenid: 7eb9a924-3bd8-4660-b893-5d6b29152da6

Code:
proxmox-ve: 6.0-2 (running kernel: 5.0.21-2-pve)
pve-manager: 6.0-7 (running version: 6.0-7/28984024)
pve-kernel-5.0: 6.0-8
pve-kernel-helper: 6.0-8
pve-kernel-5.0.21-2-pve: 5.0.21-3
ceph-fuse: 12.2.11+dfsg1-2.1+b1
corosync: 3.0.2-pve2
criu: 3.11-3
glusterfs-client: 5.5-3
libjs-extjs: 6.0.1-10
libknet1: 1.12-pve1
libpve-access-control: 6.0-2
libpve-apiclient-perl: 3.0-2
libpve-common-perl: 6.0-4
libpve-guest-common-perl: 3.0-1
libpve-http-server-perl: 3.0-2
libpve-storage-perl: 6.0-8
libqb0: 1.0.5-1
lvm2: 2.03.02-pve3
lxc-pve: 3.1.0-65
lxcfs: 3.0.3-pve60
novnc-pve: 1.0.0-60
proxmox-mini-journalreader: 1.1-1
proxmox-widget-toolkit: 2.0-7
pve-cluster: 6.0-7
pve-container: 3.0-7
pve-docs: 6.0-4
pve-edk2-firmware: 2.20190614-1
pve-firewall: 4.0-7
pve-firmware: 3.0-2
pve-ha-manager: 3.0-2
pve-i18n: 2.0-3
pve-qemu-kvm: 4.0.0-5
pve-xtermjs: 3.13.2-1
qemu-server: 6.0-7
smartmontools: 7.0-pve2
spiceterm: 3.1-1
vncterm: 1.6-1
zfsutils-linux: 0.8.1-pve2