Unable to remove vCenter Server or an ESX host from VMware vCloud Director
search cancel

Unable to remove vCenter Server or an ESX host from VMware vCloud Director

book

Article ID: 340892

calendar_today

Updated On:

Products

VMware Cloud Director

Issue/Introduction

This article provides steps to unprepare an ESX host and remove vCenter Server before uninstalling VMware vCloud Director.


Symptoms:
  • You cannot remove vCenter Server from VMware vCloud Director
  • You see the error:

    Failed to unregister vCenter Server "devvcenter002". Real networks from he this virtual center are still referenced.

  • You cannot unprepare an ESX host
  • If you try to automatically unprepare a host from VMware vCloud Director (by right-clicking the host in VMware vCloud Director and choosing Remove), you see errors


Environment

VMware Cloud Director 1.5.x
VMware Cloud Director 5.1.x
VMware Cloud Director 1.0.x

Resolution

Log in to VMware vCloud Director and review the list of networks in Cloud Resources > Networks Pools that are using the vCenter Server. If this list is not empty, delete the network mappings and try removing vCenter Server again.
To reset the vCloud environment:
  1. Log in to the ESX host service console and uninstall the VSLAD with this command:

    Note: This unprepares the ESX host in vCloud Director.

    # ./opt/vmware/uninstallers/vslad-uninstall.sh

  2. Uninstall vCloud Director from the Cells with this command:

    ESX/ESXi 4.x/vCloud Director 1.x:

    # rpm -e `rpm -qa | grep vcloud`

    ESXi 5.x/vCloud Director 1.5.x:

    # esxcli software vib remove -n vcloud-agent

  3. Remove leftover files in /opt/vmware in the Cells with the command:

    Note: Do not delete the vpxa directory.

    # rm -rf /opt/vmware

  4. Clean up the database.

    1. Log in to Oracle host as your oracle user and run the command:

      oraenv

    2. Type your Oracle instance name when asked.

      Note: The script should set ORACLE_HOME automatically. If it asks you for ORACLE_HOME, then the instance name may be wrong.

    3. Start SQLplus, then run the delete user commands and recreate the user if you want to reinstall:

      sqlplus SYSTEM/+password+@+oraclehostname+/+oracleinstance +
      drop user vcloudusername cascade;
      create user vcloudusername identified by password;
      quit

  5. Reset vShield Manager:

    1. Log in to the console either through SSH or from vSphere Client using admin/default and type:

      manager> enable

    2. Enter the password when prompted. It is the same as the admin password, which by default is default.
    3. Run the command:

      manager# database erase

      For vCloud Director 5.1:

      manager# write erase

    4. Wait for the database erase to complete, then quit.

  6. Reinstall vCloud Director. For more information, see Installing VMware vCloud Director software on the first server (1026381).


Additional Information

Installing VMware vCloud Director software on the first server