virsh-pool-autostart
Enable/disable automatic starting of storage pools
TLDR
Enable autostart for the storage pool specified by name or UUID (determine using virsh pool-list)
Disable autostart for the storage pool specified by name or UUID
SYNOPSIS
virsh pool-autostart
PARAMETERS
The unique name of the libvirt storage pool to configure. This name must correspond to an existing, defined storage pool.
--enable
Sets the autostart property for the specified storage pool to 'yes'. The pool will automatically start when the libvirt daemon initializes.
--disable
Sets the autostart property for the specified storage pool to 'no'. The pool will not automatically start and will require manual startup using virsh pool-start.
DESCRIPTION
The phrase "virsh-pool-autostart" commonly refers to the functionality provided by the virsh pool-autostart command. This command is a crucial part of managing libvirt-based virtualization environments, primarily KVM and QEMU. Its purpose is to configure whether a defined storage pool should automatically start when the libvirt daemon (libvirtd) service initializes.
By enabling autostart for a storage pool, administrators ensure that the storage resources required by virtual machines are automatically available upon system boot or libvirt service restart, thus improving the availability and reliability of the virtualized environment. Conversely, disabling autostart prevents a pool from starting automatically, requiring manual intervention to bring it online. This command modifies the persistent configuration of the storage pool.
CAVEATS
Permissions: This command typically requires root privileges or appropriate permissions configured within libvirt's PolicyKit rules. Running it as a non-privileged user may result in permission denied errors.
Resource Consumption: Autostarting numerous or large storage pools can increase system boot time and resource consumption (e.g., memory, disk I/O) as libvirt attempts to activate them.
External Dependencies: For storage pools that rely on external resources (e.g., NFS shares, iSCSI targets), ensure these dependencies are available and mounted/connected before libvirt attempts to start the pool at boot. Failure to do so can lead to pool startup failures.
CHECKING AUTOSTART STATUS
To verify the autostart status of a storage pool, you can use the virsh pool-list --all command. The 'Autostart' column will show 'yes' or 'no' for each pool. Alternatively, virsh pool-info
LISTING STORAGE POOLS
Before using virsh pool-autostart, you might need to identify the exact name of the storage pool. This can be done with virsh pool-list --all, which lists all defined storage pools, whether active or inactive.
HISTORY
The virsh command-line tool and its subcommands, including pool-autostart, are integral parts of the libvirt project. Libvirt was started in 2005 to provide a common management API for various virtualization technologies (KVM, QEMU, Xen, LXC, etc.). The storage pool management features, including autostart capabilities, were developed to provide robust and automated handling of storage resources essential for virtual machines, making it easier for administrators to deploy and manage persistent virtualized environments.
SEE ALSO
virsh(1), virsh-pool-list(1), virsh-pool-start(1), virsh-pool-destroy(1), virsh-pool-define(1), libvirtd(8)