[SOLVED] swtpm_setup: Not overwriting existing state file. [Proxmox 8.0.4 & Win11 VM]

goeste

New Member
Apr 17, 2023
15
1
3
Hi all,

since couple of day every now and then i get the following issue with my Win11 VM not starting:
Code:
swtpm_setup: Not overwriting existing state file.
TASK ERROR: start failed: command '/usr/bin/kvm -id 103 -name 'Win11-Felix,debug-threads=on' -no-shutdown -chardev 'socket,id=qmp,path=/var/run/qemu-server/103.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/103.pid -daemonize -smbios 'type=1,uuid=35f1a9ae-5ede-44b5-b9f2-be0e0e6c6c30' -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/zvol/data/vm-103-disk-0,size=540672' -smp '32,sockets=2,cores=16,maxcpus=32' -nodefaults -boot 'menu=on,strict=on,reboot-timeout=1000,splash=/usr/share/qemu-server/bootsplash.jpg' -vga none -nographic -cpu 'host,hv_ipi,hv_relaxed,hv_reset,hv_runtime,hv_spinlocks=0x1fff,hv_stimer,hv_synic,hv_time,hv_vapic,hv_vendor_id=proxmox,hv_vpindex,kvm=off,+kvm_pv_eoi,+kvm_pv_unhalt' -m 32768 -object 'memory-backend-ram,id=ram-node0,size=16384M' -numa 'node,nodeid=0,cpus=0-15,memdev=ram-node0' -object 'memory-backend-ram,id=ram-node1,size=16384M' -numa 'node,nodeid=1,cpus=16-31,memdev=ram-node1' -object 'iothread,id=iothread-virtioscsi0' -readconfig /usr/share/qemu-server/pve-q35-4.0.cfg -device 'vmgenid,guid=5a4217f0-fdbe-4505-a0c0-8ffa16b2b314' -device 'usb-tablet,id=tablet,bus=ehci.0,port=1' -device 'vfio-pci,host=0000:83:00.0,id=hostpci0.0,bus=ich9-pcie-port-1,addr=0x0.0,multifunction=on' -device 'vfio-pci,host=0000:83:00.1,id=hostpci0.1,bus=ich9-pcie-port-1,addr=0x0.1' -device 'vfio-pci,host=0000:83:00.2,id=hostpci0.2,bus=ich9-pcie-port-1,addr=0x0.2' -device 'vfio-pci,host=0000:83:00.3,id=hostpci0.3,bus=ich9-pcie-port-1,addr=0x0.3' -chardev 'socket,id=tpmchar,path=/var/run/qemu-server/103.swtpm' -tpmdev 'emulator,id=tpmdev,chardev=tpmchar' -device 'tpm-tis,tpmdev=tpmdev' -chardev 'socket,path=/var/run/qemu-server/103.qga,server=on,wait=off,id=qga0' -device 'virtio-serial,id=qga0,bus=pci.0,addr=0x8' -device 'virtserialport,chardev=qga0,name=org.qemu.guest_agent.0' -iscsi 'initiator-name=iqn.1993-08.org.debian:01:a7856667c5' -device 'virtio-scsi-pci,id=virtioscsi0,bus=pci.3,addr=0x1,iothread=iothread-virtioscsi0' -drive 'file=/dev/zvol/data/vm-103-disk-2,if=none,id=drive-scsi0,cache=writethrough,format=raw,aio=io_uring,detect-zeroes=on' -device 'scsi-hd,bus=virtioscsi0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0,id=scsi0,rotation_rate=1,bootindex=100' -netdev 'type=tap,id=net0,ifname=tap103i0,script=/var/lib/qemu-server/pve-bridge,downscript=/var/lib/qemu-server/pve-bridgedown' -device 'e1000,mac=E6:C2:19:BC:27:03,netdev=net0,bus=pci.0,addr=0x12,id=net0' -rtc 'driftfix=slew,base=localtime' -machine 'hpet=off,type=pc-q35-8.0+pve0' -global 'kvm-pit.lost_tick_policy=discard'' failed: got timeout

several threads that suggest to lock the vm (qm set 103 --lock suspended) and what helped other is not helping, unfortunately. The system did not get any HW updates nor did anything change to the VM config.


What else can I provide to get some help to get the VM running again?

Best regards and thanks for any help !
goeste
 
swtpm_setup: Not overwriting existing state file.
That's normal, it's not an error and most likely not related.
Code:
TASK ERROR: start failed: command '/usr/bin/kvm -id 103 -name 'Win11-Felix,debug-threads=on' -no-shutdown -chardev 'socket,id=qmp,path=/var/run/qemu-server/103.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/103.pid -daemonize -smbios 'type=1,uuid=35f1a9ae-5ede-44b5-b9f2-be0e0e6c6c30' -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/zvol/data/vm-103-disk-0,size=540672' -smp '32,sockets=2,cores=16,maxcpus=32' -nodefaults -boot 'menu=on,strict=on,reboot-timeout=1000,splash=/usr/share/qemu-server/bootsplash.jpg' -vga none -nographic -cpu 'host,hv_ipi,hv_relaxed,hv_reset,hv_runtime,hv_spinlocks=0x1fff,hv_stimer,hv_synic,hv_time,hv_vapic,hv_vendor_id=proxmox,hv_vpindex,kvm=off,+kvm_pv_eoi,+kvm_pv_unhalt' -m 32768 -object 'memory-backend-ram,id=ram-node0,size=16384M' -numa 'node,nodeid=0,cpus=0-15,memdev=ram-node0' -object 'memory-backend-ram,id=ram-node1,size=16384M' -numa 'node,nodeid=1,cpus=16-31,memdev=ram-node1' -object 'iothread,id=iothread-virtioscsi0' -readconfig /usr/share/qemu-server/pve-q35-4.0.cfg -device 'vmgenid,guid=5a4217f0-fdbe-4505-a0c0-8ffa16b2b314' -device 'usb-tablet,id=tablet,bus=ehci.0,port=1' -device 'vfio-pci,host=0000:83:00.0,id=hostpci0.0,bus=ich9-pcie-port-1,addr=0x0.0,multifunction=on' -device 'vfio-pci,host=0000:83:00.1,id=hostpci0.1,bus=ich9-pcie-port-1,addr=0x0.1' -device 'vfio-pci,host=0000:83:00.2,id=hostpci0.2,bus=ich9-pcie-port-1,addr=0x0.2' -device 'vfio-pci,host=0000:83:00.3,id=hostpci0.3,bus=ich9-pcie-port-1,addr=0x0.3' -chardev 'socket,id=tpmchar,path=/var/run/qemu-server/103.swtpm' -tpmdev 'emulator,id=tpmdev,chardev=tpmchar' -device 'tpm-tis,tpmdev=tpmdev' -chardev 'socket,path=/var/run/qemu-server/103.qga,server=on,wait=off,id=qga0' -device 'virtio-serial,id=qga0,bus=pci.0,addr=0x8' -device 'virtserialport,chardev=qga0,name=org.qemu.guest_agent.0' -iscsi 'initiator-name=iqn.1993-08.org.debian:01:a7856667c5' -device 'virtio-scsi-pci,id=virtioscsi0,bus=pci.3,addr=0x1,iothread=iothread-virtioscsi0' -drive 'file=/dev/zvol/data/vm-103-disk-2,if=none,id=drive-scsi0,cache=writethrough,format=raw,aio=io_uring,detect-zeroes=on' -device 'scsi-hd,bus=virtioscsi0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0,id=scsi0,rotation_rate=1,bootindex=100' -netdev 'type=tap,id=net0,ifname=tap103i0,script=/var/lib/qemu-server/pve-bridge,downscript=/var/lib/qemu-server/pve-bridgedown' -device 'e1000,mac=E6:C2:19:BC:27:03,netdev=net0,bus=pci.0,addr=0x12,id=net0' -rtc 'driftfix=slew,base=localtime' -machine 'hpet=off,type=pc-q35-8.0+pve0' -global 'kvm-pit.lost_tick_policy=discard'' failed: got timeout
Check journalctl (scroll with arrow keys) from around the time of trying to start the VM. If there are no actual error messages to be found there, then it's probably a timeout because there is not enough continous free memory. Try starting the VM with 4GB instead (of 32GB) to test this.
 
  • Like
Reactions: goeste
Thank you @leesteken: today at the latest try it gives me the following repeating lines:
Code:
Oct 06 13:35:52 glades pvestatd[5505]: zfs error: cannot open 'rpool': no such pool
Oct 06 13:35:52 glades pvestatd[5505]: could not activate storage 'local-zfs', zfs error: cannot import 'rpool': no such pool available

However, local-zfs is def. gone. and now just a ssd with an PVE 7.x on it. I use different drives for major PVE updates. Will try the mempory piece.
 
Last edited:
Ok, it seems to be the memory, 4GB are working just fine. However, 32 should not be an issue actually (image includes the VM with 4GB started)
1701780095406.png
 
Ok, it seems to be the memory, 4GB are working just fine. However, 32 should not be an issue actually (image includes the VM with 4GB started)
View attachment 59310
As I said it's probably because of too much memory fragmentation and not enough continuous free memory. Are you using hugepages for the VM? It's probably temporarily fixed by rebooting the Proxmox host.
 
As I said it's probably because of too much memory fragmentation and not enough continuous free memory. Are you using hugepages for the VM? It's probably temporarily fixed by rebooting the Proxmox host.
Always wanted to try using hugepages but never got to the point of actually setting it up. Any suggestion oin a good tutorial or is it just a GUI setting?!
 

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!