Remove protection from former VMware Horizon instant clone templates
search cancel

Remove protection from former VMware Horizon instant clone templates

book

Article ID: 387968

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

Decommissioned Horizon Connection Server might leave some clone VMs and or clone templates.

Clean up of old VMware (Omnissa) Horizon VDI environment which might leave some clone templates.

Clone VMs cannot be edited on the vCenter as it will state it is "protected" by "horizon.daas".

Environment

VMware vCenter Server 7.x

Resolution

Before undertaking the fix, please take the essential snapshot of the vCenter (OFFLINE for ELM vCenters and ONLINE for standalone vCenter).

The fix requires the vCenter MOB UI by executing enableMethods using AuthorizationManager against the moRefs to enable the methods on the VMs and folders to be removed as seen in the steps below.

  1. Navigate to the enableMethods method of the AuthorizationManager managed object in the vCenter MOB: 
    https://<vcenter_url>/mob/?moid=AuthorizationManager&method=enableMethods
  2. In the “entity” field, enter the XML as shown:
    <entity type="ManagedEntity" xsi:type="ManagedObjectReference">[moRef of the locked VM, e.g. vm-609344]</entity>
  3. In the “method” field, paste the following:
    <entity type="MethodName" xsi:type="string">vim.VirtualMachine.unregister</entity>
    <entity type="MethodName" xsi:type="string">vim.VirtualMachine.powerOff</entity>
    <entity type="MethodName" xsi:type="string">vim.VirtualMachine.powerOn</entity>
    <entity type="MethodName" xsi:type="string">vim.ManagedEntity.destroy</entity>
  4. Click “Invoke Method”
  5. The VMs can now be removed from inventory.


For the ClonePrep folders that are also locked, the process is similar:

  1. Navigate to the enableMethods method of the AuthorizationManager managed object in the vCenter MOB:
    https://<vcenter_url>/mob/?moid=AuthorizationManager&method=enableMethods
  2. In the “entity” field, enter the XML as shown:
    <entity type="ManagedEntity" xsi:type="ManagedObjectReference">[moRef of the folder ID, e.g.  group-v618248]</entity>
  3. In the “method” field, paste the following:
    <entity type="MethodName" xsi:type="string">vim.ManagedEntity.destroy</entity>
    <entity type="MethodName" xsi:type="string">vim.Folder.unregisterAndDestroy</entity>
  4. Click “Invoke Method”
  5. The folders can now be removed from inventory.