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
root
. For Windows, log in as a System Administrator and open a Command Prompt or start Windows PowerShell.Enter the command hcl template <-i ipaddr | -m macaddr> [-u username [-p password]] days_to_expire
, where:
<-i ipaddr | -m macaddr>
is either -i
and an IP address or -m
and a MAC address.-u
is a KeyControl user account with Cloud Admin privileges. If you do not specify the account name, hcl prompts you for the information.-p
is the password for the KeyControl account. If you do not specify this password you will be prompted for the information.days_to_expire
is the number of days for which the access will remain valid for the clone. After access expires the clone will not be able to register itself with KeyControl and access to the clone will be denied. If you do not want the access to ever expire, specify 0 (zero) for this option.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
hcl template list
.hcl template remove <-i ipaddr | -m macaddr> [-u username [-p password]]
.What to Do Next
Deploy the clone VMs as described in Deploying Clone VMs.