The Tallest Dwarf

RSSEmailTwitterGitHubDribbbleLinkedInFacebookInstagramYouTubePinterestReddit icon

Auto suspend and resume KVM Virtual Machine with the host

Posted at — Sep 13, 2021 by Abishek Muthian

When the host machine is suspended while the KVM through QEMU is running lead to issues like display unable to wake up when resuming suspend.

Suspending and resuming the Virtual Machine when the host machine is suspended using hooks in systemd and resumed fixes this issue.

Description=Local system suspend actions

ExecStart=-virsh suspend ubuntu20.04

Description=Local system resume actions

ExecStart=-virsh resume ubuntu20.04

sudo systemctl enable root-resume
sudo systemctl enable root-suspend

I also enabled,




to shutdown the VM along with the host.

Did I add value?

Out of respect for your attention and concern for your privacy I don't have advertisements or any tracking cookie.

Let's have an obligation free discussion on this content or other common interests over email while supporting The Tallest Dwarf to continue writing.

If you cannot make a monetary support, I understand; Please like and share this content in the platform of your choice to defeat their conformist algorithms.

Jarett has bought a Coffee for The Tallest Dwarf. Here are the other supporters.