4 Replies Latest reply on Sep 9, 2019 7:55 AM by kallischlauch

    Unregistering VM's in bulk

    BillStreet00 Enthusiast

      One of the vRA installs has about a thousand "missing" vm's.  My original thought was to do a bulk import and mark them as unmanaged but due to the number of VM's I just can't. I've been googling cloud client and how to automate this but i'm not sure if I should proceed with powershell or something else to write all this in.  Any suggestions and/or experiences would be great.

        • 1. Re: Unregistering VM's in bulk
          jburen Hot Shot
          vExpert

          So if I understand you correctly you have VM's in vRA that no longer exist? I think you could use the vRealize CloudClient to remove them from vRA. For details see this article: VMware Knowledge Base

          • 2. Re: Unregistering VM's in bulk
            BillStreet00 Enthusiast

            Correct and I have used the cloud client to remove vm's in the past but I have 600+ vm's that need removed.  I want to provide a file with all the names and have a script use cloud client to remove them all so I am not inputting them in one at a time.

            • 3. Re: Unregistering VM's in bulk
              jburen Hot Shot
              vExpert

              I'm not sure how to automate this using cloud client but maybe you could use the stored procedure from the KB article?

              • 4. Re: Unregistering VM's in bulk
                kallischlauch Enthusiast

                go to managed machines, type missing in state so ,it shows missing only (create filter);.
                Then select all (top left), hover over one of them and select unregister. it will give you a list to approve. only does 30-ish at a time (whatever fits to window)
                if thats not an option it needs scripting with cloud client:

                 

                on a note, you can find this logged here: C:\Program Files (x86)\VMware\vCAC\Server\Logs  on IaaS
                there's a file MissingMachines.txt

                 

                 

                also bulkimport is not the right tool I think as for import VRA needs to see the VM. if it cannot 'see' it, its missing. I think first find out if the VMs were deleted, or if its because VRA cant access the vCenter anymore (or cluster)