mirror of https://github.com/apache/cloudstack.git
add host guid in migrate command
This commit is contained in:
parent
c57ca25d2a
commit
ea102aa045
|
|
@ -20,6 +20,7 @@ package com.cloud.agent.api;
|
|||
public class MigrateCommand extends Command {
|
||||
String vmName;
|
||||
String destIp;
|
||||
String hostGuid;
|
||||
boolean isWindows;
|
||||
|
||||
|
||||
|
|
@ -43,6 +44,14 @@ public class MigrateCommand extends Command {
|
|||
public String getVmName() {
|
||||
return vmName;
|
||||
}
|
||||
|
||||
public void setHostGuid(String guid) {
|
||||
this.hostGuid = guid;
|
||||
}
|
||||
|
||||
public String getHostGuid() {
|
||||
return this.hostGuid;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean executeInSequence() {
|
||||
|
|
|
|||
|
|
@ -1177,6 +1177,8 @@ public class VirtualMachineManagerImpl implements VirtualMachineManager, Listene
|
|||
try {
|
||||
boolean isWindows = _guestOsCategoryDao.findById(_guestOsDao.findById(vm.getGuestOSId()).getCategoryId()).getName().equalsIgnoreCase("Windows");
|
||||
MigrateCommand mc = new MigrateCommand(vm.getInstanceName(), dest.getHost().getPrivateIpAddress(), isWindows);
|
||||
mc.setHostGuid(dest.getHost().getGuid());
|
||||
|
||||
try {
|
||||
MigrateAnswer ma = (MigrateAnswer) _agentMgr.send(vm.getLastHostId(), mc);
|
||||
if (!ma.getResult()) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue