[Pacemaker] using ocf:heartbeat:VirtualDomain...

Stefan Schneebeli stefan.schneebeli at gmx.ch
Tue May 24 05:00:05 UTC 2011


Hi Jelle

I think you should not define the second VM with virt-install, because 
you will get a new UUID for the same VM.
Export the VM with "virsh dumpxml evelyn.powercraft.nl 
 >/tmp/evelyn.powercraft.nl.xml" on the first Node then copy the xml 
file to the other Node
and define the VM with "virsh define /tmp/evelyn.powercraft.nl.xml" so 
both of them have the same UUID on both
Nodes. This is the way I do it allways and it works.
Further you have make sure that both Nodes kann do ssh without a giving 
a password to each other with a Public/Private Keypair
for example.
Don't forget you have to set up the DRBD Device to primary/primary 
otherwise the migration will also not work.

Your ocf:heartbeat:VirtualDomain config seems OK. No reason why it 
should not work with it.

Best Regards,
Stefan



On 23.05.2011 20:31, Jelle de Jong wrote:
> Hello everybody,
>
> I am trying to get VirtualDomain working between two KVM host nodes.
>
> crm ra info ocf:heartbeat:VirtualDomain
>
> Parameters (* denotes required, [] the default):
> config* (string): Virtual domain configuration file
>      Absolute path to the libvirt configuration file,
>      for this virtual domain.
>
> http://paste.debian.net/117784/ #complete crm config
>
> primitive kvm_evelyn ocf:heartbeat:VirtualDomain \
>          params config="/etc/libvirt/qemu/evelyn.powercraft.nl.xml" \
>          hypervisor="qemu://:222/system" migration_transport="ssh" \
>          meta allow-migrate="true" \
>          op start timeout="120s" \
>          op stop timeout="180s" \
>          op monitor depth="0" timeout="30" interval="10"
>
> So I first imported the VM with virt-install on both nodes. This way
> they were defined on both nodes. But if VirtualDomain tries to migrate
> it fails with the error:
>
> May 23 20:01:55 hennessy lrmd: [10885]: info: RA output:
> (kvm_oakley:migrate_to:stderr) error: operation failed: domain
> 'oakley.powercraft.nl' already exists with uuid
> acec3772-424c-97bc-4738-26793302905d
>
> The libvirt people tell me I have to undefine the domain... so I did
>
> # connection and general info and the migration tests
> http://paste.debian.net/117736/
> # capabilities
> http://paste.debian.net/117745/
> # trial and error when "undefine" the domain on the other node
> http://paste.debian.net/117763/
>
> The migration seems to work but now the VirtualDomain state becomes
> "unmanaged" and I have no control anymore
>
> May 23 20:13:43 viktoriya VirtualDomain[26100]: ERROR: Configuration
> file /etc/libvirt/qemu/evelyn.powercraft.nl.xml does not exist or is not
> readable.
>
> How should I use the VirtualDomain RA?
>
> Thanks in advance,
>
> Kind regards,
>
> Jelle de Jong
>
> _______________________________________________
> Pacemaker mailing list: Pacemaker at oss.clusterlabs.org
> http://oss.clusterlabs.org/mailman/listinfo/pacemaker
>
> Project Home: http://www.clusterlabs.org
> Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
> Bugs: http://developerbugs.linux-foundation.org/enter_bug.cgi?product=Pacemaker
>
>




More information about the Pacemaker mailing list