CCS to add VM to RHCS?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
Linux-cluster mailing list
Linux-cluster@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/linux-cluster


[Index of Archives]     [Corosync Cluster Engine]     [GFS]     [Linux Virtualization]     [Centos Virtualization]     [Centos]     [Linux RAID]     [Fedora Users]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite Camping]

  Powered by Linux