{"id":63967,"date":"2024-10-22T09:00:37","date_gmt":"2024-10-22T07:00:37","guid":{"rendered":"https:\/\/nolabnoparty.com\/?p=63967"},"modified":"2026-04-29T12:22:14","modified_gmt":"2026-04-29T10:22:14","slug":"omnissa-horizon-remove-orphaned-templates-and-replicas","status":"publish","type":"post","link":"https:\/\/nolabnoparty.com\/en\/omnissa-horizon-remove-orphaned-templates-and-replicas\/","title":{"rendered":"Omnissa Horizon remove orphaned templates and replicas"},"content":{"rendered":"<p><img decoding=\"async\" class=\"aligncenter wp-image-63978 size-full\" title=\"horizon-remove-orphaned-templates-and-replicas-01\" src=\"https:\/\/nolabnoparty.com\/wp-content\/uploads\/2024\/10\/horizon-remove-orphaned-templates-and-replicas-01.jpg\" alt=\"horizon-remove-orphaned-templates-and-replicas-01\" width=\"602\" height=\"202\" \/><\/p>\n<p>During a Desktop Pool deletion operation, some objects may not be properly removed leaving orphaned templates and replicas in <a href=\"https:\/\/nolabnoparty.com\/en\/vmware-vsphere-8-0-update-3-released\/\">VMware vSphere<\/a>.<\/p>\n<p>Although all Desktop Pools were deleted from the <a href=\"https:\/\/nolabnoparty.com\/en\/vmware-horizon-8-upgrade-sequence\/\">Omnissa Horizon<\/a> console, issues may arise where not all <strong>corresponding objects are successfully removed<\/strong> in VMware vSphere, resulting in <strong>orphaned VMs<\/strong>.<!--more--><\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-63980 size-large\" title=\"horizon-remove-orphaned-templates-and-replicas-02\" src=\"https:\/\/nolabnoparty.com\/wp-content\/uploads\/2024\/10\/horizon-remove-orphaned-templates-and-replicas-02-600x392.jpg\" alt=\"horizon-remove-orphaned-templates-and-replicas-02\" width=\"600\" height=\"392\" \/><\/p>\n<p>Upon reviewing the <strong>vSphere Inventory<\/strong>, certain templates and replicas remain listed, even after executing the <strong>deletion command<\/strong> from <a href=\"https:\/\/www.omnissa.com\/products\/horizon-8\/\" target=\"_blank\" rel=\"noopener\">Omnissa Horizon<\/a>.<\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-63982 size-large\" title=\"horizon-remove-orphaned-templates-and-replicas-03\" src=\"https:\/\/nolabnoparty.com\/wp-content\/uploads\/2024\/10\/horizon-remove-orphaned-templates-and-replicas-03-600x348.jpg\" alt=\"horizon-remove-orphaned-templates-and-replicas-03\" width=\"600\" height=\"348\" \/><\/p>\n<p>Looking at the <strong>Template<\/strong> view, Horizon templates and replicas can be easily identified.<\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-63984 size-large\" title=\"horizon-remove-orphaned-templates-and-replicas-04\" src=\"https:\/\/nolabnoparty.com\/wp-content\/uploads\/2024\/10\/horizon-remove-orphaned-templates-and-replicas-04-600x412.jpg\" alt=\"horizon-remove-orphaned-templates-and-replicas-04\" width=\"600\" height=\"412\" \/><\/p>\n<p>If you try removing these machines directly from the vCenter, the <strong>Delete from Disk<\/strong> option is greyed out since the <strong>VMs are protected<\/strong>.<\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-63986 size-large\" title=\"horizon-remove-orphaned-templates-and-replicas-05\" src=\"https:\/\/nolabnoparty.com\/wp-content\/uploads\/2024\/10\/horizon-remove-orphaned-templates-and-replicas-05-600x587.jpg\" alt=\"horizon-remove-orphaned-templates-and-replicas-05\" width=\"600\" height=\"587\" \/><\/p>\n<p>&nbsp;<\/p>\n<h2>How to remove orphaned templates and replicas<\/h2>\n<p>To remove orphaned templates and replicas, Horizon provides the <strong>iccleanup.cmd<\/strong> tool that can be run from the <strong>command line<\/strong>.<\/p>\n<p>From the <a href=\"https:\/\/nolabnoparty.com\/en\/vmware-horizon-7-12-installing-connection-server-pt-1\/\">Horizon Connection Server<\/a>, open the <strong>Command Prompt<\/strong> and navigate to the folder <em>C:\\Program Files\\VMware\\VMware View\\Server\\tools\\bin<\/em>.<\/p>\n<p><span style=\"color: #0000ff;\">C:\\&gt; cd \\Program Files\\VMware\\VMware View\\Server\\tools\\bin<\/span><\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-63988 size-full\" title=\"horizon-remove-orphaned-templates-and-replicas-06\" src=\"https:\/\/nolabnoparty.com\/wp-content\/uploads\/2024\/10\/horizon-remove-orphaned-templates-and-replicas-06.jpg\" alt=\"horizon-remove-orphaned-templates-and-replicas-06\" width=\"600\" height=\"194\" \/><\/p>\n<p>Run the following command to <strong>connect to the vCenter Server<\/strong>:<\/p>\n<blockquote><p>iccleanup.cmd -vc &lt;vCenter&gt; -uid administrator@vsphere.local -skipCertVeri<\/p><\/blockquote>\n<p><span style=\"color: #0000ff;\">C:\\...\\bin&gt; iccleanup.cmd -vc prod-vcsa.nolabnoparty.lab -uid administrator@vsphere.lab -skipCertVeri<\/span><\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-63990 size-large\" title=\"horizon-remove-orphaned-templates-and-replicas-07\" src=\"https:\/\/nolabnoparty.com\/wp-content\/uploads\/2024\/10\/horizon-remove-orphaned-templates-and-replicas-07-600x368.jpg\" alt=\"horizon-remove-orphaned-templates-and-replicas-07\" width=\"600\" height=\"368\" \/><\/p>\n<p>Enter <strong>list<\/strong> to display all the objects. In this example, the number <strong>1<\/strong> identifies the <strong>objects to delete<\/strong>.<\/p>\n<p><span style=\"color: #0000ff;\">&gt; Please input the command ( ... ): list<\/span><\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-63992 size-large\" title=\"horizon-remove-orphaned-templates-and-replicas-08\" src=\"https:\/\/nolabnoparty.com\/wp-content\/uploads\/2024\/10\/horizon-remove-orphaned-templates-and-replicas-08-600x348.jpg\" alt=\"horizon-remove-orphaned-templates-and-replicas-08\" width=\"600\" height=\"348\" \/><\/p>\n<p>To <strong>remove these objects<\/strong> from the vCenter Server, enter the command:<\/p>\n<blockquote><p>delete --index &lt;number&gt;<\/p><\/blockquote>\n<p><span style=\"color: #0000ff;\">&gt; list&gt; Please input the command ( ... ): delete --index 1<\/span><\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-63994 size-large\" title=\"horizon-remove-orphaned-templates-and-replicas-09\" src=\"https:\/\/nolabnoparty.com\/wp-content\/uploads\/2024\/10\/horizon-remove-orphaned-templates-and-replicas-09-600x276.jpg\" alt=\"horizon-remove-orphaned-templates-and-replicas-09\" width=\"600\" height=\"276\" \/><\/p>\n<p>Once the delete command has been executed, verify through vCenter Server that all orphaned templates and replicas have been <strong>successfully removed<\/strong>.<\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-63996 size-large\" title=\"horizon-remove-orphaned-templates-and-replicas-10\" src=\"https:\/\/nolabnoparty.com\/wp-content\/uploads\/2024\/10\/horizon-remove-orphaned-templates-and-replicas-11-600x352.jpg\" alt=\"horizon-remove-orphaned-templates-and-replicas-10\" width=\"600\" height=\"352\" \/><\/p>\n<p>You can also confirm the actual deletion in the <strong>Inventory<\/strong>.<\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-63998 size-large\" title=\"horizon-remove-orphaned-templates-and-replicas-11\" src=\"https:\/\/nolabnoparty.com\/wp-content\/uploads\/2024\/10\/horizon-remove-orphaned-templates-and-replicas-12-600x366.jpg\" alt=\"horizon-remove-orphaned-templates-and-replicas-11\" width=\"600\" height=\"366\" \/><\/p>\n<p>By following this simple procedure, you can keep your <a href=\"https:\/\/nolabnoparty.com\/en\/configure-postgresql-database-for-horizon-8-events\/\">Omnissa Horizon<\/a> environment clean and fully operational.<\/p>\n<p><img decoding=\"async\" title=\"signature\" src=\"https:\/\/nolabnoparty.com\/wp-content\/uploads\/images\/firma.jpg\" alt=\"signature\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>During a Desktop Pool deletion operation, some objects may not be properly removed leaving orphaned templates and replicas in VMware vSphere. Although all Desktop Pools were deleted from the Omnissa Horizon console, issues may arise where not all corresponding objects are successfully removed in VMware vSphere, resulting in orphaned VMs.<\/p>\n","protected":false},"author":3,"featured_media":63978,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"rop_custom_images_group":[],"rop_custom_messages_group":[],"rop_publish_now":"initial","rop_publish_now_accounts":{"facebook_2879994398731222_17841400390232720":"","mastodon_115463926174894442_115463926174894442":"","linkedin_93tdZWzMZc_93tdZWzMZc":"","bluesky_did:plc:tkabz5kl2rukzdwtuongv3kz_did:plc:tkabz5kl2rukzdwtuongv3kz":""},"rop_publish_now_history":[],"rop_publish_now_status":"pending","footnotes":""},"categories":[1025,2905],"tags":[1711,1712,2907,2906],"class_list":["post-63967","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-horizon-en","category-omnissa-en","tag-horizon","tag-orphaned","tag-replicas","tag-templates","has_thumb"],"_links":{"self":[{"href":"https:\/\/nolabnoparty.com\/en\/wp-json\/wp\/v2\/posts\/63967","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nolabnoparty.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nolabnoparty.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nolabnoparty.com\/en\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/nolabnoparty.com\/en\/wp-json\/wp\/v2\/comments?post=63967"}],"version-history":[{"count":0,"href":"https:\/\/nolabnoparty.com\/en\/wp-json\/wp\/v2\/posts\/63967\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/nolabnoparty.com\/en\/wp-json\/wp\/v2\/media\/63978"}],"wp:attachment":[{"href":"https:\/\/nolabnoparty.com\/en\/wp-json\/wp\/v2\/media?parent=63967"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nolabnoparty.com\/en\/wp-json\/wp\/v2\/categories?post=63967"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nolabnoparty.com\/en\/wp-json\/wp\/v2\/tags?post=63967"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}