Revision 58d38b02 lib/hypervisor/hv_kvm.py
b/lib/hypervisor/hv_kvm.py | ||
---|---|---|
608 | 608 |
else: |
609 | 609 |
self.StopInstance(instance, force=True) |
610 | 610 |
|
611 |
def MigrateInstance(self, instance_name, target, live):
|
|
611 |
def MigrateInstance(self, instance, target, live): |
|
612 | 612 |
"""Migrate an instance to a target node. |
613 | 613 |
|
614 | 614 |
The migration will not be attempted if the instance is not |
615 | 615 |
currently running. |
616 | 616 |
|
617 |
@type instance_name: string
|
|
618 |
@param instance_name: name of the instance to be migrated
|
|
617 |
@type instance: L{objects.Instance}
|
|
618 |
@param instance: the instance to be migrated
|
|
619 | 619 |
@type target: string |
620 | 620 |
@param target: ip address of the target node |
621 | 621 |
@type live: boolean |
622 | 622 |
@param live: perform a live migration |
623 | 623 |
|
624 | 624 |
""" |
625 |
instance_name = instance.name |
|
625 | 626 |
pidfile, pid, alive = self._InstancePidAlive(instance_name) |
626 | 627 |
if not alive: |
627 | 628 |
raise errors.HypervisorError("Instance not running, cannot migrate") |
Also available in: Unified diff