OCF_HEARTBEAT_XEN(7)
OCF_HEARTBEAT_XEN π
okay bestie, this is the ocf_heartbeat_Xen page from the OCF resource agents manual (section 7, iykyk) and it's literally all about babysitting Xen unprivileged domains. let's go π§
β¨ NAME β¨
ocf_heartbeat_Xen β manages Xen unprivileged domains, aka DomUs, no cap π
β¨ SYNOPSIS β¨
Xen [start | stop | monitor | migrate_to | migrate_from | meta-data |
validate-all]
β¨ DESCRIPTION β¨
So this is a Resource Agent for the Xen Hypervisor π It manages Xen virtual machine instances by mapping cluster resource start and stop to Xen create and shutdown, respectively. it's giving translator energy fr fr π«Ά
πΈ a note on names πΈ
okay so names are lowkey a whole saga. we will try to extract the name from the config file (the xmfile attribute). If you use a simple assignment statement, then you should be fine. But otherwise β if there's some python acrobacy involved like dynamically assigning names depending on other variables, and we will try to detect this β then please set the name attribute. You should also do that if there is any chance of a pathological situation where a config file might be missing, for example if it resides on a shared storage. And if all fails, we finally fall back to the instance id to preserve backward compatibility. bestie we tried everything π
Para-virtualized guests can also be migrated by enabling the meta_attribute allow-migrate. iconic behavior β¨
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. periodt π
β¨ SUPPORTED PARAMETERS β¨
xmfileβ Absolute path to the Xen control file, for this virtual machine. π (required, string, default"/etc/xen/vm/MyDomU")nameβ Name of the virtual machine. π (optional, string, no default)shutdown_timeoutβ The Xen agent will first try an orderly shutdown usingxl shutdown. Should this not succeed within this timeout, the agent will escalate toxl destroy, forcibly killing the node. π
If this is not set, it will default to two-third of the stop action timeout.
Setting this value to 0 forces an immediate destroy. (so dramatic, so final)
(optional, string, no default)
shutdown_acpiβ Handle shutdown by simulating an ACPI power button event. Enable this to allow graceful shutdown for HVM domains without installed PV drivers. π¦ (optional, boolean, default0)allow_mem_managementβ This parameter enables dynamic adjustment of memory for start and stop actions used for Dom0 and the DomUs. The default is to not adjust memory dynamically. π (optional, boolean, default0)node_ip_attributeβ In case of a live migration, the system will default to using the IP address associated with the hostname via DNS or/etc/hosts.
This parameter allows you to specify a node attribute that will be queried instead for the target node, overriding the IP address. This allows you to use a dedicated network for live migration traffic to a specific node. π₯
Warning: make very sure the IP address does point to the right node. Or else the live migration will end up somewhere else, greatly confusing the cluster and causing havoc. bestie PLEASE double check this one, we are not joking π
(optional, string, no default)
reserved_Dom0_memoryβ In case memory management is used, this parameter defines the minimum amount of memory to be reserved for the dom0. The default minimum memory is 512MB. (optional, string, default"512")autoset_utilization_cpuβ If set true, the agent will detect the number of domain's vCPUs from Xen, and put it into the CPU utilization of the resource when the monitor is executed. Before enabling make sure node utilization is also set (using NodeUtilization agent or manually) or the resource might not be able to start anywhere. π (optional, boolean, defaultfalse)autoset_utilization_hv_memoryβ If set true, the agent will detect the number of memory from Xen, and put it into thehv_memoryutilization of the resource when the monitor is executed. Before enabling make sure node utilization is also set (using NodeUtilization agent or manually) or the resource might not be able to start anywhere. πΈ (optional, boolean, defaultfalse)monitor_scriptsβ To additionally monitor services within the unprivileged domain, add this parameter with a list of scripts to monitor. π (optional, string, no default)
β¨ SUPPORTED ACTIONS β¨
This resource agent supports the following actions (operations):
startβ Starts the resource. Suggested minimum timeout: 60s. πstopβ Stops the resource. Suggested minimum timeout: 40s. πmigrate_fromβ Executes steps necessary for migrating the resource away from the node. Suggested minimum timeout: 120s. π¦migrate_toβ Executes steps necessary for migrating the resource to the node. Suggested minimum timeout: 120s. π¦monitorβ Performs a detailed status check. Suggested minimum timeout: 30s. Suggested interval: 10s. πmeta-dataβ Retrieves resource agent metadata (internal use only). Suggested minimum timeout: 5s. π€«validate-allβ Performs a validation of the resource configuration. Suggested minimum timeout: 5s. β
β¨ EXAMPLE CRM SHELL β¨
The following is an example configuration for a Xen resource using the crm(8) shell:
primitive p_Xen ocf:heartbeat:Xen \
params \
xmfile="/etc/xen/vm/MyDomU" \
meta allow-migrate="true" \
op monitor depth="0" timeout="30s" interval="10s"
copy it, paste it, slay it π
β¨ EXAMPLE PCS β¨
The following is an example configuration for a Xen resource using pcs(8)
pcs resource create p_Xen ocf:heartbeat:Xen \
xmfile="/etc/xen/vm/MyDomU" \
op monitor OCF_CHECK_LEVEL="0" timeout="30s" interval="10s"
β¨ SEE ALSO β¨
β¨ AUTHOR β¨
ClusterLabs contributors (see the resource agent source for information about individual authors) π«Ά
and that's the whole page bestie, you ate π this one's from resource-agents UNKNOWN, dated 04/08/2026 β mwah, go forth and migrate responsibly, and don't touch that node_ip_attribute unless you're SURE πβ¨π
π¦ where this page comes from
- fedora 43: resource-agents 4.18.0-1.fc43 Β· GPL-2.0-or-later AND LGPL-2.1-or-later
- fedora 44: resource-agents 4.18.0-1.fc44 Β· GPL-2.0-or-later AND LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms