Registering Clone Addresses in KeyControl Before Deployment

When a clone is taken from the Master VM, it will have different MAC and IP addresses. We can use the clone's MAC or the IP address to identify it in KeyControl as long as the address is registered with KeyControl before the clone is deployed.

Before You Begin 

Procedure 

  1. For Linux, log into the VM as root. For Windows, log in as a System Administrator and open a Command Prompt or start Windows PowerShell.
  2. Enter the command hcl template <-i ipaddr | -m macaddr> [-u username [-p password]] days_to_expire, where:

    For example, if you want to register a template with the MAC address 00-80-c0-8f-45-c8 that is valid for 30 days, you would enter:

    # hcl template -m 0080c08f45c8 -u CloudAdmin -p Hytrust123! 30

    If you want to register a template with the IP address 192.168.140.150 that never expires, you would enter:

    # hcl template -i 192.168.140.150 -u CloudAdmin -p Hytrust123! 0

    If you want to prepare a group of clones with consecutive IP addresses, you can create a script that calls the hcl template command once for each clone. For example, if you want to prepare 30 clones that will be available for 365 days starting with the IP address 192.168.140.150 and ending with the IP address 192.168.140.180, you could include the following in your script:

    i=150
    while [[ $i -lt 181 ]]; do
       hcl template -i 192.168.140.$i -u CloudAdmin -p Hytrust123! 365
       i=’expr+1’
    done
  3. To view a list of templates in the system, enter the command hcl template list.
  4. If you want to remove a template, enter the command hcl template remove <-i ipaddr | -m macaddr> [-u username [-p password]].
  5. When you have finished specifying the templates you want to use, power off the Master VM.
  6. Optionally, log into the vSphere Web Client and convert the Master VM to a template.

What to Do Next 

Deploy the clone VMs as described in Deploying Clone VMs.