andrijapanicsb commented on code in PR #13031:
URL: https://github.com/apache/cloudstack/pull/13031#discussion_r3133966443
##########
plugins/hypervisors/vmware/src/main/java/com/cloud/hypervisor/vmware/resource/VmwareResource.java:
##########
@@ -2271,39 +2271,7 @@ protected StartAnswer execute(StartCommand cmd) {
// Setup ISO device
//
- // prepare systemvm patch ISO
- if (vmSpec.getType() != VirtualMachine.Type.User) {
- // attach ISO (for patching of system VM)
- Pair<String, Long> secStoreUrlAndId =
mgr.getSecondaryStorageStoreUrlAndId(Long.parseLong(_dcId));
- String secStoreUrl = secStoreUrlAndId.first();
- if (secStoreUrl == null) {
- String msg = String.format("NFS secondary or cache storage
of dc %s either doesn't have enough capacity (has reached %d%% usage threshold)
or not ready yet, or non-NFS secondary storage is used",
- _dcId,
Math.round(CapacityManager.SecondaryStorageCapacityThreshold.value() * 100));
- throw new Exception(msg);
- }
-
- ManagedObjectReference morSecDs =
prepareSecondaryDatastoreOnHost(secStoreUrl);
- if (morSecDs == null) {
- String msg = "Failed to prepare secondary storage on host,
NFS secondary or cache store url: " + secStoreUrl + " in dc "+ _dcId;
- throw new Exception(msg);
- }
- DatastoreMO secDsMo = new DatastoreMO(hyperHost.getContext(),
morSecDs);
-
- deviceConfigSpecArray[i] = new VirtualDeviceConfigSpec();
- Pair<VirtualDevice, Boolean> isoInfo =
VmwareHelper.prepareIsoDevice(vmMo,
- null, secDsMo.getMor(), true, true, ideUnitNumber++, i
+ 1);
- deviceConfigSpecArray[i].setDevice(isoInfo.first());
- if (isoInfo.second()) {
- if (logger.isDebugEnabled())
- logger.debug("Prepare ISO volume at new device " +
_gson.toJson(isoInfo.first()));
-
deviceConfigSpecArray[i].setOperation(VirtualDeviceConfigSpecOperation.ADD);
- } else {
- if (logger.isDebugEnabled())
- logger.debug("Prepare ISO volume at existing device "
+ _gson.toJson(isoInfo.first()));
-
deviceConfigSpecArray[i].setOperation(VirtualDeviceConfigSpecOperation.EDIT);
- }
- i++;
- } else if (!deployAsIs) {
+ if (VirtualMachine.Type.User.equals(vmSpec.getType()) &&
!deployAsIs) {
// Note: we will always plug a CDROM device
Review Comment:
Test comment 1. PR 13031
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]