DaaS - Change master image it fails with "ProvisioningTaskError"

DaaS - Change master image it fails with "ProvisioningTaskError"

book

Article ID: CTX693394

calendar_today

Updated On:

Description

Unable to update DaaS Machine Catalog
- Access Machine Catalog > "Change master image" it fails with "ProvisioningTaskError" 
 
ErrorMessage 
- HandleExplicitStorage Failed Error retrieving item from path ""

Resolution

Instructions
============

Firstly, you will need to have a VM (that is not a Cloud Connector VM) which is on the same domain as the Cloud COnnectors & install the Powershell SDK [ to connect to the backend & perform the commands yourself  in the future]
 

** First Download the Remote Powershell SDK: https://www.citrix.com/downloads/citrix-cloud/product-software/xenapp-and-xendesktop-service.html
** Install on a VM on the internal Network (However do not install on Cloud Connectors)

** Launch the PowerShell SDK in elevated mode (Run as admin)
                i.    Run the following commands
                ii.   ASNP Citrix*
                iii.  GET-XDAuthentication



** Once prompted & you successfully entered your Cloud Credentials - Proceed with the following commands:
------------------------------------------------------------------------------------------------------------------------------------------------
 
In order to change the master Image we first need to know where the Master Image is (and it is accessible)

Posh:> cd xdhyp:\
Posh:> cd HostingUnits
Posh:> cd CSP-resources-spare1
Posh:> cd image.folder
Posh:> cd rg-cloud2-citrix-image.resourcegroup

** At any point you want to list all the items - just type "ls" and it will populate everything in that directory **
 
As we know that you want to change the Master Image to this snapshot [ CtxImage_updated.snapshot ]
 
- We found the "FULLPATH" variable: "XDHyp:\HostingUnits\resources-location\image.folder\rg-cloud-citrix-image.resourcegroup\CtxImage_updated.snapshot"   [ Save this somewhere for reference later]
- Next we need to exit this xdhyp:\ section , by tying "exit" 


** Open Powershell window again, authenticate, "asnp citrix*" to import the module & we perform the next phase. **

##We need the Provscheme of the machine Catalog you wnat to make the change
Posh:> Get-BrokerCatalog | ft CatalogName,ProvisioningSchemeId 
 
##Then we use the ProvSchemeID to pull the MasterImageInfo
Posh:> Get-ProvScheme -ProvisioningSchemeUid xxxxxxxxxxxxxxxxxxxxxxxx | ft MachineProfile,MasterImageVM,MasterImageVMDate
 


##First we need to set some variables & their values to proceed [$provisioningSchemeName ] & [$masterImageVM]
Posh:> $provisioningSchemeName = "ProvSchemeName"
Posh:> $masterImageVM = "XDHyp:\HostingUnits\resources-location\image.folder\rg-cloud-citrix-image.resourcegroup\CtxImage_Updated.snapshot"


##Once they are set, you can now use Powershell to Publish a New Image/Snapshot to the Catalog / ProvSchme associated 
Posh:> Publish-ProvMasterVMImage -ProvisioningSchemeName $provisioningSchemeName -MasterImageVM $masterImageVM -MasterImageNote "Updated toNew snapshot"


## To shutdown or start the VM via Powershell
Posh:> New-BrokerHostingPowerAction -Action Shutdown -MachineName 'XD_VDA'
Posh:> New-BrokerHostingPowerAction -Action TurnOn -MachineName 'XD_VDA'


## To validate that the change was performed you can run the following command
Posh:> Get-ProvSchemeMasterVMImageHistory -ProvisioningSchemeName "ProvSchemName" -ShowAll | Sort-Object Date -Descending 

Problem Cause

Unable to update Master Image on Catalog (where the previous snapshot/master Image has been removed or renamed)
- As the GUI will have a check to be able to reach the previous snapshot or Image