Does Proxmox manage hibernation ?

What exactly do you mean? If Proxmox VE will send the VM into hibernation automatically after some time?
 
Okay, no that is not really intended as a Proxmox VE server is usually running 24/7.

You can try to put it into hibernate manually with systemctl hibernate. But for this to work you need to have enough swap space available and set up in a way that can be resumed from it, to contain all RAM contents.

Since this is not a use case PVE is intended for, the default disk layout usually does not have a swap space large enough, if it even has swap configured at all.

Why not just power down the node if you don't need it?
 
  • Like
Reactions: cdarsac
I tried suspend-to-RAM once with rtcwake, but PCI passthrough was not automatically restored when resuming. Maybe it can be made to work with proper scripting.
 
  • Like
Reactions: cdarsac
Okay, no that is not really intended as a Proxmox VE server is usually running 24/7.

You can try to put it into hibernate manually with systemctl hibernate. But for this to work you need to have enough swap space available and set up in a way that can be resumed from it, to contain all RAM contents.

Since this is not a use case PVE is intended for, the default disk layout usually does not have a swap space large enough, if it even has swap configured at all.

Why not just power down the node if you don't need it?
Hi aaron,

I want to use proxmox in my laptop, and running both macos and windows on it. So I just added xfce2 to proxmox and got a GUI then it's OK to enter vm with same machine. So the hibernate mode is the best choice if I want to take this laptop to office.

I build a swap file and make it swapon, but when choose hibernate, it just reboot...

After reboot, the swapfile keeps off.

I google it and many replies said uswsusp was required, but apt-get install uswsusp found no packages... I think I could fetch the target uswsusp package from debian download site, but is that the right way to make hibernate run on proxmox???

btw, the proxmox version is newest 7.0.1.
 
  • Like
Reactions: logiczny
I want exactly the same. Proxmox is running on my Laptop. A shutdown and startup takes each ~5 min.

Suspend to RAM works, but network problems after wake up.
Hibernate does logout and then a reboot.
 
I want exactly the same. Proxmox is running on my Laptop. A shutdown and startup takes each ~5 min.

Suspend to RAM works, but network problems after wake up.
Hibernate does logout and then a reboot.
Really sad story.... I don't know why hibernate don't work...
 
I investigated this topic a little and it turns out that an installation of proxmox-ve package on debian 11 breaks properly working sleep (STR) and hibernation (STD) on a vanilla deb11 machine.
I've tried to replace pve-firmware and pve-kernel* with vanilla ones from default deb11 repos and proxmox still was working properly for me (with firmware-linux-free and linux-image-5.10*), but sleep and hibernation - not.

Have anyone idea where to look to make sleep and hibernation great again?

AD1
I've also removed file below and regenerated initramfs, but no dice.
Code:
/etc/initramfs-tools/conf.d #: cat pve-initramfs.conf
# disable suspend-to-disk, as it delays boot on systems with root on ZFS
RESUME=none
/etc/initramfs-tools/conf.d #: rm pve-initramfs.conf
/etc/initramfs-tools/conf.d #: update-initramfs -k all -u
 
Last edited:
  • Like
Reactions: jayarmstrong
In a ZFS setup, you will not have any swap partition unless you create one. AFAIK vanilla ZFS-only-systems cannot be hibernated to swap (even if on the zpool), can they?

You should try to test with a dedicated swap partition that is large enough to fit your whole physical memory. Have you tried that?
 
@LnxBil If you are referring to me - I have SWAP partition, sized 33GB (32GB ram here, not even half of that is never used), and only ext4 is used and ceph.
 
Last edited:
Hi aaron,

I want to use proxmox in my laptop, and running both macos and windows on it. So I just added xfce2 to proxmox and got a GUI then it's OK to enter vm with same machine. So the hibernate mode is the best choice if I want to take this laptop to office.

I build a swap file and make it swapon, but when choose hibernate, it just reboot...

After reboot, the swapfile keeps off.

I google it and many replies said uswsusp was required, but apt-get install uswsusp found no packages... I think I could fetch the target uswsusp package from debian download site, but is that the right way to make hibernate run on proxmox???

btw, the proxmox version is newest 7.0.1.
I'm facing this problem too (PVE 7.3 installed on a debian 11.6 vanilla) and I've tried lot of combos.
Actually hibernation... often works but sometimes the server immediately reboot after i execute systemctl hibernate. After this reboot, if I re-execute the systemctl hibernate, it works. I have a swap disk partition and I modify grub to use it using resume=uuid= parameter (and update-grub soon after).
 
I've done some more tests and seems proxmox@debian breaks something in the hibernation configs: I've also compared a debian machine with a proxmox one (very similar hw) and they have most of the related files similar too...debian works, proxmox does not or, saying better: my proxmox machine should been hibernated almost... twice before obtain it, because the first time it reboot, even if my /sys/power/disk is [platform] shutdown reboot suspend test_resume: it seems to act as "reboot", the first time.
 
