Okay, you have decided that your hypervisor storage is permanently unusable. You’re unable to resurrect it, or have deemed it low return on investment to attempt to do so. In those cases, it is recommended that you go ahead and remove it from the XenApp and XenDesktop Resources that are using it.

Why might you want to do that? Well, it will save you time spent on verifying why some Machine Catalog operations are failing. For example, Machine Catalog Creation and Machine Update both initially create a copy of the Provisioning Scheme base disk on each storage location in the Resource.

However, be warned that if the storage you wish to remove is the last one in the Resource, this would cause errors in various places in Citrix Studio where that Resource is being used.

After all this, if you have made the decision to go ahead with the removal, you can do it via the PowerShell SDK, and as from XenApp and XenDesktop 7.12, you can also use Citrix Studio.

Remove Storage via PowerShell

Open a PowerShell window on your Delivery Controller machine and do the following:

  1. Add the Citrix PowerShell Snap-ins (required):

    asnp citrix*

  2. If unsure which Resources are using the storage you wish to remove, you can use Citrix Studio (see step 1 in section Remove Storage via Citrix Studio) or run some of the following cmdlets:

    For OSStorage:
    Copy and paste the following into a text file, substitute {StorageName} with the name of the storage you are looking for, copy the new version of the script and paste it into the PowerShell window.

    Get-ChildItem XDHyp:\HostingUnits | Where-Object {
    $storageUsed = $false
    foreach($storagePath in $_.Storage.StoragePath){
    if($storagePath -like “*{StorageName}.storage”){
    $storageUsed = $true
    return $storageUsed

    For TemporaryStorage:
    Same as OSStorage, but substitute $_.Storage.StoragePath with

    ( $_.AdditionalStorage | Where-Object { $_.Name –eq “TemporaryStorage” } ).StorageLocations.StoragePath

    For PersonalvDiskStorage:
    Same as OSStorage, but substitute $_.Storage.StoragePath with


  3. Remove a storage location from the respective Resource and storage type:

    Remove-HypHostingUnitStorage -LiteralPath {FullPathTo_HostingUnit} -StoragePath {FullHostingUnitPathTo_Storage} -StorageType {OSStorage / TemporaryStorage / PersonalvDiskStorage}

    Remove-HypHostingUnitStorage  -LiteralPath “XDHyp:\HostingUnits\myResourceName” –StoragePath “XDHyp:\HostingUnits\myResourceName\myStorageName.storage” -StorageType OSStorage

    Note: Remember to use the path to the storage which goes through the ‘XDHyp:\HostingUnits’ root rather than ‘XDHyp:\Connections’. If the storage is no longer available on the hypervisor, it will have disappeared from the Connection tree.

Remove Storage via Citrix Studio (XenApp and XenDesktop 7.12 and onward)

You can use Citrix Studio to edit a Resource’s storage locations.

  1. Go to the ‘Hosting’ node (see image below). You can use the Details panel at the bottom of the UI to determine which Resources contain the storage that you wish to remove from use.
  2. Select ‘Edit Storage’ to open the following wizard:
    On here you can see a list of storage locations currently in the Resource (all checked items), and any additional locations that could be added to the Resource via the UI.
    The values in the Status column could be any of the following:
    The one missing from the ‘Storage Status Guide’ in the previous image is ‘Unavailable’. This is new to XenDesktop and XenApp 7.12 and identifies storage locations which no longer exist on the hypervisor, like ‘SzDatastore2’ in the current example.
  3. To remove a storage, simply click the ‘Remove…’ link in the ‘Superseded’ or ‘Unavailable’ status.
  4. You can do the same for Temporary Storage and PvD Storage.

Blog Banners -- FOOTER-2