mirror of https://github.com/apache/cloudstack.git
CLOUDSTACK-423 : During VM migration on KVM, VifDriver.unplug is not
called. VifDriver.unplug must be called in MigrateCommand which hooks VM migration in source host, because plug will be called in PrepareForMigration in destination host. But that operation is missing in current LibvirtComputingResources. Signed-off-by: Edison Su <sudison@gmail.com>
This commit is contained in:
parent
cb9395498f
commit
c03712e86a
|
|
@ -2320,12 +2320,15 @@ public class LibvirtComputingResource extends ServerResourceBase implements
|
|||
_vms.put(vmName, State.Stopping);
|
||||
}
|
||||
|
||||
List<InterfaceDef> ifaces = null;
|
||||
|
||||
Domain dm = null;
|
||||
Connect dconn = null;
|
||||
Domain destDomain = null;
|
||||
Connect conn = null;
|
||||
try {
|
||||
conn = LibvirtConnection.getConnection();
|
||||
ifaces = getInterfaces(conn, vmName);
|
||||
dm = conn.domainLookupByUUID(UUID.nameUUIDFromBytes(vmName
|
||||
.getBytes()));
|
||||
dconn = new Connect("qemu+tcp://" + cmd.getDestinationIp()
|
||||
|
|
@ -2364,6 +2367,9 @@ public class LibvirtComputingResource extends ServerResourceBase implements
|
|||
}
|
||||
} else {
|
||||
destroy_network_rules_for_vm(conn, vmName);
|
||||
for (InterfaceDef iface : ifaces) {
|
||||
_vifDriver.unplug(iface);
|
||||
}
|
||||
cleanupVM(conn, vmName,
|
||||
getVnetId(VirtualMachineName.getVnet(vmName)));
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue