Removing "hibernate" state of vm? Proxmox 5.4

holr

New Member
Jan 4, 2019
13
1
3
49
Hello,
I went through the process of hibernating all VMs on a 5.4 proxmox server recently (qm suspend --vmid <id> --todisk 1) before a server reboot.

After rebooting, I tried resuming all the vms (qm resume <vmid>) but not all of them woke back up, many of them not thawing but timing out en masse.

Is it possible to delete the hibernate state and have the VM just start up, without the restoration of RAM etc.? My snapshots are from some time ago and I'd like to try just booting, without the restoring!
 

dcsapak

Proxmox Staff Member
Staff member
Feb 1, 2016
3,917
357
83
31
Vienna
first it would be interesting why they are not starting, because this should not happen...

otherwise, you can try to boot when you manually edit the config (be sure to know what you are doing, this circumvents all checks from us) to
remove the 'suspend' lock and the 'vmstate' (you can then delete the file/lv etc. of the state via pvesm (see man pvesm))

then it should start 'normally' but behaves like the power was cut
 
  • Like
Reactions: holr

holr

New Member
Jan 4, 2019
13
1
3
49
first it would be interesting why they are not starting, because this should not happen...

otherwise, you can try to boot when you manually edit the config (be sure to know what you are doing, this circumvents all checks from us) to
remove the 'suspend' lock and the 'vmstate' (you can then delete the file/lv etc. of the state via pvesm (see man pvesm))

then it should start 'normally' but behaves like the power was cut
Thank you for the suggestion! I will try this, in the meantime here is the output I get after attempting a resume on several of the vms in question:

Code:
qm resume 534
Resuming suspended VM
start failed: command '/usr/bin/kvm -id 534 -name <vm-name> -chardev 'socket,id=qmp,path=/var/run/qemu-server/534.qmp,server,nowait' -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/534.pid -daemonize -smbios 'type=1,uuid=658c52c7-b345-4eff-a9fa-9a43207f0996' -smp '4,sockets=1,cores=4,maxcpus=4' -nodefaults -boot 'menu=on,strict=on,reboot-timeout=1000,splash=/usr/share/qemu-server/bootsplash.jpg' -vnc unix:/var/run/qemu-server/534.vnc,x509,password -no-hpet -cpu 'kvm64,+lahf_lm,+sep,+kvm_pv_unhalt,+kvm_pv_eoi,hv_spinlocks=0x1fff,hv_vapic,hv_time,hv_reset,hv_vpindex,hv_runtime,hv_relaxed,hv_synic,hv_stimer,enforce' -m 16384 -device 'pci-bridge,id=pci.1,chassis_nr=1,bus=pci.0,addr=0x1e' -device 'pci-bridge,id=pci.2,chassis_nr=2,bus=pci.0,addr=0x1f' -device 'vmgenid,guid=c8e06ffe-b515-43f0-9495-f98d14149941' -device 'piix3-usb-uhci,id=uhci,bus=pci.0,addr=0x1.0x2' -device 'usb-tablet,id=tablet,bus=uhci.0,port=1' -device 'VGA,id=vga,bus=pci.0,addr=0x2' -chardev 'socket,path=/var/run/qemu-server/534.qga,server,nowait,id=qga0' -device 'virtio-serial,id=qga0,bus=pci.0,addr=0x8' -device 'virtserialport,chardev=qga0,name=org.qemu.guest_agent.0' -device 'virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3' -iscsi 'initiator-name=iqn.1993-08.org.debian:01:c59960939514' -drive 'file=rbd:ceph_vm/vm-534-disk-0:conf=/etc/pve/ceph.conf,if=none,id=drive-virtio0,cache=writeback,format=raw,aio=threads,detect-zeroes=on' -device 'virtio-blk-pci,drive=drive-virtio0,id=virtio0,bus=pci.0,addr=0xa,bootindex=100' -netdev 'type=tap,id=net0,ifname=tap534i0,script=/var/lib/qemu-server/pve-bridge,downscript=/var/lib/qemu-server/pve-bridgedown,vhost=on' -device 'virtio-net-pci,mac=02:1D:5D:FC:80:FC,netdev=net0,bus=pci.0,addr=0x12,id=net0,bootindex=300' -rtc 'driftfix=slew,base=localtime' -machine 'type=pc-i440fx-3.0' -global 'kvm-pit.lost_tick_policy=discard' -loadstate 'rbd:ceph_vm/vm-534-state-suspend-2019-07-09:conf=/etc/pve/ceph.conf'' failed: got timeout
 

dcsapak

Proxmox Staff Member
Staff member
Feb 1, 2016
3,917
357
83
31
Vienna
the default timeout for the start is 30 seconds normally and 300 second if hugepages are on or we resume from a suspended state, but it seems it takes more than 5 minutes to load the 32GB state from ceph in your case...
maybe we should make the timeout configurable...
 

holr

New Member
Jan 4, 2019
13
1
3
49
Thank you for the suggestion! Is there anywhere I can manually change the timeout, just to try it? In a config file or something on the system?

update - I was able to use "pvesm free ceph_vm:vm-534-state-suspend-2019-07-09" (which I got from vmstate in the 534.conf file) to erase the hibernation file as you suggested. After removing the lock state and the vmstate entries from the corresponding conf file, the button changed from resume to start, and the VM started up ok - thanks for the tip!
 
Last edited:

masgo

New Member
Jun 24, 2019
14
1
3
69
the default timeout for the start is 30 seconds normally and 300 second if hugepages are on or we resume from a suspended state, but it seems it takes more than 5 minutes to load the 32GB state from ceph in your case...
maybe we should make the timeout configurable...
Is there already a bug report for this which I could follow?

I plan to set up the server in a way that if the UPS looses power the server waits for 5min for the power to come back and then it suspends all VMs and shuts down. Gracefully shutting down all VMs might take way to long, especially since some are Windows VMs.

Obviously, this is only a good plan if I can resume the VMs after the power has returned.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE 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 your own in 60 seconds.

Buy now!