shwstppr commented on a change in pull request #4758: URL: https://github.com/apache/cloudstack/pull/4758#discussion_r602076034
########## File path: plugins/hypervisors/vmware/src/main/java/com/cloud/hypervisor/vmware/resource/VmwareResource.java ########## @@ -1898,10 +1900,14 @@ protected StartAnswer execute(StartCommand cmd) { } } tearDownVm(vmMo); - } else if (!hyperHost.createBlankVm(vmNameOnVcenter, vmInternalCSName, vmSpec.getCpus(), vmSpec.getMaxSpeed().intValue(), getReservedCpuMHZ(vmSpec), - vmSpec.getLimitCpuUse(), (int) (vmSpec.getMaxRam() / ResourceType.bytesToMiB), getReservedMemoryMb(vmSpec), guestOsId, rootDiskDataStoreDetails.first(), false, - controllerInfo, systemVm)) { - throw new Exception("Failed to create VM. vmName: " + vmInternalCSName); + } else { + boolean blankVmCreated = hyperHost.createBlankVm(vmNameOnVcenter, vmInternalCSName, vmSpec.getCpus(), vmSpec.getMaxSpeed().intValue(), getReservedCpuMHZ(vmSpec), + vmSpec.getLimitCpuUse(), (int) (vmSpec.getMaxRam() / ResourceType.bytesToMiB), getReservedMemoryMb(vmSpec), guestOsId, rootDiskDataStoreDetails.first(), false, + controllerInfo, systemVm); + if (!blankVmCreated) { + throw new Exception("Failed to create VM. vmName: " + vmInternalCSName); + } + deployAsIs = false; Review comment: @nvazquez I've added a log message. Please see if there needs to be any change in the text. Also, I've found that systemvms use the same flow with the default systemvm template, i.e., register a blank VM and then start it. Though deployAsIs was already `false` in that case. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org