2 Replies Latest reply on Sep 25, 2012 8:45 AM by Sujit Apte

    How to Delete Virtual Server on vCenter using BSA

    Yudi Maryanto

      I have successfully deployed virtual server on vCenter. Now I want to delete it since its lifetime is over. But based on this document (https://docs.bmc.com/docs/display/public/bsa82/Rolling+back+a+deployment), it said that "The rollback feature is not supported for Virtual Guest Jobs (all platforms)". So, how to automate the deletion process of virtual server? In the "Jobs" folder, I found no job creation for deleting virtual server.



        • 1. Re: How to Delete Virtual Server on vCenter using BSA

          There are BLCLI's and UI actions available to delete a Virtual Server.


          There is a small difference though. If you do this action via the UI, the Virtual Server is deleted from the vCenter, but is not decommissioned from BSA.

          If you instead do it from the BLCLI, it deletes the Virtual Server from vCenter and also decommissions it from BLCLI.


          To run this via the UI, you can browse to the vCenter Server -> VMware vCenter Server node -> Virtual Machines node. Look for the Virtual Server that you want to delete, right click on it and click 'Delete'


          To run this via the BLCLI, it's a 2 step process:

          First get the Virtual Server's 'Virtual Guest Key' by running:


          VIRT_ENTITY_KEY=`blcli -v <profileName> -r <roleName> Virtualization  getVirtualGuestKeyByServerName <virtualServerName>`


          Delete the Virtual Server:


          blcli -v <profileName> -r <roleName> Virtualization deleteVirtualGuest $VIRT_ENTITY_KEY

          • 2. Re: How to Delete Virtual Server on vCenter using BSA

            My 2 cents on top of what Umar has said.


            There is no separate job to delete virtual server. However we can bridge the gap to some extent by creating nsh script job. This nsh script job can in turn be run/scheduled as required.


            Step1:- Assuming that you want to delete VMware virtual machine “server1”.



            SERVER1_NAME=$1     (If you want to pass this as argument to the script)


            Step 2:- Get the Virtual Server's 'Virtual Guest Key'.

            VIRT_ENTITY_KEY=`blcli -v <profileName> -r <roleName> Virtualization  getVirtualGuestKeyByServerName < server1>`


            Step 3 :- Delete actual virtual guest by using

            blcli -v <profileName> -r <roleName> Virtualization deleteVirtualGuest $VIRT_ENTITY_KEY


            Note:- Step 2 and 3 are already provided by Umar in previous update.





            1 of 1 people found this helpful