[Linux-cluster] CCS to add VM to RHCS?
Robert Hayden
rhayden.public at gmail.com
Thu Aug 4 13:48:23 UTC 2011
I was attempting to add VM resources to a two node cluster with the
ccs tool (RHEL 6.1). I believe that it I am either not using the
proper ccs command or there is a bug in the ccs tool for VMs. Wanted
to see if anyone has attempted this before I go to bugzilla.
Command:
ccs -f cluster.build --addresource vm name=vm_b migrate=live
domain=kvm_node2_fo_domain autostart=1 recovery=restart use_virsh=1
ccs -f cluster.build --addresource vm name=vm_a migrate=live
domain=kvm_node1_fo_domain autostart=1 recovery=restart use_virsh=1
These modify the cluster.build file as follows. Notice that the <vm>
stanzas are located within the <resource>. From what I have been able
to determine, the <vm> stanzas need to be in the <rm>, but not as a
"resource". Otherwise rgmanager does not pick the VMs up.
<rm>
<failoverdomains>
<failoverdomain name="kvm_node1_fo_domain" nofailback="1"
ordered="1" restricted="1">
<failoverdomainnode name="node1" priority="1"/>
<failoverdomainnode name="node2" priority="2"/>
</failoverdomain>
<failoverdomain name="kvm_node2_fo_domain" nofailback="1"
ordered="1" restricted="1">
<failoverdomainnode name="node1" priority="2"/>
<failoverdomainnode name="node2" priority="1"/>
</failoverdomain>
</failoverdomains>
<resources>
<vm autostart="1" domain="kvm_node1_fo_domain" migrate="live"
name="vm_a" recovery="restart" use_virsh="1"/>
<vm autostart="1" domain="kvm_node2_fo_domain" migrate="live"
name="vm_b" recovery="restart" use_virsh="1"/>
</resources>
</rm>
Correct <rm> stanza as far as I know, at least this allows for the VMs
to be seen with clustat and for them to be managed.
<rm>
<failoverdomains>
<failoverdomain name="kvm_node1_fo_domain" nofailback="1"
ordered="1" restricted="1">
<failoverdomainnode name="node1" priority="1"/>
<failoverdomainnode name="node2" priority="2"/>
</failoverdomain>
<failoverdomain name="kvm_node2_fo_domain" nofailback="1"
ordered="1" restricted="1">
<failoverdomainnode name="node1" priority="2"/>
<failoverdomainnode name="node2" priority="1"/>
</failoverdomain>
</failoverdomains>
<resource/>
<vm autostart="1" domain="kvm_node1_fo_domain" migrate="live"
name="vm_a" recovery="restart" use_virsh="1"/>
<vm autostart="1" domain="kvm_node2_fo_domain" migrate="live"
name="vm_b" recovery="restart" use_virsh="1"/>
</rm>
Thanks
Robert
More information about the Linux-cluster
mailing list