VMware Cloud Community
awjudge
Hot Shot
Hot Shot

Dynamic DNS entry creation

Hi,


We're trying to customise a workflow to create a DNS entry for a provisioned VM, at the end of the provisioning process. I can't see an obvious way to make this happen, was hoping someone could give us some ideas.

We have Linux blueprint, which performs a kickstart, and installs the vCAC agent as part of the kickstart. That all works fine, and the VM gets the right name and IP address.

What we'd like is to have a process kick off at the end of the provisioning stage (after the VM has booted, and take it's IP address from the Network Profile) that creates a DNS entry for the machine.


The reverse would need to happen when the machine gets destoyed.

It looks like customising a workflow stub isn't going to help, because there's no 'stage' that represents the VM having been booted and having picked up it's correct IP from the pool.

I have seen some scripts that create DNS entries, but they look like they run inside the provisioned VM, which is a no-go for us, for a variety of reasons.


Can anyone point us in the right direction on this one?

Thanks,
Alex

0 Kudos
5 Replies
christianpg
Enthusiast
Enthusiast

Why would you like it to run after deployment?

Do you want machines to be provisioned if the DNS configuration fails?

Why not doing the DNS integration as part of state BuildingMachine (WFStubBuildingMachine)?

What kind of DNS server will you be integrating with?

0 Kudos
awjudge
Hot Shot
Hot Shot

I'm not too bothered where in the process the DNS entry gets created, I might just be misunderstanding the build process!

My understanding was that the IP address that gets assigned to the VM (from a VCAC Network Profile) only gets allocated to the machine when the VCAC agent starts up? If I'm wrong on that, then all the better... Smiley Happy

edit: We're running MS DNS services, I was looking at using DNSCMD.EXE

0 Kudos
christianpg
Enthusiast
Enthusiast

Nope, AFAIK, IP addresses from the network profiles are created before the provisioning - it's part of the input to the agent.

Check out the DEM-W log and you should see that the IP is there as input quite early in the stages.

Don't know your vCAC version, but a custom workflow using dnscmd.exe should work quite well.

This one helped me with a similar AD integration: http://dailyhypervisor.com/vcloud-automation-center-vcac-5-1-workflow-designer-walk-through-add-comp...

awjudge
Hot Shot
Hot Shot

That's very helpful, thanks!

One last question. When editing the workflow stubs, are you effectively editing the workflow for all provisioning activities from then on? From what I can tell, you can't save the stub with a different name, so I'm assuming the workflow is edited for all blueprint deployments?

0 Kudos
christianpg
Enthusiast
Enthusiast

Yes, the workflow stub affects all blueprints with the stub enabled (for vcac 5.2, see page 10 of https://www.vmware.com/pdf/vcac-52-extensibility-guide.pdf)

Higher degree of blueprint-scoping can of course be implemented with your own custom properties: if ($Properties["myCompany.myDNSHack.doit"]) { }

IMHO, a separate custom-DNS-workflow related build profile makes life easier.