VMware Cloud Community
dkhan
Contributor
Contributor

getting IP addresses of vApp VMs from within VM

Hello, I'm deploying a distributed application using a number of VMs in a vApp. What I need to do is automagically configure the applications as part of the application deployment but I can't find a way to get the list of all of the addresses that the VMs are using from withing the VMs. I thought about some type of discovery service but the VMs could be in different network segments at deplyoment time so I can't assume that all of the VMs are on the same network. Another option would be to use a private network address range and statically assign the addresses but since some of the VMs are in a DMZ and some are in a protected network I don't want open up security holes. Ideally if I can get a way for each VM to get a list of all of the other VM addresses then that would be ideal. Has anyone done this or know of a vApp that does this? What would be the best way to get this information.

0 Kudos
2 Replies
dkhan
Contributor
Contributor

I've done some research on this and basically there is no way to do this today unless one uses an API, say the vSphere API to query the vSphere server for the vApp addresses. This is not a good approach as the application is not a management application, so it should not be allowed to query the management infrastructure, which may not even be accessible from the VMs, besides, I'd be substituting one set of questions in the GUI for another set.

I can see other vApp ISVs needing a similar feature for any realistic multi tiered web application. Perhaps the vApp deployment process could deposit a file on each vApp which has the addresses of the other VMs that are part of the vApp. This info is already available and it should not be too difficult to implement, especially for Linux VMs.

Wish I could get the attention of some vApp developers.

0 Kudos
dkhan
Contributor
Contributor

Turns out I found the answer as the ovfenv script dumps all of the IP network parameters for all of the VMs in the vApp. Gee, why didn't anyone mention this before Smiley Happy

0 Kudos