Re: [ClusterLabs] kvm live migration, resource moving

2016-02-04 Thread Kyle O'Donnell
That is helpful but I think I am looking at the wrong documentation:

http://www.linux-ha.org/wiki/VirtualDomain_(resource_agent)
http://linux-ha.org/doc/man-pages/re-ra-VirtualDomain.html

Can you point me to the docs you are referencing?

- Original Message -
From: "RaSca" <ra...@miamammausalinux.org>
To: "users" <users@clusterlabs.org>
Sent: Thursday, February 4, 2016 6:48:26 AM
Subject: Re: [ClusterLabs] kvm live migration, resource moving

If your environment is successfully configured even from the libvirt
side, everything should work out of the box, if it does not work you can
pass migrate_options to make it work.

From the resource agent documentation:

migrate_options:  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.
Please refer to the libvirt documentation for details on guest migration.

Hope this helps,

-- 
RaSca
Mia Mamma Usa Linux: Niente è impossibile da capire, se lo spieghi bene!
ra...@miamammausalinux.org
http://www.miamammausalinux.org

Il giorno 4/2/2016 12:09:19, Kyle O'Donnell ha scritto:
> I explicitly stated I was using the VirtualDomain resource agent.
> 
> I did not know it supported live migration as when I ran crm resource move 
> guest nodeX, it shuts down the guest before moving it.
> 
> Let me rephrase my question... How do I use the VirtualDomain resource agent 
> to live migrate a kvm guest between nodes in my cluster.
> 
> pacemaker 1.1.10+git20130802-1ubuntu2.3
> resource-agents 1:3.9.3+git20121009-3ubuntu2
> 
> - Original Message -
> From: "RaSca" <ra...@miamammausalinux.org>
> To: "users" <users@clusterlabs.org>
> Sent: Thursday, February 4, 2016 4:30:18 AM
> Subject: Re: [ClusterLabs] kvm live migration, resource moving
> 
> The VirtualDomain resource agent supports live migration as well as
> virsh command, that's because it actually USE virsh, so again, why
> aren't you using directly VirtualDomain?
> 

___
Users mailing list: Users@clusterlabs.org
http://clusterlabs.org/mailman/listinfo/users

Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://bugs.clusterlabs.org

___
Users mailing list: Users@clusterlabs.org
http://clusterlabs.org/mailman/listinfo/users

Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://bugs.clusterlabs.org


Re: [ClusterLabs] kvm live migration, resource moving

2016-02-04 Thread RaSca
If your environment is successfully configured even from the libvirt
side, everything should work out of the box, if it does not work you can
pass migrate_options to make it work.

From the resource agent documentation:

migrate_options:  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.
Please refer to the libvirt documentation for details on guest migration.

Hope this helps,

-- 
RaSca
Mia Mamma Usa Linux: Niente è impossibile da capire, se lo spieghi bene!
ra...@miamammausalinux.org
http://www.miamammausalinux.org

Il giorno 4/2/2016 12:09:19, Kyle O'Donnell ha scritto:
> I explicitly stated I was using the VirtualDomain resource agent.
> 
> I did not know it supported live migration as when I ran crm resource move 
> guest nodeX, it shuts down the guest before moving it.
> 
> Let me rephrase my question... How do I use the VirtualDomain resource agent 
> to live migrate a kvm guest between nodes in my cluster.
> 
> pacemaker 1.1.10+git20130802-1ubuntu2.3
> resource-agents 1:3.9.3+git20121009-3ubuntu2
> 
> - Original Message -
> From: "RaSca" <ra...@miamammausalinux.org>
> To: "users" <users@clusterlabs.org>
> Sent: Thursday, February 4, 2016 4:30:18 AM
> Subject: Re: [ClusterLabs] kvm live migration, resource moving
> 
> The VirtualDomain resource agent supports live migration as well as
> virsh command, that's because it actually USE virsh, so again, why
> aren't you using directly VirtualDomain?
> 

___
Users mailing list: Users@clusterlabs.org
http://clusterlabs.org/mailman/listinfo/users

Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://bugs.clusterlabs.org


Re: [ClusterLabs] kvm live migration, resource moving

2016-02-04 Thread Kyle O'Donnell
I explicitly stated I was using the VirtualDomain resource agent.

I did not know it supported live migration as when I ran crm resource move 
guest nodeX, it shuts down the guest before moving it.

Let me rephrase my question... How do I use the VirtualDomain resource agent to 
live migrate a kvm guest between nodes in my cluster.

pacemaker 1.1.10+git20130802-1ubuntu2.3
resource-agents 1:3.9.3+git20121009-3ubuntu2

- Original Message -
From: "RaSca" <ra...@miamammausalinux.org>
To: "users" <users@clusterlabs.org>
Sent: Thursday, February 4, 2016 4:30:18 AM
Subject: Re: [ClusterLabs] kvm live migration, resource moving

The VirtualDomain resource agent supports live migration as well as
virsh command, that's because it actually USE virsh, so again, why
aren't you using directly VirtualDomain?

-- 
RaSca
Mia Mamma Usa Linux: Niente è impossibile da capire, se lo spieghi bene!
ra...@miamammausalinux.org
http://www.miamammausalinux.org

Il giorno 3/2/2016 18:28:09, Kyle O'Donnell ha scritto:
> Hi Rasca,
> 
> Because the command 'virsh migrate --live' command will move the vm without 
> shutting down the guest operating system.  It transfers the running state of 
> the vm from one host to another.
> 
> -Kyle
> 
> - Original Message -
> From: "RaSca" <ra...@miamammausalinux.org>
> To: "users" <users@clusterlabs.org>
> Sent: Wednesday, February 3, 2016 11:54:12 AM
> Subject: Re: [ClusterLabs] kvm live migration, resource moving
> 
> It is not clear to me why you need to do things by hand. Why are you
> using virsh once you could do a resource move within the cluster?
> 

