Posts tagged ‘rhel 7.3’
How to create a RHEL 7 template in VSphere ESXi 6.7
Unlike for Windows , RHEL based template creation requires additional steps to make it work. During this process , I came across very valuable information from the linuxtechi blog . I am summarizing the steps and some additional steps that I followed during the whole. process. ( But , I am not adding the steps that you need to follow in ESXi to convert a VM in to template)
Source: https://www.linuxtechi.com/create-vm-template-ovirt-environment/
Environment Details:
- RHEL 7.3
- ESXi 6.7
+ Create a RHEL 7.3 VM
+ Install the Operating System and all other Packages needed.
+ Yum update it (If you have a valid RHEL subscription).
Thereafter , we need to follow the below steps to generalize the VM by removing any VM specific configuration and you need to do the below:
+ Remove the SSH host keys
# rm -f /etc/ssh/ssh_host_*
+Clear the history
# history -c
+Clear Yum
#yum clean all
Update#1: In case , if the sys-unconfig command does not work, you must use the virt-sysprep command . Details steps can be found in the below article
https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/virtualization_deployment_and_administration_guide/sect-guest_virtual_machine_disk_access_with_offline_tools-using_virt_sysprep
NOTE: VM Customization specification is mandatory to avoid the VM’s getting the same hostids. Steps are as below;
+ Login to the VCenter.
+ Open Policies & Profiles.
+ Select VM Customization Specification.
+ Provide the details , based on your environment.
+ In the Network screen , select “Manually Select Custom Settings”.
+ Click on Add.
+ In the IPv4 section , select ” Prompt the user for an IPv4 address when the
specification is used “.
Good Luck .