Manual live migration of VM jobs

LSF administrators may manually request a live migration of VM jobs from one hypervisor (the source hypervisor) to another hypervisor (the target hypervisor) by using the bmig command. The VM jobs remain running after the live migration. This is useful for removing running jobs from a hypervisor, for example, to prepare the hypervisor for maintenance.

Start of change To prevent other jobs from being dispatched onto the hypervisor being prepared for maintenance, keep the hypervisor closed by running the following command: End of change

badmin hclose source_hypervisor_name

Manual live migration only applies to VM jobs running on the source hypervisor at the time of the live migration request. If the source hypervisor is a KVM hypervisor running both PM and VM jobs, only VM jobs are live-migrated. Manual live migration occurs after the scheduler finds space on a target hypervisor to place the VM jobs, and only the VM jobs that were running at the time of the request are actually live-migrated. In addition, a manual live migration only succeeds if there are available hypervisors to accept VM jobs.

To manually live migrate VM, run bmig with the -dc_vmaction livemigvm option:

bmig -dc_vmaction livemigvm [-M source_hypervisor_name]

Note that you cannot specify a target hypervisor using the -m option. The scheduler automatically finds any target hypervisor capable of hosting the VM jobs from the source hypervisor.

A manual live migration is not guaranteed, since there may not be available hypervisors to accept VM jobs, and there is no way to cancel a manual live migration once you requested it. You can set limits on the live migration request by specifying arguments in the -dc_vmaction livemigvm option:

-dc_vmaction "livemigvm[arguments]"

Specify any of the following optional arguments:

wait_trigger_time=seconds
The amount of time to wait for a target hypervisor to be available for live migration. After this time, the live migration request times out and the running VM job remains on the source hypervisor. Specify the value in seconds.
livemig_max_downtime=seconds
The maximum amount of time that a VM can be down during a live migration. This is the amount of time from when the VM is stopped on the source hypervisor and started on the target hypervisor. If the live migration cannot guarantee this down time, the system will continue to retry the live migration until it can guarantee this maximum down time (or the value of livemig_max_exectime or the DC_LIVEMIG_MAX_EXEC_TIME parameter in dc_conf.cluster_name.xml is reached). Specify the value in seconds, or specify 0 to use the hypervisor default for the down time. This argument overwrites the value of the DC_LIVEMIG_MAX_DOWN_TIME parameter in dc_conf.cluster_name.xml.
livemig_max_exectime=seconds
The maximum amount of time that the system can attempt a live migration. Specify the value in seconds from 1 to 2147483646. This argument overwrites the value of the DC_LIVEMIG_MAX_EXEC_TIME parameter in dc_conf.cluster_name.xml.

When using any of the optional arguments, separate multiple arguments with a colon, enclose the arguments in square brackets ([]), then enclose the entire livemigvm subcommand string in quotation marks.

For example,

bmig "livemigvm[wait_trigger_time=600:livemig_max_downtime=0:livemig_max_exectime=600]"