___
Users mailing list: Users@clusterlabs.org
http://clusterlabs.org/mailman/listinfo/users

Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://bugs.clusterlabs.org

___
Users mailing list: Users@clusterlabs.org
http://clusterlabs.org/mailman/listinfo/users

Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://bugs.clusterlabs.org


Re: [ClusterLabs] kvm live migration, resource moving

2016-02-04 Thread Kyle O'Donnell
Thanks very much Cédric

I've added migrate_to/from to my config:

primitive tome_kvm ocf:heartbeat:VirtualDomain \
params config="/ocfs2/d01/tome/tome.xml" hypervisor="qemu:///system" 
migration_transport="ssh" force_stop="false" \
meta allow-migrate="true" target-role="Started" \
op start timeout="120s" interval="0" \
op stop timeout="120s" interval="0" \
op monitor timeout="30" interval="10" depth="0" \
op migrate_to timeout="60s" interval="0" \
op migrate_from timeout="60s" interval="0" \
utilization cpu="4" hv_memory="4096"

when I run crm resource migrate guest nodeX nothing happens now:

# crm resource status tome_kvm
resource tome_kvm is running on: ny4j1-kvm02 
# crm resource migrate tome_kvm ny4j1-kvm01 
# echo $?
0
# crm resource status tome_kvm
resource tome_kvm is running on: ny4j1-kvm02 

 and I just figured it out!

I had:
location cli-prefer-tome tome_kvm inf: ny4j1-kvm02

removed that and I am all good!

Thanks everyone!!!


- Original Message -
From: "Cédric Dufour - Idiap Research Institute" <cedric.duf...@idiap.ch>
To: "users" <users@clusterlabs.org>
Sent: Thursday, February 4, 2016 8:09:10 AM
Subject: Re: [ClusterLabs] kvm live migration, resource moving

Hello,

Here, we have live migration working like a charm through the cluster.
Below the XML expert of a resource configuration:


  

  

  
  

  
  





  

  


The LibvirtQemu agent is a custom one derived from the VirtualDomain
agent (for reasons that are off-topic).

The points worth seeing are:

- the "allow-migrate" meta attribute (see
http://www.linux-ha.org/wiki/VirtualDomain_%28resource_agent%29 "If the
allow-migrate meta parameter is set to true, then a resource migration
will not map to a domain shutdown/startup cycle, but to an actual,
potentially live, resource migration between cluster nodes. ")

- the "migrate-from" and "migrate-to" timeouts (which must be set
relative to how big - RAM-wise - your VMs are and the bandwidth
available for migration); passed this timeout, the migration will be
interrupted and the VM will be shutdown/restarted

Hope it helps,

Cédric



On 04/02/16 13:44, Kyle O'Donnell wrote:
> That is helpful but I think I am looking at the wrong documentation:
>
> http://www.linux-ha.org/wiki/VirtualDomain_(resource_agent)
> http://linux-ha.org/doc/man-pages/re-ra-VirtualDomain.html
>
> Can you point me to the docs you are referencing?
>
> - Original Message -
> From: "RaSca" <ra...@miamammausalinux.org>
> To: "users" <users@clusterlabs.org>
> Sent: Thursday, February 4, 2016 6:48:26 AM
> Subject: Re: [ClusterLabs] kvm live migration, resource moving
>
> If your environment is successfully configured even from the libvirt
> side, everything should work out of the box, if it does not work you can
> pass migrate_options to make it work.
>
> From the resource agent documentation:
>
> migrate_options:  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.
> Please refer to the libvirt documentation for details on guest migration.
>
> Hope this helps,
>


___
Users mailing list: Users@clusterlabs.org
http://clusterlabs.org/mailman/listinfo/users

Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://bugs.clusterlabs.org

___
Users mailing list: Users@clusterlabs.org
http://clusterlabs.org/mailman/listinfo/users

Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://bugs.clusterlabs.org


Re: [ClusterLabs] kvm live migration, resource moving

2016-02-03 Thread RaSca
It is not clear to me why you need to do things by hand. Why are you
using virsh once you could do a resource move within the cluster?

-- 
RaSca
Mia Mamma Usa Linux: Niente è impossibile da capire, se lo spieghi bene!
ra...@miamammausalinux.org
http://www.miamammausalinux.org

Il giorno 3/2/2016 14:47:28, Kyle O'Donnell ha scritto:
> Hi,
> 
> (apologies for cross posting, got a note that the pacemaker list is dead)
> 
> I'm using the predefined VirtualDomain resource type to mange kvm guests with 
> pacemaker.  I am trying to sort out the best way I can use the built-in live 
> migration function within virsh:
> 
> # virsh migrate --live guest qemu+ssh://destination-host/system
> 
> Currently, I have to disable monitoring for the resource, run the live 
> migrate, do maintenance on the original host, live migrate back, enable 
> monitoring.  Which is fine if I plan on migrating the guest back to the 
> original host, but when I want to permanently move a guest from one host to 
> another I need to be able to tell the cluster, heh I've already moved this 
> from A to B, please start monitoring on B.
> 
> Ideas?
> 
> Thanks,
> Kyle
> 
> ___
> Users mailing list: Users@clusterlabs.org
> http://clusterlabs.org/mailman/listinfo/users
> 
> Project Home: http://www.clusterlabs.org
> Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
> Bugs: http://bugs.clusterlabs.org
> 

___
Users mailing list: Users@clusterlabs.org
http://clusterlabs.org/mailman/listinfo/users

Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://bugs.clusterlabs.org