mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
Introduce two new methods for triggering controlled shutdown/reboot
The virDomainShutdownFlags and virDomainReboot APIs allow the caller to request the operation is implemented via either acpi button press or a guest agent. For containers, a couple of other methods make sense, a message to /dev/initctl, and direct kill(SIGTERM|HUP) of the container init process. Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
This commit is contained in:
@@ -1385,6 +1385,8 @@ typedef enum {
|
||||
VIR_DOMAIN_SHUTDOWN_DEFAULT = 0, /* hypervisor choice */
|
||||
VIR_DOMAIN_SHUTDOWN_ACPI_POWER_BTN = (1 << 0), /* Send ACPI event */
|
||||
VIR_DOMAIN_SHUTDOWN_GUEST_AGENT = (1 << 1), /* Use guest agent */
|
||||
VIR_DOMAIN_SHUTDOWN_INITCTL = (1 << 2), /* Use initctl */
|
||||
VIR_DOMAIN_SHUTDOWN_SIGNAL = (1 << 3), /* Send a signal */
|
||||
} virDomainShutdownFlagValues;
|
||||
|
||||
int virDomainShutdown (virDomainPtr domain);
|
||||
@@ -1395,6 +1397,8 @@ typedef enum {
|
||||
VIR_DOMAIN_REBOOT_DEFAULT = 0, /* hypervisor choice */
|
||||
VIR_DOMAIN_REBOOT_ACPI_POWER_BTN = (1 << 0), /* Send ACPI event */
|
||||
VIR_DOMAIN_REBOOT_GUEST_AGENT = (1 << 1), /* Use guest agent */
|
||||
VIR_DOMAIN_REBOOT_INITCTL = (1 << 2), /* Use initctl */
|
||||
VIR_DOMAIN_REBOOT_SIGNAL = (1 << 3), /* Send a signal */
|
||||
} virDomainRebootFlagValues;
|
||||
|
||||
int virDomainReboot (virDomainPtr domain,
|
||||
|
||||
Reference in New Issue
Block a user