VMware

VMware View Reference Architecture Kit | Main | How to Setup Sun Ray Servers and Client Devices with VMware View

01/07/2009

View Composer - How to Delete Orphaned Protected Entities in vCenter

View Composer enables the use of linked clones with View Manager in order to reduce the amount of storage needed per VM. It does this by coping the parent VM + snapshot into a protected VM or entity. This VM is protected so it can’t be deleted in vCenter to ensure an admin doesn’t accidentally delete the VM which users may be referencing.

The correct way to manage these protected VM’s isn’t within vCenter, it’s in View Manager. When a linked clone enabled pool is created, recomposed, or deleted this updates the protected entity accordingly. In some cases it may be necessary to manually unprotect and remove the protected entity in vCenter. SVICONFIG.EXE is included with View Composer to assist with this. Located under “C:\Program Files\VMware\VMware View Composer\SviConfig.exe” this command will unprotect any View Composer related protected entity.

Here is how to unprotect the host folder and any entities it may contain:

1. On the vCenter/View Composer server launch Start –> Run –> CMD
2. Browse to “C:\Program Files\VMware\VMware View Composer”
3. Type the command below replacing the default information with specific information for your environment.
SviConfig -operation=UnprotectEntity -VcUrl=https://my.vc/sdk -Username=User1 -Password=123 -InventoryPath="/My Datacenter/vm/MyReplicaFolder" -Recursive=True

If this is successful it will return a confirmation of any entities unprotected. Now it will be possible to use vCenter to delete the newly unprotected entity.

TrackBack

TrackBack URL for this entry:
http://www.typepad.com/services/trackback/6a00d8341c328153ef010536b0da36970b

Listed below are links to weblogs that reference View Composer - How to Delete Orphaned Protected Entities in vCenter:

Comments

Feed You can follow this conversation by subscribing to the comment feed for this post.

The command work without a hitch, I was able to remove the orphaned replica and source.

How do I put the protection back on the folder?

Ken

Having just been caught out by directly following your post you might want to make it clear that the "/vm/" part of the InventoryPath variable is actually a mandatory part of the commandline structure. For the InventoryPath variable just the "My Datacenter" and "MyReplicaFolder" parts need to be customised for the environment the command is being run in.

Curious if there's a solution for those of us who have upgraded our vCenter Server to 4.0 (actually migrated/upgraded to a new, 64-bit OS)? This command of course isn't supported in vCenter 4.0 since View doesn't yet support that (we spun up a different vCenter 2.5 server for our View instance so that we could upgrade vCenter). The pools were all deleted in advance I believe, but we have the replica and source VM orphans. The command above throws this error:

SviConfig finished with an error. Exit code: 4
This VC api version (4.0) is not supported.

FYI, I ended up filing an SR with VMware for this issue and they gave me a different version of the SviConfig tool that resolves this issue. If anyone else sees this and is in the same situation as me, just contact VMware support. Also see http://communities.vmware.com/message/1388360.

That link did not work anymore, a new KB with a link to the new sviconfig that works on vCenter4.1 would be helpful and productive, please! We just want to get rid of the orphaned

WARNING: Unprotecting VC managed entities will allow operations
(power on, delete, migrate) that can cause existing linked clone
to those managed entities to fail to work correctly.
Establishing connection to the VC server.
SviConfig finished with an error. Exit code: 4
This VC api version (4.1) is not supported.

It does not works. I think because I deleted the replica manually in the datastore.

Is there other way to remove the replica in vCenter? Thanks Joe

"SviConfig finished with an error. Exit code: 11
Entity not found."

It does not works. I think because I deleted the replica manually in the datastore.

Is there other way to remove the replica in vCenter? Thanks Joe

"SviConfig finished with an error. Exit code: 11
Entity not found."

I follow "Mattpendleton" and it's works:

1. If you are using vCenter, log in to the host that has the orphaned replica using the vSphere client.

2. You should see the orphaned replica there and you should be able to right-click and choose Delete.

3. Then go back to vCenter, find that same host, and right-click, choose Disconnect

4. Then choose Remove

5. Then right click on your Cluster and add the host back.

Thank you Joe for saving me a lot of hassle!

To fix exit code: 4
I found that I was using the root logon and password for esx instead of my Domain User for Virtual Center.
use: DOMAIN\username

To fix exit code: 11
I found that the replicas were in a different folder. I did an Advanced Search from my Vsphere client with "VM Name" and "Contains" and then the replica name as the criteria. The search results showed that the replica was in: InventoryPath="/My Datacenter/vm/VMwareViewComposerReplicaFolder/replica-799f3b16-dc63-4cb1-aacd-fa4efbef3058"

So once I took out the MyReplicaFolder as stated in some of the examples and replaced it with VMwareViewComposerReplicaFolder.
I was able to unlock and remove my orphaned replica.

I used the command and it unprotected all VM because I did not have a My replica Folder so it unprotected all VMs so I altered the command to Portect..

“SviConfig -operation=protectEntity -VcUrl=https://my.vc/sdk -Username=User1 -Password=123 -InventoryPath="/My Datacenter/vm/MyReplicaFolder" -Recursive=True”

hey awesome just what i was needing to do!

Post a comment

About This Blog



This blog has moved. For the latest posts please visit: blogs.vmware.com/euc/

VMware View Community


Discussions and resources for centralized provisioning & mgmt of enterprise virtualized desktops.

Visit Now

Twitter


Facebook

YouTube


    VMware Blogs