Skip to content

vBlog.nl

All about technology

Menu
  • Home
  • VMware Cloud Director
  • vSphere
  • Automation
    • PowerCLI
    • PowerShell
    • Terraform
  • NSX
  • Horizon DaaS
  • About Us
Menu
Remove locked Instant-Clone objects in VMware Horizon DaaS

Remove locked Instant-Clone objects in VMware Horizon DaaS

Posted on December 24, 2018

Table of Contents

  • Introduction
  • Preparation
  • Remove the lock from the Instant Clone cp-xxx objects

Introduction

In this article I will describe how to remove Instant Clone objects created in VMware Horizon DaaS from your vCenter Server.

I had to do this because I (on one of those famous rough Monday mornings 😉 ) deleted one of my demo tenants in VMware Horizon DaaS without properly clean the tenant first.

Note to self: kill the VDI’s first, than remove the images, etc. properly and THAN delete the tenant!

Unfortunately this wasn’t a very clever move because you can’t delete the remaining objects afterwards due to a lock in the database:

Deleting Instant Cloning cp-xxx objects is not possible due to a lock
Deleting Instant Cloning cp-xxx objects is not possible due to a lock

This can be avoided by changing the capacity of the desktop pools to 0 and convert/delete the images before you delete your tenant from the Horizon DaaS Service center.

Beware!
If these actions are outside your comfort zone, reach out to the VMware Support team to assist you with this. When you delete the wrong objects, there will be consequences.

Preparation

First, you need gather a list of cp-xxx objects you want to remove from the vCenter Server. I did this by listing all the VM objects sitting in the remaining desktop VLAN of my deleted tenant.

Now, export them to a Excel/CSV file.
In the second part of this article we will add a column to the file, so a clear overview is advised.

You can use the Data > “Text to columns” option in Excel to make the list more clear to read. My list looked like this:

Instant Clone - Overview
Instant Clone – Overview

Log on to the vCenter Server MOB.
To do this, type the following behind the FQDN of your vCenter Server: /mob/?vmodl=1.

Example: https://vcsa-fqdn/mob/?vmodl=1

After you logged on (use the administrator@vsphere.local account, or equal privileges) to the MOB, Browse to Content.

vCenter Managed Object Browser ><noscript><img class=vCenter Managed Object Browser ><noscript><img class=vCenter Managed Object Browser ><noscript><img class=vCenter Managed Object Browser ><noscript><img class=vCenter Managed Object Browser ><noscript><img class=Instant Clone - Object correlation
Instant Clone – Object correlation

Remove the lock from the Instant Clone cp-xxx objects

In the following steps we will use MOB to remove the lock from Instant Clone cp-xxx objects.

Log on to the vCenter Server MOB.
To do this, type the following behind the FQDN of your vCenter Server: /mob/?vmodl=1.

Example: https://vcsa-fqdn/mob/?vmodl=1

After you logged on (use the administrator@vsphere.local account, or equal privileges) to the MOB, Browse to Content.

vCenter Managed Object Browser ><noscript><img class=vCenter Managed Object Browser ><noscript><img class=vCenter Managed Object Browser ><noscript><img class=<!--array start --> <entity type="ManagedEntity" xsi:type="ManagedObjectReference">vm-0001</entity> <entity type="ManagedEntity" xsi:type="ManagedObjectReference">vm-0002</entity> <entity type="ManagedEntity" xsi:type="ManagedObjectReference">vm-0003</entity> <entity type="ManagedEntity" xsi:type="ManagedObjectReference">vm-0004</entity> <entity type="ManagedEntity" xsi:type="ManagedObjectReference">vm-0005</entity> <!--array end -->

Change the vm-xxx object names to the names you correlated during the preparations.

Copy/Paste the XML content from the second code block below to the method > vmodl.MethodName[] value.

<!-- array start -->
<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>
<!-- array end -->
vCenter Managed Object Browser ><noscript><img class=

If you’re new to VMware Horizon DaaS, check out our Horizon DaaS Explained series here!

Loading

Share on Social Media
twitter facebook linkedin reddit emailwhatsapptelegram

