Shahar Havivi has uploaded a new change for review. Change subject: engine: Sysprep attached by default on new Windows VMs ......................................................................
engine: Sysprep attached by default on new Windows VMs By default we attach Sysprep to a new Windows VM - now that we have "Initial Run" we will attach Sysprep only to a VM that set this option on. By default in the UI the flag will be set for backward compatibility. In Rest we will have <use_sysprep> entry for explicitly no to use Sysprep for backware compatibility. Bug-Url: https://bugzilla.redhat.com/1190663 Change-Id: Ia2a1142457df45843b57483913c8ea518aec0d0b Signed-off-by: Shahar Havivi <shah...@redhat.com> --- M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RunVmCommand.java M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/NewVmModelBehavior.java 2 files changed, 3 insertions(+), 4 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/87/40987/1 diff --git a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RunVmCommand.java b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RunVmCommand.java index d54729d..5131943 100644 --- a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RunVmCommand.java +++ b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RunVmCommand.java @@ -725,9 +725,8 @@ getVm().setConsoleUserId(null); if (getParameters().getInitializationType() == null) { - // if vm not initialized, use sysprep/cloud-init - if (!getVm().isInitialized()) { - VmHandler.updateVmInitFromDB(getVm().getStaticData(), false); + VmHandler.updateVmInitFromDB(getVm().getStaticData(), false); + if (!getVm().isInitialized() && getVm().getVmInit() != null) { getVm().setInitializationType(InitializationType.None); if (osRepository.isWindows(getVm().getVmOsId())) { if (!isPayloadExists(VmDeviceType.FLOPPY)) { diff --git a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/NewVmModelBehavior.java b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/NewVmModelBehavior.java index 2c46ff0..03c12d7 100644 --- a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/NewVmModelBehavior.java +++ b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/NewVmModelBehavior.java @@ -38,6 +38,7 @@ getModel().getIsSoundcardEnabled().setIsChangeable(true); getModel().getVmType().setIsChangeable(true); getModel().getVmId().setIsAvailable(true); + getModel().getVmInitEnabled().setEntity(true); loadDataCenters(); @@ -149,7 +150,6 @@ getModel().getCustomPropertySheet().deserialize(template.getCustomProperties()); getModel().getVmInitModel().init(template); - getModel().getVmInitEnabled().setEntity(template.getVmInit() != null); if (getModel().getSelectedCluster() != null) { updateCpuProfile(getModel().getSelectedCluster().getId(), -- To view, visit https://gerrit.ovirt.org/40987 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia2a1142457df45843b57483913c8ea518aec0d0b Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Shahar Havivi <shav...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches