Source:
protected void init() { T parameters = getParameters(); setVmTemplateId(Guid.newGuid()); super.setVmTemplateName(parameters.getName()); VmStatic parameterMasterVm = parameters.getMasterVm(); if (parameterMasterVm != null) { super.setVmId(parameterMasterVm.getId()); setClusterId(parameterMasterVm.getClusterId()); if (getVmDeviceUtils().shouldOverrideSoundDevice( getParameters().getMasterVm(), getMasterVmCompatibilityVersion(), getParameters().isSoundDeviceEnabled())) { parameters.setSoundDeviceEnabled(true); } if (getParameters().isSoundDeviceEnabled() == null) { parameters.setSoundDeviceEnabled(false); } if (getParameters().isConsoleEnabled() == null) { parameters.setConsoleEnabled(false); } vmHandler.updateDefaultTimeZone(parameterMasterVm); vmHandler.autoSelectUsbPolicy(getParameters().getMasterVm()); vmHandler.autoSelectDefaultDisplayType(getVmId(), getParameters().getMasterVm(), getCluster(), getParameters().getGraphicsDevices()); vmHandler.autoSelectGraphicsDevice(getVmId(), parameterMasterVm, getCluster(), getParameters().getGraphicsDevices(), getMasterVmCompatibilityVersion()); separateCustomProperties(parameterMasterVm); } if (getVm() != null) { updateVmDevices(); images.addAll(getVmDisksFromDB()); setStoragePoolId(getVm().getStoragePoolId()); isVmInDb = true; } else if (getCluster() != null && parameterMasterVm != null) { VM vm = new VM(parameterMasterVm, new VmDynamic(), null); vm.setClusterCompatibilityVersion(getCluster().getCompatibilityVersion()); setVm(vm); setStoragePoolId(getCluster().getStoragePoolId()); } updateDiskInfoDestinationMap(); generateTargetDiskIds(); parameters.setUseCinderCommandCallback(!getCinderDisks().isEmpty()); }

Target:
protected void init() { T parameters = getParameters(); if (Guid.isNullOrEmpty(getParameters().getVmTemplateId())) { setVmTemplateId(Guid.newGuid()); } else { setVmTemplateId(getParameters().getVmTemplateId()); } super.setVmTemplateName(parameters.getName()); VmStatic parameterMasterVm = parameters.getMasterVm(); if (parameterMasterVm != null) { super.setVmId(parameterMasterVm.getId()); setClusterId(parameterMasterVm.getClusterId()); if (getVmDeviceUtils().shouldOverrideSoundDevice( getParameters().getMasterVm(), getMasterVmCompatibilityVersion(), getParameters().isSoundDeviceEnabled())) { parameters.setSoundDeviceEnabled(true); } if (getParameters().isSoundDeviceEnabled() == null) { parameters.setSoundDeviceEnabled(false); } if (getParameters().isConsoleEnabled() == null) { parameters.setConsoleEnabled(false); } vmHandler.updateDefaultTimeZone(parameterMasterVm); vmHandler.autoSelectUsbPolicy(getParameters().getMasterVm()); vmHandler.autoSelectDefaultDisplayType(getVmId(), getParameters().getMasterVm(), getCluster(), getParameters().getGraphicsDevices()); vmHandler.autoSelectGraphicsDevice(getVmId(), parameterMasterVm, getCluster(), getParameters().getGraphicsDevices(), getMasterVmCompatibilityVersion()); separateCustomProperties(parameterMasterVm); } if (getVm() != null) { updateVmDevices(); images.addAll(getVmDisksFromDB()); setStoragePoolId(getVm().getStoragePoolId()); isVmInDb = true; } else if (getCluster() != null && parameterMasterVm != null) { VM vm = new VM(parameterMasterVm, new VmDynamic(), null); vm.setClusterCompatibilityVersion(getCluster().getCompatibilityVersion()); setVm(vm); setStoragePoolId(getCluster().getStoragePoolId()); } updateDiskInfoDestinationMap(); generateTargetDiskIds(); parameters.setUseCinderCommandCallback(!getCinderDisks().isEmpty()); }