VMware Cloud Community
k2exchange
Contributor
Contributor

vRA 7 multi machine blueprint get hostname IP details of Other VMs in deployment in blocking event

Hi

I have 3 tier blueprint and in last VM i am running machine provisioning event workflow. here i am getting vCACCAFE:CatalogResource of vm. After this i get its parent (which is deployment) and then its all child and then their hostname, ip. only issue is vCACCAFE:CatalogResource is only created when request is successful. if i create blocking event, vCACCAFE:CatalogResource can not be retrieved. So blocking events keeps request in progress state.

I tried to get other VM details from requestId as well, through below rest APIs. but in blocking event this rest api's also do not return information about other VMs. after vra request is successful, it returns all values. so question is how can i get other vm information even when request is in progress.

var client = vcachost.createCatalogClient();

var response = client.get("/consumer/requests/" + req.id + "/resources")

var response = client.get("/consumer/requests/" + req.id + "/resourceview")

var response = client.get("/consumer/requests/" + req.id )

0 Kudos
7 Replies
ectoplasm88
Contributor
Contributor

You should be able to get the information from the vCAC:VirtualMachine which will be available.  You can get it from the payload parameter or if you have things setup to receive the vCAC:VirtualMachine as an input that will work as well.  The IP should be a property of the virtual machine.

0 Kudos
k2exchange
Contributor
Contributor

ectoplasm88​ I need hostname/IP details of other vms in deployment. So payload will send id/properties of current VM for which event subscription is running. Let me know form VM payload i can get any information about other VMs in deployment. I do not see any way.

0 Kudos
eoinbyrne
Expert
Expert

I think there's a parent request ID that all VMs in the group will have as a custom property. I can't remember the name of the property right now but basically what you need to do is

1. Locate the parent request ID

2. Connect the IaaS host (vCAC:vCACHost) and look up those peer VirtualMachines which have the matching property name + value

3. Lookup the hostname + IP of the peer VMs

You should understand that in a blocking workflow on the EBS you may run into timing issues / race conditions around the the existence of the peers since you will be dealing with asynchronous requests in the IaaS system for each VM being provisioned

e.g., 3 x VMs = 3 x IaaS requests

Provisioning order will not always be guaranteed to be the same (or even at the same time....!!) so you'll need to be careful. In general though they will be in-transit pretty close together unless IaaS is very busy at that time.

Just one additional note I'd make is that where we've done this before I've been able to control the hostnames at request time (using XaaS to generate & assign hostnames at request time + place marker properties on each component instance before submission to give the names of all siblings in the deployment). This makes it easier to manage the asynchronous element of this as you only have to check if the siblings have been created + possibly wait a little in the blocking workflow to give the sibling time to "appear". We had to do this recently in an engagement where we had up to 16 siblings and we were using vRA Network Profiles as the IPAM source but were generating the node names in XaaS.

Anyway, HTH

0 Kudos
k2exchange
Contributor
Contributor

Thanks eoinbyrne​. I will check this solution. Concurrent deployment i am managing through dependencies in composit blueprint so the VM where i want to populate data only deploys when first nodes are done and ready.

I am also working on another solution of XaaS with custom host name. Lets see what works best for my used case. Thanks Again..

0 Kudos
n1ghtw4lk3r
Contributor
Contributor

Hi, I'm also looking for collecting data from multi machine blueprint I can run workflow for each of them but after they provisioned I need hostnames or IP addreess of all of them to run one specific workflow. Did you find the sollution and are able to share ?

0 Kudos
n1ghtw4lk3r
Contributor
Contributor

Hi, as I'm also looking for this solution I've decide to describe my own process which can be found here

Multi-Machine Blueprint - Collect VM from deploy - vWorld

0 Kudos
sbeaver
Leadership
Leadership

What I have done with Multi-Machine blueprints is to create a configuration item based on the correlationID and have each node update the configuration item with its own values and import values from the configuration Item into the BluePrint as needed during the deployment

Steve Beaver
VMware Communities User Moderator
VMware vExpert 2009 - 2020
VMware NSX vExpert - 2019 - 2020
====
Co-Author of "VMware ESX Essentials in the Virtual Data Center"
(ISBN:1420070274) from Auerbach
Come check out my blog: [www.virtualizationpractice.com/blog|http://www.virtualizationpractice.com/blog/]
Come follow me on twitter http://www.twitter.com/sbeaver

**The Cloud is a journey, not a project.**
0 Kudos