'\" t .\" Title: ocf_heartbeat_VirtualDomain .\" Author: ClusterLabs contributors (see the resource agent source for information about individual authors) .\" Generator: DocBook XSL Stylesheets v1.78.1 .\" Date: 06/07/2017 .\" Manual: OCF resource agents .\" Source: resource-agents 4.0.0~rc1-4~bpo8+1 .\" Language: English .\" .TH "OCF_HEARTBEAT_VIRTUA" "7" "06/07/2017" "resource-agents 4.0.0~rc1-4~bp" "OCF resource agents" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" ocf_heartbeat_VirtualDomain \- Manages virtual domains through the libvirt virtualization framework .SH "SYNOPSIS" .HP \w'\fBVirtualDomain\fR\ 'u \fBVirtualDomain\fR [start | stop | status | monitor | migrate_to | migrate_from | meta\-data | validate\-all] .SH "DESCRIPTION" .PP Resource agent for a virtual domain (a\&.k\&.a\&. domU, virtual machine, virtual environment etc\&., depending on context) managed by libvirtd\&. .PP This resource agent may be configured for \fInative migration\fR if available in the cluster manager\&. For Pacemaker, the \fIallow\-migrate="true"\fR meta attribute enables native migration\&. .SH "SUPPORTED PARAMETERS" .PP \fBconfig\fR .RS 4 Absolute path to the libvirt configuration file, for this virtual domain\&. .sp (unique, required, string, no default) .RE .PP \fBhypervisor\fR .RS 4 Hypervisor URI to connect to\&. See the libvirt documentation for details on supported URI formats\&. The default is system dependent\&. Determine the system\*(Aqs default uri by running \*(Aqvirsh \-\-quiet uri\*(Aq\&. .sp (optional, string, no default) .RE .PP \fBforce_stop\fR .RS 4 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\&. .sp (optional, boolean, default 0) .RE .PP \fBmigration_transport\fR .RS 4 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\*(Aqs default transport to connect to the remote hypervisor\&. .sp (optional, string, no default) .RE .PP \fBmigration_downtime\fR .RS 4 Define max downtime during live migration in milliseconds .sp (optional, integer, default 0) .RE .PP \fBmigration_speed\fR .RS 4 Define live migration speed per resource in MiB/s .sp (optional, integer, default 0) .RE .PP \fBmigration_network_suffix\fR .RS 4 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\&. .sp Note: Be sure this composed host name is locally resolveable and the associated IP is reachable through the favored network\&. .sp See also the migrate_options parameter below\&. .sp (optional, string, no default) .RE .PP \fBmigrate_options\fR .RS 4 Extra virsh options for the guest live migration\&. You can also specify here \-\-migrateuri if the calculated migrate URI is unsuitable for your environment\&. If \-\-migrateuri is set then migration_network_suffix and migrateport are effectively ignored\&. Use "%n" as the placeholder for the target node name\&. .sp Please refer to the libvirt documentation for details on guest migration\&. .sp (optional, string, no default) .RE .PP \fBmonitor_scripts\fR .RS 4 To additionally monitor services within the virtual domain, add this parameter with a list of scripts to monitor\&. .sp 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\&. .sp (optional, string, no default) .RE .PP \fBautoset_utilization_cpu\fR .RS 4 If set true, the agent will detect the number of domainU\*(Aqs vCPUs from virsh, and put it into the CPU utilization of the resource when the monitor is executed\&. .sp (optional, boolean, default true) .RE .PP \fBautoset_utilization_hv_memory\fR .RS 4 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\&. .sp (optional, boolean, default true) .RE .PP \fBmigrateport\fR .RS 4 This port will be used in the qemu migrateuri\&. If unset, the port will be a random highport\&. .sp (optional, integer, no default) .RE .PP \fBsave_config_on_stop\fR .RS 4 Changes to a running VM\*(Aqs config are normally lost on stop\&. This parameter instructs the RA to save the configuration back to the xml file provided in the "config" parameter\&. .sp (optional, boolean, no default) .RE .PP \fBsync_config_on_stop\fR .RS 4 Setting this automatically enables save_config_on_stop\&. When enabled this parameter instructs the RA to call csync2 \-x to synchronize the file to all nodes\&. csync2 must be properly set up for this to work\&. .sp (optional, boolean, no default) .RE .PP \fBsnapshot\fR .RS 4 Path to the snapshot directory where the virtual machine image will be stored\&. When this parameter is set, the virtual machine\*(Aqs 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 \*(Aqforce_stop\*(Aq option\&. .sp (optional, string, no default) .RE .SH "SUPPORTED ACTIONS" .PP This resource agent supports the following actions (operations): .PP \fBstart\fR .RS 4 Starts the resource\&. Suggested minimum timeout: 90\&. .RE .PP \fBstop\fR .RS 4 Stops the resource\&. Suggested minimum timeout: 90\&. .RE .PP \fBstatus\fR .RS 4 Performs a status check\&. Suggested minimum timeout: 30\&. Suggested interval: 10\&. .RE .PP \fBmonitor\fR .RS 4 Performs a detailed status check\&. Suggested minimum timeout: 30\&. Suggested interval: 10\&. .RE .PP \fBmigrate_from\fR .RS 4 Executes steps necessary for migrating the resource \fIaway from\fR the node\&. Suggested minimum timeout: 60\&. .RE .PP \fBmigrate_to\fR .RS 4 Executes steps necessary for migrating the resource \fIto\fR the node\&. Suggested minimum timeout: 120\&. .RE .PP \fBmeta\-data\fR .RS 4 Retrieves resource agent metadata (internal use only)\&. Suggested minimum timeout: 5\&. .RE .PP \fBvalidate\-all\fR .RS 4 Performs a validation of the resource configuration\&. Suggested minimum timeout: 5\&. .RE .SH "EXAMPLE CRM SHELL" .PP The following is an example configuration for a VirtualDomain resource using the \fBcrm\fR(8) shell: .sp .if n \{\ .RS 4 .\} .nf primitive p_VirtualDomain ocf:heartbeat:VirtualDomain \e params \e config=\fIstring\fR \e meta allow\-migrate="true" \e op monitor depth="0" timeout="30" interval="10" .fi .if n \{\ .RE .\} .SH "EXAMPLE PCS" .PP The following is an example configuration for a VirtualDomain resource using \fBpcs\fR(8) .sp .if n \{\ .RS 4 .\} .nf pcs resource create p_VirtualDomain ocf:heartbeat:VirtualDomain \e config=\fIstring\fR \e op monitor depth="0" timeout="30" interval="10" .fi .if n \{\ .RE .\} .SH "SEE ALSO" .PP \m[blue]\fB\%http://clusterlabs.org/\fR\m[] .SH "AUTHOR" .PP \fBClusterLabs contributors (see the resource agent source for information about individual authors)\fR