Configure DNS record creation for fenced services in Commander
Follow these instructions to enable DNS record creation for fenced VMs.
Requirements
- Install the DNS snap-in on the Commander application server.
- Ensure the Commander Service Account has permission to create and modify DNS records on the target DNS server.
- Adding the account to the DnsAdmins group is the simplest method.
- Apply the workflow to individual components rather than services, including vApps.
Creating the Batch Files
Create the following batch files on the Commander application server. Flexera recommends you use a single directory for all executables that Commander will call in workflows.
Add_DNS.bat
@echo off dnscmd.exe %1 /RecordAdd %2 %3 A %4
Remove_DNS.bat
@echo off echo Y | dnscmd.exe %1 /RecordDelete %2 %3 A %4
Alternatively, download FencedDNS.zip here and extract it to the scripts directory on your Commander application server.
You can also choose to use the embedded script workflow step to make the workflow more portable.
Workflow Step – Add DNS Record
Create a new completion workflow or add the following step to an existing workflow. When you do so, replace dnsServer and domainName with the correct values for your domain.
Make sure that the Completion Workflow is applied only to those services in your catalog which are fenced.
Workflow Step – Remove DNS Record
Similarly, when decommissioning you can add the following step to remove the DNS records in your change request approval workflow. When you do so, replace DnsServer and domainName with the correct values for your environment.