mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
Fix reboot deploy-as-is VMs
This commit is contained in:
parent
667cb53772
commit
78aa3df440
@ -188,8 +188,12 @@ class VmwareVmImplementer {
|
|||||||
private void setDeployAsIsInfoTO(VirtualMachineProfile vm, VirtualMachineTO to, Map<String, String> details) {
|
private void setDeployAsIsInfoTO(VirtualMachineProfile vm, VirtualMachineTO to, Map<String, String> details) {
|
||||||
String configuration = details.getOrDefault(VmDetailConstants.DEPLOY_AS_IS_CONFIGURATION, null);
|
String configuration = details.getOrDefault(VmDetailConstants.DEPLOY_AS_IS_CONFIGURATION, null);
|
||||||
Map<String, String> properties = deployAsIsHelper.getVirtualMachineDeployAsIsProperties(vm);
|
Map<String, String> properties = deployAsIsHelper.getVirtualMachineDeployAsIsProperties(vm);
|
||||||
String destStoragePool = deployAsIsHelper.getAllocatedVirtualMachineDestinationStoragePool(vm);
|
String templatePath = null;
|
||||||
String templatePath = deployAsIsHelper.getAllocatedVirtualMachineTemplatePath(vm, configuration, destStoragePool);
|
String destStoragePool = null;
|
||||||
|
if (vm.getVirtualMachine().getState() == VirtualMachine.State.Starting) {
|
||||||
|
destStoragePool = deployAsIsHelper.getAllocatedVirtualMachineDestinationStoragePool(vm);
|
||||||
|
templatePath = deployAsIsHelper.getAllocatedVirtualMachineTemplatePath(vm, configuration, destStoragePool);
|
||||||
|
}
|
||||||
Map<Integer, String> nicsAdapterMapping = deployAsIsHelper.getAllocatedVirtualMachineNicsAdapterMapping(vm, to.getNics());
|
Map<Integer, String> nicsAdapterMapping = deployAsIsHelper.getAllocatedVirtualMachineNicsAdapterMapping(vm, to.getNics());
|
||||||
DeployAsIsInfoTO info = new DeployAsIsInfoTO(templatePath, destStoragePool, properties, nicsAdapterMapping);
|
DeployAsIsInfoTO info = new DeployAsIsInfoTO(templatePath, destStoragePool, properties, nicsAdapterMapping);
|
||||||
to.setDeployAsIsInfo(info);
|
to.setDeployAsIsInfo(info);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user