Skip to content
www.mytechnote.ru
Menu
  • Administration
    • Scripts
  • Equipment
    • Reviews
    • Instructions
  • Other
  • English
    • English
    • Русский
Menu

Speed up a Ubuntu KVM host turn off process

I faced a problem – if there is a virtualization system KVM on ubuntu installed, then when host is turning off or rebooting, if it has working vms on it, the process of turning off is too slow. I’ve find out that this happens because of two things – the first is – when host is turning off virtual machines are comming to suspend state, and that process takes a long time. And second – there are too big timeouts for turning off – 5 minutes to each VM, and host can turn off only one vm at same time.

In this article I will show you how you can change suspend to power off, and how to decrease timeouts for turn off.

Attention – do not try to do that on working enviroments. If vm stops forcefully there is a chache to break VMs file sytem. My host is home computer, all virtual machines are for testing purpurces, and for me shutdown speed of host if much more  important than data on those vms.

Overall, you have to change a script – /usr/lib/libvirt/libvirt-guests.sh

On it you should change strings:

ON_SHUTDOWN=shutdown
SHUTDOWN_TIMEOUT=5
PARALLEL_SHUTDOWN=10

Let me explain. On first string we changing suspend to shutdown, for turning off save state on host shutdown.

On the second string we set the shutdown timeout. This is the time, after what VM will be turned off forcefully.

On the third string we are setting host to shutdown 10 vms at the same time.

After I edited that script the speed of turning off and reboots for my computer became much more faster.

I have a video on that theme (it is on Russian language):

Posted on 30.09.202030.05.2024 by sanglyb

Post navigation

← How to access Linux filesystem from Windows. WinSCP.
How to create a full copy of HDD →

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Подписывайтесь

Youtube
vk
telegram
github
twitter
rss
  • Форум
  • Об авторе
  • Поддержать автора

Популярные записи

Новые записи

  • How to Extend an LVM Partition in Linux
  • SCCM Reporting Errors After Migrating from SQL Server 2016 to 2019
  • Problem Using PassFiltEx on Older CPUs
  • How to remove attachments from old calendar events in Exchange using a script
  • How to download and install Office 2024 LTSC

Архивы

  • 2026 (3)
  • 2025 (5)
  • 2024 (7)
  • 2023 (30)
  • 2022 (4)
  • 2020 (17)
  • 2017 (82)
  • 2016 (5)
© 2015-2026 www.mytechnote.ru
Использование материалов сайта возможно только с разрешения владельца или обязательна индексируемая, прямая, передающая вес ссылка на материал.