You can use cloud-init to easily configure multiple DNS/DHCP Server services on your VM by creating a local ISO image that contains the set of server services and mounting the ISO to an installed DNS/DHCP Server VM.
Note: Merge operations cannot be
performed on a /31 network if a DHCP range is present on the
network.
To configure server services using cloud-init
- Log in to a local Linux machine using the command line.
-
Create a file that contains the cloud-init configuration information for the
DNS/DHCP Server services that you would like to configure. For more information
on configuring additional server services, refer to Reference: DNS/DHCP Server service configuration examples.
The following contains an example of the contents of a file called user-data:
#cloud-config bluecat_service_config: payload: | { "version": "1.0.0", "services": { "firewall": { "configurations": [ { "firewallConfiguration": { "enable": true, "allowPing": false } } ] }, "ssh": { "configurations": [ { "sshConfiguration": { "enable": true, "tacacs": { "enable": false } } } ] }, "ntp": { "configurations": [ { "ntpConfiguration": { "enable": true, "servers": [ { "address": "192.168.47.10", "stratum": "default" }, { "address": "127.127.0.10", "stratum": "1" } ] } } ] } }
-
Create a metadata configuration file containing dsmode
information.
The following contains an example of the contents of a file called meta-data:
dsmode: local
-
From the command line of a Linux machine, generate the ISO file that will
contain the DNS/DHCP Server service configuration information using the
following command:
genisoimage -output service-config.iso -volid cidata -joliet -rock user-data meta-data
Where
user-data
is the name of the server service configuration file andmeta-data
is the name of the metadata configuration file. - Log in to the VMware vSphere.
- Navigate to the location of the DNS/DHCP Server VM to be configured with the server service configuration.
-
Edit the virtual machine settings so that its virtual CD/DVD device is
configured to use the ISO image (instead of the physical CD/DVD drive).
- Select the tab for the virtual machine you just created.
- Click Edit virtual machine settings.
-
On the Hardware tab, select
CD/DVD drive. On the right side:
- Select Connect at power on.
- Select Use ISO image file.
- Click Browse and navigate to your saved ISO image file.
-
If your virtual machine is currently powered on, reboot the machine. Otherwise,
power on the virtual machine.
The virtual machine boots from the ISO image and cloud-init configures the selected DNS/DHCP Server services.