ข้ามไปที่เนื้อหา

How to configure guest VM shutdown behavior

You can customize the libvirt-guests service's behavior to choose how the guest virtual machines manage the shutdown requests received from the host server. For more information about the libvirt-guests service, read libvirt's libvirt-guests documentation.

Configuration file and backup location

You can locate the libvirt-guests file, in the following location:

Operating System type File path
Debian-based OS /etc/default/libvirt-guests
non-Debian-based OS /etc/sysconfig/libvirt-guests

If the configuration file already exists, the agent will attempt to create a backup. View the following example:

/etc/default/libvirt-guests.solus.backup

If a backup file already exists, the agent will not overwrite the existing file.

How to customize shutdown behavior

You can customize the following variables:

Variable Description Example
ON_SHUTDOWN The action taken on host shutdown. ON_SHUTDOWN=shutdown
PARALLEL_SHUTDOWN The number of guests to shutdown in parallel. PARALLEL_SHUTDOWN=5
SHUTDOWN_TIMEOUT The amount of time to wait for guest vm shutdown, in seconds. SHUTDOWN_TIMEOUT=200

The agent will always write the following variables and their set values. You cannot adjust them:

  • BYPASS_CACHE=0
  • SYNC_TIME=1
  • ON_BOOT=ignore

After you change the configuration, restart the SolusVM Agent service.

Example configuration file

# Managed by SolusVM
# ON_SHUTDOWN, PARALLEL_SHUTDOWN and SHUTDOWN_TIMEOUT can be changed in
# /etc/solus/agent.json with libvirt_guests_on_shutdown,
# libvirt_guests_parallel_shutdown and libvirt_guests_shutdown_timeout.
# Restart solus-agent.service to apply changes.
ON_SHUTDOWN=shutdown
PARALLEL_SHUTDOWN=5
SHUTDOWN_TIMEOUT=200
BYPASS_CACHE=0
SYNC_TIME=1
ON_BOOT=ignore