Next click RedHat 8.3 in the Applicable Operating Systems section All Items list and it will move over to the Selected Items list. On the Provisioning Templates > Edit UserData open-vm-tools page click the Association tab. On the resulting list, click on the UserData open-vm-tools link. On the Provisioning Templates page, type userdata in the search field and the click Search button. Chose Hosts -> Provisioning Templates from the side menu. We will need to associate the UserData open-vm-tools template with RHEL 8.3. # hammer template create -name vmware-cloud-init -file ~/vmware-cloud-init-template.erb -locations moline -organizations "Operations Department" -operatingsystem-ids 2 -type cloud-initįor the user data we can use the UserData open-vm-tools template that is provided with Satellite. Now we will create our cloud-init template on Satellite. $ hammer os list hammer architecture list hammer compute-resource list # cat > ~/vmware-cloud-init-template.erb įrom Hammer, let's get the ids for the operating system, architecture, and compute resources. Note: The cloud-init template we are creating will also register your RHEL VM to Satellite and Insights. In the root user's home direct create the following cloud-init template. Login into Satellite server's command line and switch to root user. Next we will create a cloud-init template. After filling in the information, click the blue Submit button.
We will revisit this page in a few minutes to update the template tab. We will only be filling in information on the Operating System tab and accept the default settings for any other tabs on this page. On the Operating Systems > Create Operating Systems page fill in or choose options from the following table, and click the blue Submit button. On the Operating Systems page click the blue Create Operating System button. bin/cat > /etc/sysconfig/network-scripts/ifcfg-ens192 Operating Systems. # cat > ~/clean.sh /var/log/audit/audit.log Remember to hit Ctrl-D after the cat command or just copy and paste the content here (minus the cat command line) into a file named clean.sh. We will now unregister the server from Satellite # subscription-manager unregister # cp /etc/cloud/cloud.cfg ~/cloud.cfg.`date -I` Make up a backup of the default cloud-init file.
We set up the cloud-init to make a call back to Satellite. To update the record of certificates, enter the following command. # wget -O /etc/pki/ca-trust/source/anchors/cloud-init-ca.crt # update-ca-trust enableĭownload the katello-server-ca.crt file from Satellite Server.
# yum -y install cloud-init open-vm-tools perlĮnable the CA certificates for the image. To support the creation of the VM template, we will install the following the cloud-init, open-vm-tools and perl packages. # subscription-manager register -org=operations -activationkey=ak-ops-rhel8-prem-server Note: Here for the -org parameter we use the Operations Department ( operations) label. We will now need to temporarily subscribe to Satellite to access template packages. Nmcli> ~]# nmcli device reapply ~]# nmcli device show ~]# hostnamectl set-hostname "localhost.localdomain"
We will temporarily configure the network device as we will need a network connection during the setup of the template ~]# nmcli con modify ens192 connection.id ~]# nmcli con mod ens192 thod ~]# nmcli con edit ens192 After the system has rebooted, login as root and start a terminal session for the remainder of the configuration.Ĭheck to see if the the ethernet connection is active and if not active, run the connect command # nmcli device status Start the installation and reboot the system per the installation instruction. You will need to set the language, define the disk and set the root password. You will use the web console to interact with the VM and configure it. Choose 1 CPU with 2 GB of RAM and 20GB disk space. For RHEL 8.3 I uploaded the rhel-8.3-x86_64-dvd.iso file.Ĭreate and start the RHEL VM. We will create a RHEL 8.3 template for the exercise which prepares us for a future tutorial where we update our RHEL VM via Satellite.įirst you will need to upload any RHEL ISO files to the VMware environment you will need for the RHEL VM we will be creating.
We will now create a VM template on VMware which we will use when provisioning RHEL VMs from Satellite.
In this post, continuing our series on setting up Red Hat Satellite for VMware to provision virtual machines (VMs) from Satellite, we'll look at creating templates for use with VMware.