Hi,
I'm also trying to config on a new bare metal, Proxmox 8.0.2 (my previous post remains unsolved for me :( ).
I've defined - during the install process - and seen that there is a swap partition, even if not in the classic way I'm used to see ('cause I'm newbie :D... I've to study lvm and pve partitions).
Now, if I tried to hibernate, it seems that partition is not seen as a swap one and not used (I say so because the system just shutdown).
Is there a way to do this?
This is my fstab:
Code:
# <file system> <mount point> <type> <options> <dump> <pass>
/dev/pve/root / ext4 errors=remount-ro 0 1
UUID=DA0A-1AA9 /boot/efi vfat defaults 0 1
/dev/pve/swap none swap sw 0 0
proc /proc proc defaults 0 0
UUID=2dc3e04f-f161-4023-8419-123677d7cbc4 /my_data/disk_1    ext4    defaults 0   2
and this is my lsblk output:
Code:
NAME               MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
sda                  8:0    0 931.5G  0 disk
└─sda1               8:1    0 931.5G  0 part /my_data/disk_1
sdb                  8:16   0 238.5G  0 disk
├─sdb1               8:17   0  1007K  0 part
├─sdb2               8:18   0     1G  0 part /boot/efi
└─sdb3               8:19   0 237.5G  0 part
  ├─pve-swap       253:0    0    20G  0 lvm  [SWAP]
  ├─pve-root       253:1    0  66.4G  0 lvm  /
  ├─pve-data_tmeta 253:2    0   1.3G  0 lvm
  │ └─pve-data     253:4    0 132.4G  0 lvm
  └─pve-data_tdata 253:3    0 132.4G  0 lvm
    └─pve-data     253:4    0 132.4G  0 lvm

If may help this is etc/systemd/sleep.conf. have I to decomment something?

Code:
[Sleep]
#AllowSuspend=yes
#AllowHibernation=yes
#AllowSuspendThenHibernate=yes
#AllowHybridSleep=yes
#SuspendMode=
#SuspendState=mem standby freeze
#HibernateMode=platform shutdown
#HibernateState=disk
#HybridSleepMode=suspend platform shutdown
#HybridSleepState=disk
#HibernateDelaySec=
#SuspendEstimationSec=60min

Maybe you need also some grub config file? Some form journalctl?

Thanks a lot for any suggestions!!
 
Last edited:
Hi,
I'm also trying to config on a new bare metal, Proxmox 8.0.2 (my previous post remains unsolved for me :( ).
I've defined - during the install process - and seen that there is a swap partition, even if not in the classic way I'm used to see ('cause I'm newbie :D... I've to study lvm and pve partitions).
Now, if I tried to hibernate, it seems that partition is not seen as a swap one and not used (I say so because the system just shutdown).
Is there a way to do this?
This is my fstab:
Code:
# <file system> <mount point> <type> <options> <dump> <pass>
/dev/pve/root / ext4 errors=remount-ro 0 1
UUID=DA0A-1AA9 /boot/efi vfat defaults 0 1
/dev/pve/swap none swap sw 0 0
proc /proc proc defaults 0 0
UUID=2dc3e04f-f161-4023-8419-123677d7cbc4 /my_data/disk_1    ext4    defaults 0   2
and this is my lsblk output:
Code:
NAME               MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
sda                  8:0    0 931.5G  0 disk
└─sda1               8:1    0 931.5G  0 part /my_data/disk_1
sdb                  8:16   0 238.5G  0 disk
├─sdb1               8:17   0  1007K  0 part
├─sdb2               8:18   0     1G  0 part /boot/efi
└─sdb3               8:19   0 237.5G  0 part
  ├─pve-swap       253:0    0    20G  0 lvm  [SWAP]
  ├─pve-root       253:1    0  66.4G  0 lvm  /
  ├─pve-data_tmeta 253:2    0   1.3G  0 lvm
  │ └─pve-data     253:4    0 132.4G  0 lvm
  └─pve-data_tdata 253:3    0 132.4G  0 lvm
    └─pve-data     253:4    0 132.4G  0 lvm

If may help this is etc/systemd/sleep.conf. have I to decomment something?

Code:
[Sleep]
#AllowSuspend=yes
#AllowHibernation=yes
#AllowSuspendThenHibernate=yes
#AllowHybridSleep=yes
#SuspendMode=
#SuspendState=mem standby freeze
#HibernateMode=platform shutdown
#HibernateState=disk
#HybridSleepMode=suspend platform shutdown
#HybridSleepState=disk
#HibernateDelaySec=
#SuspendEstimationSec=60min

Maybe you need also some grub config file? Some form journalctl?

Thanks a lot for any suggestions!!
I don't know if this is still true, haven't used hibernate for over 10 years, but there is kernel command line setting resume=<UUID-of-your-swap> that tries to explicitly use this. Maybe this helps.
 
Yes it is a thing I would try but I'm not sure that the proxmox lvm filesystem might be used in that way. So, before doing this, I prefer to ask :) if it enough to add:
Code:
resume=uuid=328d8454-9e72-4598-aacf-cbf6add14c87
that is the swap uuid
in
Code:
/etc/default/grub
in line
Code:
GRUB_CMDLINE_LINUX_DEFAULT="quiet intel_iommu=on i915.enable_gvt=1"
and then
Code:
update-grub
and reboot?
 
Last edited:
uhm, I've seen the config of another machine where hibernation generally work and it has a file named resume with the swap uuid partition in the folder /etc/initramfs-tools/conf.d/
Note the presence of another file in the folder, named /etc/initramfs-tools/conf.d/pve-initramfs.conf that contains
Code:
# disable suspend-to-disk, as it delays boot on systems with root on ZFS
RESUME=none
I did the same and the machine seems to hibernate but does not wake up.
Restarting via hard botton I have the same error I have on the other machine (where sometimes works):
TASK ERROR: command '/usr/bin/termproxy 5900 --path /nodes/proxmox-node2 --perm Sys.Console -- /bin/login -f root' failed: exit code 1
 

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!