OCF_HEARTBEAT_VIRTUA(7) OCF resource agents OCF_HEARTBEAT_VIRTUA(7)NAMEocf_heartbeat_VirtualDomain - Manages virtual domains through the
libvirt virtualization framework
SYNOPSIS
VirtualDomain [start | stop | status | monitor | migrate_to |
migrate_from | meta-data | validate-all]
DESCRIPTION
Resource agent for a virtual domain (a.k.a. domU, virtual machine,
virtual environment etc., depending on context) managed by libvirtd.
This resource agent may be configured for native migration if available
in the cluster manager. For Pacemaker, the allow-migrate="true" meta
attribute enables native migration.
SUPPORTED PARAMETERS
config
Absolute path to the libvirt configuration file, for this virtual
domain.
(unique, required, string, no default)
hypervisor
Hypervisor URI to connect to. See the libvirt documentation for
details on supported URI formats. The default is system dependent.
(optional, string, no default)
force_stop
Always forcefully shut down ("destroy") the domain on stop. The
default behavior is to resort to a forceful shutdown only after a
graceful shutdown attempt has failed. You should only set this to
true if your virtual domain (or your virtualization backend) does
not support graceful shutdown.
(optional, boolean, default 0)
migration_transport
Transport used to connect to the remote hypervisor while migrating.
Please refer to the libvirt documentation for details on transports
available. If this parameter is omitted, the resource will use
libvirt´s default transport to connect to the remote hypervisor.
(optional, string, no default)
migration_network_suffix
Use a dedicated migration network. The migration URI is composed by
adding this parameters value to the end of the node name. If the
node name happens to be an FQDN (as opposed to an unqualified host
name), insert the suffix immediately prior to the first period (.)
in the FQDN. At the moment Qemu/KVM and Xen migration via a
dedicated network is supported.
Note: Be sure this composed host name is locally resolveable and
the associated IP is reachable through the favored network.
(optional, string, no default)
monitor_scripts
To additionally monitor services within the virtual domain, add
this parameter with a list of scripts to monitor.
Note: when monitor scripts are used, the start and migrate_from
operations will complete only when all monitor scripts have
completed successfully. Be sure to set the timeout of these
operations to accommodate this delay.
(optional, string, no default)
autoset_utilization_cpu
If set true, the agent will detect the number of domainU´s vCPUs
from virsh, and put it into the CPU utilization of the resource
when the monitor is executed.
(optional, boolean, default true)
autoset_utilization_hv_memory
If set true, the agent will detect the number of *Max memory* from
virsh, and put it into the hv_memory utilization of the resource
when the monitor is executed.
(optional, boolean, default true)
migrateport
This port will be used in the qemu migrateuri. If unset, the port
will be a random highport.
(optional, integer, no default)
snapshot
Path to the snapshot directory where the virtual machine image will
be stored. When this parameter is set, the virtual machine´s RAM
state will be saved to a file in the snapshot directory when
stopped. If on start a state file is present for the domain, the
domain will be restored to the same state it was in right before it
stopped last. This option is incompatible with the ´force_stop´
option.
(optional, string, no default)
SUPPORTED ACTIONS
This resource agent supports the following actions (operations):
start
Starts the resource. Suggested minimum timeout: 90.
stop
Stops the resource. Suggested minimum timeout: 90.
status
Performs a status check. Suggested minimum timeout: 30. Suggested
interval: 10.
monitor
Performs a detailed status check. Suggested minimum timeout: 30.
Suggested interval: 10.
migrate_from
Executes steps necessary for migrating the resource away from the
node. Suggested minimum timeout: 60.
migrate_to
Executes steps necessary for migrating the resource to the node.
Suggested minimum timeout: 120.
meta-data
Retrieves resource agent metadata (internal use only). Suggested
minimum timeout: 5.
validate-all
Performs a validation of the resource configuration. Suggested
minimum timeout: 5.
EXAMPLE
The following is an example configuration for a VirtualDomain resource
using the crm(8) shell:
primitive p_VirtualDomain ocf:heartbeat:VirtualDomain \
params \
config=string \
meta allow-migrate="true" \
op monitor depth="0" timeout="30" interval="10"
SEE ALSO
http://www.linux-ha.org/wiki/VirtualDomain_(resource_agent)AUTHOR
Linux-HA contributors (see the resource agent source for information
about individual authors)
resource-agents 3.9.2 11/21/2013 OCF_HEARTBEAT_VIRTUA(7)