Install Guide
7. Create /etc/syscong/network-scripts/ifcfg-eth0 with the following content:
BOOTPROTO=dhcp
ONBOOT=yes
HOTPLUG=yes
DEVICE=eth0
TYPE=Ethernet
PEERDNS=no
NM_CONTROLLED=no
Create /etc/syscong/network with the following content:
NETWORKING=yes
NETWORKING_IPV6=no
8. Congure a cron job that executes the puppet_certname.sh script and restarts the puppet service in reboot events.
Type the following command to open the crontab editor:
crontab -e
Type the following commands in the crontab editor:
For RHEL/CentOS 6:
@reboot sleep 60; /usr/local/bin/puppet_certname.sh > /var/log/puppet_certname.log
2<&1; /etc/init.d/puppet restart
For RHEL/CentOS 7:
@reboot sleep 60; /usr/local/bin/puppet_certname.sh > /var/log/puppet_certname.log 2<&1
Run the following command to verify that the crontab is updated:
crontab -l
NOTE: The log le, /var/log/puppet_certname.log, shows the output of the puppet_certname.sh script, which helps
troubleshooting process.
9. After completing the customization, turn o the virtual machine.
10. Remove the virtual network adapter from the source virtual machine through the vSphere or the Hyper-V manager. Optionally,
the virtual machine may be converted into a virtual machine template at this point. For example, right click virtual machine in the
vSphere Client and click Template → Convert to Template.
NOTE: Do not turn on the virtual machine after creating the template or the Linux virtual machine. If you turn on the
virtual machine, ensure that you clean up the machine before you use it as a source machine. To clean up the virtual
machine:
a. Delete the puppet verication le from the system. The le is available at /var/lib/puppet_verication_run.txt.
Optionally, the log le at /var/log/puppet_certname.log, may also be deleted.
b. Delete the content under the following directories—/var/lib/puppet/ssl, /var/lib/puppet/client_data, /var/lib/
puppet/clientbucket, /var/lib/puppet/client_yaml:
c. Delete the /var/lib/puppet/state directory.
d. Run the following command to clean up the puppet cert from the ASM server—replace <
CERTNAME
> with actual
certname:
puppet cert clean <
CERTNAME
>
e. Remove the certname entries from puppet_conf le to restore the puppet.conf le to its initial state.
Customizing Windows Template
Pre-requisites:
• Ensure that you have completed the following instructions for VMware or Hyper-V virtual machines: For more information about
customization instructions, see Customizing Virtual Machine Templates or Virtual Machines for the VMware or Hyper-V topic
in this document.
23