Summary: This technical write-up discloses simple steps for creating a Ubuntu 18.04 VM Template to automate your VMware vSphere virtual machine.
Table of Contents
Introduction
Creating a VMware vSphere template for Ubuntu server 18.04 allows a super-fast deployment of Virtual Machines. Also, it enables you to add or update custom software to create the best server for your business environment.
However, before getting started with the creation of Ubuntu 18.0 VM Template* you need to create a VM, add required VMware tools, and extract unique data (if any).
VM Template*
A VM template is a master copy of Virtual Machine that includes virtual devices, VM disks, guest OS, multiple applications, a specific VM configuration, and settings. VM templates are basically used while deploying multiple VMs and for VM cloning. Using a VM from a template decreases the provisioning times and helps you maintain the standards.
Prerequisites
-
-
-
- Download the ISO file of Ubuntu-18.04 on your local PC.
- Go to your VMware ESXI Server
-
-
-
-
Create Ubuntu 18.0 VM Template For VMware Automation
In the subsequent section we will disclose the steps to Create Ubuntu 18.0 VM Template For VMware Automation:
Step 1. Download The ISO File
1. Click on the official website of Ubuntu:-
Link : – https://releases.ubuntu.com/18.04/
-
-
- 2. To directly download the Ubuntu 18.04 ISO, click on the below link.
- Link : – https://releases.ubuntu.com/18.04/ubuntu-18.04.6-live-server-amd64.iso
-
-
-
Step 2. Now, Login into your VMware ESXi
-
-
-
-
-
Step 3. Upload the ISO Image to VMware ESXi Datastore
1. Click on the Storage button, then click on the Datastore browser.
2. Click on the Create Directory and create the folder with the name of iso3. Click on the Upload button
4. Then, choose the Ubuntu-18.04 ISO image from your local computer and click on the Open button.
-
-
-
-
-
Step 4. Create a VMware ESXi Virtual Machine for Ubuntu 18.04 Installation
1. Click on the created /RegisterVM
2. Then select the option:- create a new virtual machine and click on Next.
3. Enter VM name and select the Guest OS family to Linux and Guest OS version to Ubuntu Linux (64-bit). Then, click on Next.
4. Select the datastore and click on Next.
5. Configure the virtual machine hardware and click on CD/DVD Drive 1 and browse the Ubuntu-18.04 ISO file from the datastore then click on Next.
6. Then choose the ISO file..
7. Once it is done then click on Next and click on Finish button.
Now the new VM should be created on your VMware ESXI. Click on Virtual Machine.
-
-
-
-
-
Step 5. Installation of Ubuntu 18.04 operating system
1. For starting the installation of OS, click on the VM or Power on button.
2. Now installation is initialized, then only select language and press Enter.
3. Press Enter on interface ( ens160 ) to configure the IP address.
4. Then click on the Edit IPv4 option.
5. Choose the manual option under IPv4 Method:-
6. Now configure the IP addressing according to your network. click on the Save button.
7. Then click on the Continue option.
8. Now configure the Storage Configuration. Select the option Use an entire disk and
Press Done option.9. Press enter on the Done option.
10. Select the username and password for Profile Setup and press the Done option.
11. For SSH access, press the space button on the Install OpenSSH server and press enter on the Done option.
12. Now installation is complete, press the Reboot Now option.
After all steps, the Virtual Machine is ready to boot Ubuntu 18.04 from the virtual hard drive. After that, Enter the username and password.
-
-
-
-
-
Step 6. Installation of VMware Tools on Ubuntu 18.04 VMware Virtual Machines
1. On VMware ESXI, click on the Action button > Guest OS > Install VMware Tools. After the Install VMware Tools option, CD-Drive is automatically connected with your OS.
2. Confirm the CD-Drive is connected properly. Run the below command:-
# lsblk
3. After confirmation, run the below command:-
# mount /dev/sr0 /mnt
# lsblk4. After the CD-Drive is mounted on /mnt directory. Run the below command:-
# cp -rv /mnt/VMwareTools-10.3.23-17030940.tar.gz /tmp
# ls /tmp5. Extract the VMwareTools-10.3.23-17030940.tar.gz file in /tmp directory.
Run the below command.# cd /tmp
# tar -xvzf VMwareTools-10.3.23-17030940.tar.gz6. After extracting the file. We need to run the script under /tmp/vmware-tools-distrib
directory. Execute the command that are mentioned below:-
# cd /tmp/vmware-tools-distrib
# ./vmware-install.pl7. Check whether VMware tools are installed or not. Run the below command:-
# systemctl status vmware-tools
OR
# systemctl status open-vm-tools
# systemctl start vmware-tools
# /etc/init.d/vmware-tools status
# /etc/init.d/vmware-tools start
!!!!! Reboot the Virtual Machine by running the command > init 6 !!!!
-
-
-
-
-
Step 7. Convert the Virtual Machine to Template
After the installation of the virtual machine and VMware tools on it. We are going to convert the virtual machine to a template.
1. Go to your Vcenter server.
2. After login you can see your virtual machine under the Vmware-ESXi (host).
Right-click on the virtual machine, then go to the Template option and choose the Convert to Template.
-
-