Enable Sleep / Hibernate in Windows VM after Inactivity to Free Up Server Resources


Recommended Posts

Hello - i successfully installed the Windows 11 VM but haven’t been able to figure out how to automatically sleep/hibernate the VM so that my server resources can be freed up for other uses when I’m not actively accessing the VM. Is there such a setting available either within Unraid or Windows VM itself (i.e. After 30 mins of inactivity, the VM either sleeps or hibernates)? The goal is simply to prevent power usage + free up my RAM/CPU/disk usage when i’m not actually using the VM.

 

After i’ve figured out the above - the next thing i want to figure out is how to then wake up the machine again using my remote desktop software (Anydesk). I believe Anydesk has the ability to send a WOL packet, but i want to first figure out how to sleep the VM before i do this next step.

Link to comment
  • 4 months later...
  • 3 weeks later...
On 8/29/2021 at 9:58 AM, Linguafoeda said:

After i’ve figured out the above - the next thing i want to figure out is how to then wake up the machine again using my remote desktop software (Anydesk). I believe Anydesk has the ability to send a WOL packet, but i want to first figure out how to sleep the VM before i do this next step.

If you want WOL functionally for the VM, you need to install:

  1. Wake On Lan support plugin  (prereq for #3)
  2. NerdPack plugin - to select and install Python 2 (prereq for #3)
  3. Virtual Machine Wake On Lan plugin

VM sleep works out of the box (once user agent is installed), I've not had any issues using it... well other than the same flakiness windows exhibits in bare metal when waking sometimes.

Not tried hibernate, but I know there was a setting in the VM Manager to change the default shutdown action, if that helps.

I would have expected hibernate to work if fully enabled in the OS itself.

image.png.8032b4599586f82742a2964832810995.png

Link to comment
  • 2 months later...
On 1/16/2022 at 7:09 PM, tjb_altf4 said:

If you want WOL functionally for the VM, you need to install:

  1. Wake On Lan support plugin  (prereq for #3)
  2. NerdPack plugin - to select and install Python 2 (prereq for #3)
  3. Virtual Machine Wake On Lan plugin

VM sleep works out of the box (once user agent is installed), I've not had any issues using it... well other than the same flakiness windows exhibits in bare metal when waking sometimes.

Not tried hibernate, but I know there was a setting in the VM Manager to change the default shutdown action, if that helps.

I would have expected hibernate to work if fully enabled in the OS itself.

image.png.8032b4599586f82742a2964832810995.png

 

@tjb_altf4 I installed "python-2.7.11-x86_64-2.txz" as well as both WoL / VM WoL plugins. Do i need to do anything else?

Link to comment
2 minutes ago, Linguafoeda said:

@tjb_altf4 I installed "python-2.7.11-x86_64-2.txz" as well as both WoL / VM WoL plugins. Do i need to do anything else?

For physical machines, you may need to enable WOL, which sometimes gets obfuscated under different named settings.

For VMs, WOL should work once those prereqs are in place.

 

Under Settings > Wake On LAN, you will find a network scan tab to find computers... if yours doesn't show you can add the MAC address manually.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.