3 thoughts on “Remove locked Instant-Clone objects in VMware Horizon DaaS”

  1. Pingback: Scripted: Remove locked Instant-Clone objects - vBlog.nl
  2. Cacophony says:
    November 22, 2019 at 5:10 pm

    Why dont I see enable method? I’m usung vcenter 6.7

    Reply
  3. Maik says:
    January 29, 2021 at 4:38 pm

    Many thanks Marc, I have delete the orphaned folder “VMwareViewComposerReplicaFolder” It works … thanks & Bye p.s. VCSA v6.7update3

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Recent articles

  • vCloud Director API – Couldn’t connect to cloud server with the provided session id May 24, 2023
  • Horizon DaaS – Maximum sessions exceeded May 9, 2023
  • VMware Cloud on AWS with FSx for NetApp ONTAP December 28, 2022
  • Workspace ONE Access – Change certificate December 22, 2022
  • UI themes for VMware Cloud Director 10.4.1 and later December 16, 2022
  • VMware Tanzu Kubernetes Grid December 15, 2022
  • Workspace One Access – Not logged in to server FQDN. Please invoke Save before Sync December 12, 2022
  • NSX Edge configuration has failed. 1G hugepage support required. December 7, 2022
  • Horizon DaaS – Unable to connect to Desktop November 24, 2022
  • How to: Request and Install a Lets Encrypt Wildcard SSL on VMware Cloud Director 10.4 October 17, 2022

Tags

Automation bootstrapping Container Service Extension Credential Manager Desktone.log ESXi EUC EXi GPU Horizon DaaS Instant-Clone Logging NSX nsx-t PowerCLI PowerShell Putty Raspberry PI SSL Tanzu Terraform update vcd-cli vCenter vCloud vCloud Availability vCloud Director VDI vGPU VMware VMworld vSAN vSphere vVols workspace one Zerto

VMware Cloud Provider Blog

  • In the cloud world, one size doesn’t fit all
    by Vijoo Chacko on June 2, 2023 at 7:25 am

    The size make-up of enterprises in an industry can vary from sector to sector. Take for example, the commercial aviation industry. When did you last fly in a commercial plane that was not a Boeing or an Airbus? This is an industry clearly dominated by two major companies. Whereas the automotive industry is an example … Continued The post In the cloud world, one size doesn’t fit all appeared first on VMware Cloud Provider Blog.

  • Reminder: VMware Cloud Director Availability 4.2 and 4.3 End of General Support Approaching
    by Nikolay Patrikov on May 23, 2023 at 3:17 pm

    Keeping VMware Cloud Director Availability always up-to-date guarantees having all the latest and greatest features available for you and your tenants. But one more reason to consider it now is VMware Cloud Director Availability 4.2.x and 4.3.x will reach End of General Support (EOGS) on June 10, 2023, and will no longer be available for download from the VMware download pages. To ensure you … Continued The post Reminder: VMware Cloud Director Availability 4.2 and 4.3 End of General Support Approaching appeared first on VMware Cloud Provider Blog.

  • VMware Aria Rebranding on VMware Cloud Partner Navigator
    by Sulakshna Shrivastava on May 23, 2023 at 2:06 am

    We recently announced the renaming of the products within our Cloud Management family. These Aria rebranding updates have been implemented on the VMware Cloud Partner Navigator portal The post <strong>VMware Aria Rebranding on VMware Cloud Partner Navigator</strong> appeared first on VMware Cloud Provider Blog.

  • Upgrade vSphere now: vSphere 6.5 and 6.7 end of technical guidance is coming this November
    by Christopher Wong on May 20, 2023 at 3:00 pm

    With the general availability of VMware vSphere 8 Update 1, we would like to remind our Cloud Services Provider partner community that the end of general support for vSphere 6.5 and vSphere 6.7 was October 15, 2022. These versions are now under technical guidance until November 15, 2023. During the technical guidance phase, VMware does … Continued The post Upgrade vSphere now: vSphere 6.5 and 6.7 end of technical guidance is coming this November appeared first on VMware Cloud Provider Blog.

  • VMware NSX Migration for VMware Cloud Director 1.4.2 is now GA
    by Jaikishan Tayal on May 9, 2023 at 2:05 pm

    We’re thrilled to announce the release of the VMware NSX Migration tool for VMware Cloud Director 1.4.2! What is this Tool? If you are unaware of the VMware NSX Migration for VMware Cloud Director Tool, it can help you migrate your environment from NSX for vSphere to NSX T Data Center if you are currently … Continued The post VMware NSX Migration for VMware Cloud Director 1.4.2 is now GA appeared first on VMware Cloud Provider Blog.

©2023 vBlog.nl | Design: Newspaperly WordPress Theme