QEMU/KVM ACPI Guest Shutdown: Difference between revisions
(Added to Qemu/KVM and added headlines + cleaned up language a bit. todo: adding something about ACPI to pve-docs?) |
(grammar/typo fixes) |
||
(4 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
= Introduction = | = Introduction = | ||
Proxmox VE uses ACPI to send | Proxmox VE uses ACPI by default to send shutdown signals to the Virtual Machines (QEMU/KVM). | ||
That means that your Virtual Machines needs to support ACPI, so that it may react to such signals. | |||
You should check if your VM reacts properly to the ACPI signals | You should check if your VM reacts properly to the ACPI signals, as else the VM may not shutdown and Proxmox VE will force-stop it after a timeout on some API calls. | ||
Such a stop can lead to data loss in the worst case. | |||
= Linux = | = Linux = | ||
For Linux | For Linux VMs you need to make sure that the ACPI event daemon is installed and running. | ||
Desktop distributions should already have it setup out of the box, but minimal- or server distributions often do not. | |||
For Ubuntu and Debian install the 'acpid' package in the Virtual Machine. | For Ubuntu and Debian install the 'acpid' package in the Virtual Machine. | ||
apt update | |||
apt install acpid | |||
= Windows = | = Windows = | ||
Line 16: | Line 20: | ||
For Windows, make sure an ACPI HAL is installed. | For Windows, make sure an ACPI HAL is installed. | ||
On Windows | On older Windows Server 2003/8 also make sure to change policy to allow shutdown without being logged into the system. | ||
Start -> Run: | Start -> Run: | ||
gpedit.msc | gpedit.msc | ||
Line 23: | Line 27: | ||
Computer Configuration\Windows Settings\Security Settings\Local Policies\Security Options\Shutdown: Allow system to be shut down without having to log on | Computer Configuration\Windows Settings\Security Settings\Local Policies\Security Options\Shutdown: Allow system to be shut down without having to log on | ||
Change it to Enabled. | Change it to "Enabled". | ||
===Windows HAL Links=== | ===Windows HAL Links=== | ||
* [http://support.microsoft.com/kb/309283 Microsoft HAL KB] | * [http://support.microsoft.com/kb/309283 Microsoft HAL KB] | ||
* [http://www.techsupportforum.com/hardware-support/motherboards-bios-cpu/212903-truly-unique-problem-acpi-hal.html Moving from one HAL to another] | * [http://www.techsupportforum.com/hardware-support/motherboards-bios-cpu/212903-truly-unique-problem-acpi-hal.html Moving from one HAL to another] | ||
= QEMU Guest Agent as Alternative = | |||
ACPI shutdown may not always work, one can setup the [[Qemu-guest-agent|QEMU Guest Agent (QGA)]] as an alternative. | |||
Just ensure that you enable it in the VMs Options in the Proxmox VE webinterface, and to install and run the agent inside the VM. | |||
[[Category: HOWTO]] | [[Category: HOWTO]] | ||
[[Category: Qemu/KVM]] | [[Category: Qemu/KVM]] |
Latest revision as of 13:49, 14 October 2020
Introduction
Proxmox VE uses ACPI by default to send shutdown signals to the Virtual Machines (QEMU/KVM). That means that your Virtual Machines needs to support ACPI, so that it may react to such signals.
You should check if your VM reacts properly to the ACPI signals, as else the VM may not shutdown and Proxmox VE will force-stop it after a timeout on some API calls. Such a stop can lead to data loss in the worst case.
Linux
For Linux VMs you need to make sure that the ACPI event daemon is installed and running. Desktop distributions should already have it setup out of the box, but minimal- or server distributions often do not.
For Ubuntu and Debian install the 'acpid' package in the Virtual Machine.
apt update apt install acpid
Windows
For Windows, make sure an ACPI HAL is installed.
On older Windows Server 2003/8 also make sure to change policy to allow shutdown without being logged into the system. Start -> Run:
gpedit.msc
Find the following key:
Computer Configuration\Windows Settings\Security Settings\Local Policies\Security Options\Shutdown: Allow system to be shut down without having to log on
Change it to "Enabled".
Windows HAL Links
QEMU Guest Agent as Alternative
ACPI shutdown may not always work, one can setup the QEMU Guest Agent (QGA) as an alternative.
Just ensure that you enable it in the VMs Options in the Proxmox VE webinterface, and to install and run the agent inside the VM.