From 4b711cca91b2609c60c71912e4fcd73c730cd690 Mon Sep 17 00:00:00 2001 From: praveenmathamsetty Date: Fri, 3 Feb 2017 15:50:03 +0530 Subject: [PATCH] Enabling cloning for Instant clone pool If current image state is not ready, clonging of instant clone pools is not supported. --- Modules/VMware.Hv.Helper/VMware.HV.Helper.psm1 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Modules/VMware.Hv.Helper/VMware.HV.Helper.psm1 b/Modules/VMware.Hv.Helper/VMware.HV.Helper.psm1 index 0f3bf52..d10215e 100644 --- a/Modules/VMware.Hv.Helper/VMware.HV.Helper.psm1 +++ b/Modules/VMware.Hv.Helper/VMware.HV.Helper.psm1 @@ -4362,6 +4362,8 @@ function New-HVPool { $DesktopVirtualCenterNetworkingSettings = $DesktopVirtualCenterProvisioningSettings.VirtualCenterNetworkingSettings $DesktopVirtualCenterManagedCommonSettings = $clonePool.AutomatedDesktopData.virtualCenterManagedCommonSettings $DesktopCustomizationSettings = $clonePool.AutomatedDesktopData.CustomizationSettings + $CurrentImageState =` + $clonePool.AutomatedDesktopData.provisioningStatusData.instantCloneProvisioningStatusData.instantCloneCurrentImageState } elseIf ($clonePool.ManualDesktopData) { if (! $VM) { @@ -4380,8 +4382,8 @@ function New-HVPool { break } } - if ($provisioningType -eq 'INSTANT_CLONE_ENGINE' -and $poolType -eq 'AUTOMATED') { - Write-Error "Cloning is not supported for instant clone pools" + if ($provisioningType -eq 'INSTANT_CLONE_ENGINE' -and $poolType -eq 'AUTOMATED' -and $CurrentImageState -ne 'READY') { + Write-Error "Instant clone pool's Current Image State should be in 'READY' state, otherwise cloning is not supported" break } } else {