TheSaffaGeek

My ramblings about all things technical


Leave a comment

vCloud endpoint wont delete from vCAC 5.2

I am currently working on a project that is using vCAC 5.2 ,vFabric Application Director 5.2 and vCloud 5.1 to provide automated self service provisioning of resources for customers (super learning experience).

Whilst going through the manual steps of removing a test customer from the solution before automating the steps through VCO, I hit a very strange problem where at the point of deleting the endpoint to the vCloud Organisation that was assigned for the test customer I got an error stating “ Error has been caught,see event logs located on the vCAC server for detail” and as shown below.

clip_image001

If I went to the the logs within vCAC there were two errors linked to the problem. the main one stating “….  Inner Exception: the DELETE statement conflicted with the REFERENCE constraint “HostNic….”

clip_image002

The error is showing that a computer resource is still attached to the endpoint even though I had removed the computer resource from the vCloud Enterprise Group computer resources selection, removed the Org VDC from vCloud and run a manual data collection. It seems that there is a bug at present that doesn’t allow the removal via the UI (bug report already opened before someone asks) so what you need to do is (I make no promises or guarantees around this script so use at own discretion and backup your DB before running this):

  1. Go to the SQL server that hosts the vCAC database.
  2. Open SQL Management Studio as a user with sufficient permissions.
  3. Select the vCAC database and click the New Query button at the top left.
  4. Ensure the vCAC database is selected.
  5. Paste the following SQL script in the query box and change the ‘ORG VDC NAME’ to the name of the Organisation VDC that the endpoint was connected to and execute the query.

DECLARE @HostId uniqueidentifier

SET @HostId= (SELECT HostId FROM Host WHERE HostName = ‘ORG VDC NAME’)

DELETE FROM VirtualMachine WHERE HostID = @HostId

DELETE FROM HostNicToReservation WHERE HostNicID IN (SELECT HostNicID FROM HostNic WHERE HostID = @HostId)

DELETE FROM HostReservation WHERE HostID = @HostId

DELETE FROM HostNic WHERE HostID = @HostId

DELETE FROM HostToStorage WHERE HostID = @HostId

DELETE FROM AdminGroupToHost WHERE HostID = @HostId

DELETE FROM ResourcePool WHERE HostID = @HostId

DELETE FROM Host WHERE HostUniqueID = (SELECT HostUniqueID FROM Host WHERE HostID = @HostId) AND ClusterHostID = @HostId

DELETE FROM Host WHERE HostID = @HostId

  1. The results should show that some values have been changed.
  2. Now you can remove the endpoint from vCAC and the computer resource won’t show up for selection under the vCloud Enterprise Group either.

I hope this saves someone the time I spent trying to fix the problem.

Gregg


    4 Comments

    vCAC 6.0 Resources

    As most people who work with VMware will know vCloud Automation Center version 6 was released last week and with the plans for vCAC to become the route for non VSPP partners for cloud plus the added features and functionality of 6.0 the twitterverse is alive with people looking to learn more. I am one of those people and was even fortunate enough to be part of the beta for 6.o but there is loads to learn so I decided to start a list of really great resources around the product that I could use to skill up with and thought it would probably help other people as well and so this is what this blog posting is about. I am hoping to continually add more resources to this list and welcome any recommendations on good resources.

    Product Landing Page:

    Product Documentation:

    Release Notes:

    Compatibility Matrix:

    Installation and configuration blogs:

    Distributed Installation

    Sam McGeown has done a series around the distributed installation of vCAC 6.0 which isn’t as simple as you would hope.

    1. VCAC 6.0 build-out to distributed model – Part 1: Certificates
    2. vCAC 6.0 build-out to distributed model – Part 2: vPostgres
    3. vCAC 6.0 build-out to distributed model – Part 3.1: Configure Load Balancing with vCNS
    4. vCAC 6.0 build-out to distributed model – Part 3.2: Configure load balancing with NSX
    5. vCAC 6.0 build-out to distributed model – Part 4: Deploying and clustering a secondary vCAC Appliance

    Training

    Automation of the Installation

    Day 2 Automation

    Jonathan Medd as created a brilliant series of postings around vCAC tenant creation

    Automating vCAC Tenant Creation with vCO: Part 1 AD SSL
    Automating vCAC Tenant Creation with vCO: Part 2 AD Users, Groups and OUs
    Automating vCAC Tenant Creation with vCO: Part 3 Install the vCAC plugin for vCO
    Automating vCAC Tenant Creation with vCO: Part 4 Creating a Tenant
    Automating vCAC Tenant Creation with vCO: Part 5 Creating an Identity Store
    Automating vCAC Tenant Creation with vCO: Part 6 Adding Administrators

     

    Top orchestration blogs

    http://vcoteam.info/

    http://elasticskies.com/

    http://cloudyautomation.com/

    http://v-reality.info/

    http://www.vcacteam.info/

    http://www.vcoportal.de/

    http://d-fens.ch/category/technology/

    Orchestrator Videos

    Intro to vCenter Orchestrator

    vCenter Orchestrator Install and Configure

    Using vCO to manage Active Directory and Exchange

    Advanced vCO

    Converting vCO Workflows to versionable code

    FREE VMware vCenter Orchestrator Instructional Videos [Updated]

    VMware Hands On Labs

    Videos:

    VMwareTV have now posted 30 videos covering vCAC features http://www.youtube.com/user/vmwaretv?feature=watch

    vCAC 6.0 Extensibility Overview

    #vBrownBag Automate ALL the things – vCAC 6.0 Installation with Jon Harris (@ThevCACGuy) from ProfessionalVMware on Vimeo.

    #vBrownBag Automate ALL the things – vCAC 6.0 Getting Started with Jon Harris (@ThevCACGuy) from ProfessionalVMware on Vimeo.

    Reference Architecture Guide:

    http://www.vmware.com/files/pdf/techpaper/vmware-vcloud-automation-center-60-reference-architecture.pdf

    Helpful vCAC 5.2 Resources

    Just because some people will still be asked to do vCAC 5.2 . Also the installation notes only cover installing all the components on one server whereas Arnim has detailed how to do it when you have separated the components like you would in a production environment. I’ve used these notes on a 5.2 engagement and assure you these are correct compared to the actual VMware instillation notes

    http://www.van-lieshout.com/2013/08/vcloud-automation-center-part-1-vcac-components-overview/

    http://www.van-lieshout.com/2013/08/vcloud-automation-center-part-2-installation-preparation/