VMware Cloud Community
SteveThePirate0
Contributor
Contributor

Use Infoblox integration WITHOUT creating Infoblox records

Hi there, looking for some advice and maybe a sanity check here in case I'm just trying to do this in the most difficult way possible.

Scenario:

We have Infoblox IPAM in our environment, which is linked to our MS DNS servers. I have the Infoblox VRA integration set up, and am successfully using it to pull an available IP address for deployments from our Infoblox instance.

What I want:

To create a VM in VRA, using the IP address pulled from Infoblox, and then have our Microsoft DNS create the record for us in Infoblox, WITHOUT directly creating any records in any other IPAM tools.

What's happening instead:

Error 1:

Originally I had the VRealize network profile set up to use an internal Cloud Assembly-based IP range, which worked fine, until I discovered that vRealize was not reliably releasing IPs back to the pool, especially in the case where an in-progress deployment was cancelled or there was some other "unexpected" condition. This meant that Infoblox was telling me that a certain IP was available, vRealize disagreed, and the deployment failed. No problem, I thought, I'll just use the External Infoblox range. Which led us to...

Error 2:

I then tried to set up an "external" IP range, with Infoblox as the source. Just to get the thing to work without error, I decided to try to create a proper host entry in Infoblox, just to see if I could get it to go through without error. But, since our Infoblox is also tied to our MS DNS infrastructure in a way I admit I don't really understand, when I try to deploy to this range, I get the following error:

Failed IP ALLOCATE_SPECIFIC_IP failed: Action run failed with the following error: ('Error allocating in network or range: Cannot create \'record:host\' object(s): b\'{ "Error": "AdmConDataError: None (IBDataConflictError: IB.Data.Conflict:Host records cannot be added to the zone abcde while Microsoft servers are configured for the zone.)", \\n "code": "Client.Ibap.Data.Conflict", \\n "text": "Host records cannot be added to the zone abcde while Microsoft servers are configured for the zone."\\n}\' [code 400]', {}) (less)

Error 3:

Annoying, but ok. This led me to spending probably more time than was wise digging through the source code for the Infoblox plugin, finding where it returns the allocation object, adding an Infoblox property to my blueprint that the plugin watches for, and if that property is present, skipping the Infoblox allocation code and returning a "dummy" allocation object instead. That is now failing with an error that simply says "Missing allocationId". Digging through some logs led me to a fairly unhelpful Java stack trace that suggests something deep in the VMware code is looking for this nonexistent allocationId, and now I'm at my current place of reconsidering my life choices.

Any other suggestions on how to do what I'm attempting here would be greatly welcomed.

Thanks!

Steve

0 Kudos
1 Reply
eoinbyrne
Expert
Expert

Question first - In the 'Error 2' case, can you just not create the DNS record? Is that configurable through the vRA/vRO plugin? I've never used it so wondering if that is the simple fix ?

If that's no good, I would think that what you want to do (just a request a free IP from Infoblox during a build and nothing else) should be possible if you use a Subscription on the Network Configure event.

eoinbyrne_0-1666963210678.png

Looking at the Infblox REST API doc (which version do you use? This might make a difference when you go to do this) there is an operation for requesting the next free IP for a subnet

eoinbyrne_2-1666963322869.png

I have recently used this event approach to get around a problem with a Post-migration setup (vRA 7 still in active use while vRA 8 deployment being commissioned). The issue was that we needed to make the vRA 8 setup allocate from the top end of the ranges (i.e., allocating backwards from .254 on the internal range) and I was able to do this using the  vRA 8 REST API to locate the network-profile & the range from the event content and then do the 'walk' backwards to locate a free IP (where free meant a query on the vRA8 inventory for the candidate IP returned no value - not entirely infallible but good enough for now).

Anway, it seems like it would be possible to just replace the call to the vRA8 APIs there with the Infoblox one. To make vRA respect the allocated IP your subscription just needs to return the addresses[[]] component of the event filled in with the allocated IP. You would need to be careful around successfully mapping the network IDs in the vRA Event content to get the equivalent Subnet/Network ID in Infoblox but in general it should be doable

-HTH

0 Kudos