0% found this document useful (0 votes)
49 views31 pages

VSphere ICM 8 Lab 17

This document outlines a lab exercise for creating templates and deploying virtual machines using VMware vSphere 8.0. It includes objectives such as creating a local content library, OVF and VM templates, and deploying VMs from these templates. The lab emphasizes the benefits of content libraries for consistency, efficiency, scalability, and automation in VM management.

Uploaded by

edu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
49 views31 pages

VSphere ICM 8 Lab 17

This document outlines a lab exercise for creating templates and deploying virtual machines using VMware vSphere 8.0. It includes objectives such as creating a local content library, OVF and VM templates, and deploying VMs from these templates. The lab emphasizes the benefits of content libraries for consistency, efficiency, scalability, and automation in VM management.

Uploaded by

edu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 31

VMWARE VSPHERE 8.

0
INSTALL, CONFIGURE, MANAGE

Lab 17: Creating Templates and Deploying VMs

Document Version: 2023-03-08

Copyright © 2023 Network Development Group, Inc.


www.netdevgroup.com

NETLAB+ is a registered trademark of Network Development Group, Inc.

VMware is a registered trademark of VMware, Inc.


121BLab 17: Creating Templates and Deploying VMs

Contents
Introduction .............................................................................................................................................. 3
Objectives ................................................................................................................................................. 3
Lab Topology ............................................................................................................................................. 4
Lab Settings ............................................................................................................................................... 5
1 Prepare the Lab Environment ........................................................................................................... 6
2 Create a Local Content Library ........................................................................................................ 11
3 Create a OVF Template in the Content Library................................................................................ 15
4 Create a Virtual Machine Template in the Content Library ............................................................. 18
5 View the Content Library Templates ............................................................................................... 22
6 Deploy a Virtual Machine from a Template in the Content Library ................................................. 24
7 Delete a Content Library ................................................................................................................. 30

3/13/2023 Copyright © 2023 Network Development Group, Inc. www.netdevgroup.com Page 2


121BLab 17: Creating Templates and Deploying VMs

Introduction

In this lab, you will create a local content library to clone and deploy Virtual Machines (VMs).

A content library in VMware is a central location for storing and managing VM templates, vApps, ISO
images, and scripts. It allows administrators to create, store, and distribute VM templates and other
files across vCenter Server instances and other vCenter Server-enabled infrastructure. It also enables
the creation of multiple libraries and subscriptions to libraries, making it easy to share files between
different teams and locations.

Content libraries can be used to automate the deployment of VMs, as well as to keep VM templates
up-to-date and consistent across an organization. Additionally, it allows for version control, allowing
administrators to roll back to a previous version of a template or other file if needed. It also can be
used to replicate the content library to a remote site for disaster recovery.

Objectives

• Create a Local Content Library


• Create an OVF Template in the Content Library
• Create a VM Template in a Content Library
• View the Content Library Templates
• Deploy a VM from a Template in the Content Library
• Delete a Content Library

3/13/2023 Copyright © 2023 Network Development Group, Inc. www.netdevgroup.com Page 3


121BLab 17: Creating Templates and Deploying VMs

Lab Topology

3/13/2023 Copyright © 2023 Network Development Group, Inc. www.netdevgroup.com Page 4


121BLab 17: Creating Templates and Deploying VMs

Lab Settings

The information in the table below will be needed to complete the lab. The task sections further below
provide details on the use of this information.

Virtual Machine IP Address Account Password

sa-student eth0: 172.20.10.80 sysadmin NDGlabpass123!

sa-vcsa eth0: 172.20.10.94 [email protected] NDGlabpass123!

sa-esxi-01 eth0: 172.20.10.51 root NDGlabpass123!

sa-esxi-02 eth0: 172.20.10.52 root NDGlabpass123!

sa-aio eth0: 172.20.10.10 sysadmin NDGlabpass123!

3/13/2023 Copyright © 2023 Network Development Group, Inc. www.netdevgroup.com Page 5


121BLab 17: Creating Templates and Deploying VMs

1 Prepare the Lab Environment

In this task, you will increase the size of the iSCSI Datastore and recreate the Lab-Templates folder.

1. Launch the sa-student VM to access the graphical login screen.

To launch the console window for a VM, either click on the machine’s
graphic image from the topology page, or click on the machine’s
respective tab from the Navigator.

2. Launch the Mozilla Firefox web browser by either clicking on the icon found in the bottom toolbar
or by navigating to Start Menu > Internet > Firefox Web Browser.

3. In Firefox, click LAUNCH VSPHERE CLIENT.

3/13/2023 Copyright © 2023 Network Development Group, Inc. www.netdevgroup.com Page 6


121BLab 17: Creating Templates and Deploying VMs

If the VMware Getting Started webpage does not load, please wait an
additional 3 - 5 minutes, and refresh the page to continue. This is
because the vCenter Server Appliance is still booting up and requires
extra time to initialize.

4. To log in to the vCenter Server Appliance, enter [email protected] as the username and
NDGlabpass123! as the password. Click LOGIN.

You may ignore the “browser-OS combination” warning message


presented on the VMware vCenter Single Sign-On page and continue
moving forward with the lab.

5. In the Navigator, on the Hosts and Clusters tab, select sa-vcsa.vclass.local. In the right pane, select
Datastores and right-click iSCSI-Datastore. In the Actions pull-down menu, click Increase Datastore
Capacity….

3/13/2023 Copyright © 2023 Network Development Group, Inc. www.netdevgroup.com Page 7


121BLab 17: Creating Templates and Deploying VMs

6. In the Increase Datastore Capacity window on the Select Device step, select LUN 3 and click NEXT.

7. On the Specify Configuration step, leave the defaults, and click NEXT.

8. On the Ready to Complete step, review the information, and click FINISH.

3/13/2023 Copyright © 2023 Network Development Group, Inc. www.netdevgroup.com Page 8


121BLab 17: Creating Templates and Deploying VMs

9. Repeat steps 5 – 8, and expand the iSCI-Datastore using LUN 4 and Lun 2. For Lun 2, you will only
increase the size by 10 GB for lab purposes.

10. Ensure you are still viewing the Datastores tab. Verify that the iSCSI-Datastore is showing a
capacity of 59 GB and at least 32 GB of free space.

11. In the Recent Tasks pane, verify that the iSCSI-Datastore tasks have successfully completed.

12. In the Navigator, select the VMs and Templates tab, and expand sa-vcsa.vclass.local. Right-click
ICM-Datacenter, and select New Folder > New VM and Template Folder.

3/13/2023 Copyright © 2023 Network Development Group, Inc. www.netdevgroup.com Page 9


121BLab 17: Creating Templates and Deploying VMs

13. In the New Folder window, enter Lab-Templates for the folder name, and click OK.

14. Leave the vSphere Client open, and continue to the next task.

3/13/2023 Copyright © 2023 Network Development Group, Inc. www.netdevgroup.com Page 10


121BLab 17: Creating Templates and Deploying VMs

2 Create a Local Content Library

In this task, you will create a local content library on sa-vcsa-01.vclass.local. Content libraries are used
to store templates and deploy VMs in the vCenter inventory.

There are several benefits to creating a content library from the vSphere Client:

• Consistency: By creating a central location for storing and managing VM templates, vApps, ISO
images, and scripts, you can ensure that all VMs deployed from it will have the same
configuration, such as installed software, network settings, and security settings, which can
help to maintain a consistent and predictable environment.
• Efficiency: Deploying VMs from a content library can save time and effort compared to
manually configuring each VM. This can be particularly useful in large-scale deployments or
when creating many similar VMs.
• Scalability: Content libraries can be used to deploy new VMs quickly and easily as needed,
which can be useful in environments where the number of VMs is expected to grow over time.
• Automation: Content libraries can be used in conjunction with automation tools, such as
vCenter Orchestrator, to automate the deployment of VMs, which can help reduce human error
and increase efficiency.
• Version control: Content libraries can be version controlled, which allows for easy rollback to a
previous version in case of issues with the new version.
• Sharing: Content libraries enable the creation of multiple libraries and subscriptions to libraries,
making it easy to share files between different teams and locations.
• DR: Content libraries can be replicated to a remote site for disaster recovery.

Creating a content library from the vSphere Client allows administrators to easily store, manage, and
distribute VM templates and other files across their infrastructure, improving consistency, scalability,
and efficiency, while also providing a central location for version control and automation.

1. From the main menu, select Content Libraries.

2. In the Content Libraries main workspace, click on the CREATE icon.

3/13/2023 Copyright © 2023 Network Development Group, Inc. www.netdevgroup.com Page 11


121BLab 17: Creating Templates and Deploying VMs

3. In the New Content Library window, on the Name and location step, enter SA-Local-Library for the
name and verify that sa-vcsa.vclass.local is the vCenter Server listed. Click NEXT.

4. On the Configure content library step, verify that the Local content library is selected. Click NEXT.

3/13/2023 Copyright © 2023 Network Development Group, Inc. www.netdevgroup.com Page 12


121BLab 17: Creating Templates and Deploying VMs

5. On the Apply security policy step, click NEXT.

6. On the Add storage step, choose iSCSI-Datastore and click NEXT.

3/13/2023 Copyright © 2023 Network Development Group, Inc. www.netdevgroup.com Page 13


121BLab 17: Creating Templates and Deploying VMs

7. On the Ready to complete step, review the information, and click FINISH.

8. Leave the vSphere Client open, and continue to the next task.

3/13/2023 Copyright © 2023 Network Development Group, Inc. www.netdevgroup.com Page 14


121BLab 17: Creating Templates and Deploying VMs

3 Create a OVF Template in the Content Library

In this task, you will create an OVF template in the content library by cloning a VM template located in
the vCenter inventory to a template in the content library. You will use content library templates to
provision VMs on a cluster or host.

Creating an OVF template in a content library can be beneficial in a virtualized environment as it allows
for easy sharing and distribution of VMs, ensuring consistency in configuration and settings across
multiple deployments. It also allows for efficient management of VMs, including version control and
the ability to roll back to previous versions if necessary. Additionally, using a content library enables
automation of VM deployment through integration that will further reduce the potential for human
error and increase efficiency.

1. From the main menu, select Inventory.

2. In the Navigator, select the VMs and Templates tab. Expand sa-vcsa.vclass.local and ICM-
Datacenter.

3/13/2023 Copyright © 2023 Network Development Group, Inc. www.netdevgroup.com Page 15


121BLab 17: Creating Templates and Deploying VMs

3. Convert the Linux-Template VM to a template.

a. Right-click LinuxGUI-01 and navigate to Template > Convert to Template. The icon
indicates that Linux-Template is a VM.

b. In the Confirm Convert window, click YES.

c. In the Navigator, verify that the icon for LinuxGUI-01 has changed. The icon indicates
that Linux-Template is a template.

3/13/2023 Copyright © 2023 Network Development Group, Inc. www.netdevgroup.com Page 16


121BLab 17: Creating Templates and Deploying VMs

4. Right-click on LinuxGUI-01 and select Clone to Library.

5. In Clone to Template in Library window, select SA-Local-Library. Enter Linux-OVF-LibTemplate for the
Template name. Click OK.

6. Leave the vSphere Client open, and continue to the next task.

3/13/2023 Copyright © 2023 Network Development Group, Inc. www.netdevgroup.com Page 17


121BLab 17: Creating Templates and Deploying VMs

4 Create a Virtual Machine Template in the Content Library

In this task, you will create a VM template in the content library by cloning a VM to a template in the
library. During the process, you can choose what type of template to create: VM template or OVF
template. You will choose VM template.

1. On the VMs and Templates tab, right-click on LinuxGUI-02. Navigate to Clone > Clone as Template
to Library.

2. In the LinuxGUI-02 – Clone Virtual Machine To Template window, Basic information step, enter
Linux-LibTemplate for the Name. Expand ICM-Datacenter and select Lab-Templates. Click NEXT.

3/13/2023 Copyright © 2023 Network Development Group, Inc. www.netdevgroup.com Page 18


121BLab 17: Creating Templates and Deploying VMs

3. On the Location step, select SA-Local-Library. Click NEXT.

4. On the Select a compute resource step, select sa-esxi-02.vclass.local. Click NEXT.

3/13/2023 Copyright © 2023 Network Development Group, Inc. www.netdevgroup.com Page 19


121BLab 17: Creating Templates and Deploying VMs

5. On the Storage step, select iSCSI-Datastore and click NEXT.

6. On the Ready to complete step, review the information, and click FINISH.

3/13/2023 Copyright © 2023 Network Development Group, Inc. www.netdevgroup.com Page 20


121BLab 17: Creating Templates and Deploying VMs

7. In the Recent Tasks pane, monitor the Clone task. Verify that the task has completed before
continuing. The clone will take 2 - 4 minutes to complete.

8. Leave the vSphere Client open, and continue with the next task.

3/13/2023 Copyright © 2023 Network Development Group, Inc. www.netdevgroup.com Page 21


121BLab 17: Creating Templates and Deploying VMs

5 View the Content Library Templates

In this task, you will view the VM template and OVF template in SA-Local-Library. You also view the VM
template in the vCenter inventory.

Viewing content library templates is important because it allows users to access pre-designed and pre-
formatted content that can save time and effort in creating new content. These templates are typically
created by experts in a specific field or domain, and can serve as a starting point for creating new
content, ensuring consistency, and quality across different materials. Additionally, using templates can
help reduce the risk of errors and improve efficiency, as users can simply customize the existing
content to meet their specific needs, rather than starting from scratch. Overall, content library
templates are a valuable resource for creating high-quality content quickly and easily.

1. From the main menu, select Content Libraries.

2. In the Content Libraries pane, click SA-Local-Library.

3. In the SA-Local-Library pane, Templates tab, verify that Linux-LibTemplate appears in the list.

3/13/2023 Copyright © 2023 Network Development Group, Inc. www.netdevgroup.com Page 22


121BLab 17: Creating Templates and Deploying VMs

4. Click OVF & OVA Templates and verify that Linux-OVF-LibTemplate appears in the list.

The Linux-OVF-LibTemplate appears because you cloned a VM template


instead of cloning a VM. When you clone a VM template to a template in the
content library, the library template is an OVF template.

5. From the main menu, select Inventory.

6. On the VMs and Templates tab, expand the Lab-Templates folder.

Linux-LibTemplate is a VM template. VM templates appear in the vCenter


inventory, whereas OVF templates do not.

7. Leave the vSphere Client open, and continue to the next task.

3/13/2023 Copyright © 2023 Network Development Group, Inc. www.netdevgroup.com Page 23


121BLab 17: Creating Templates and Deploying VMs

6 Deploy a Virtual Machine from a Template in the Content Library

You will use the Linux-OVF-LibTemplate, located in the content library, to deploy a VM to a host in your
vCenter inventory.

Deploying a VM from a template in a content library can save time and ensure consistency in the
configuration of VMs. By using a template, the VM will be created with a pre-configured operating
system, software, and settings, which can help reduce the time required to set up and configure new
VMs. Additionally, using a template ensures that all VMs are configured in the same way, which can
help reduce errors and improve the overall consistency of the virtual environment.

1. In the Navigator, right-click on ICM-Datacenter and select New Virtual Machine.

2. In the New Virtual Machine window, Select a creation type step, select Deploy from template. Click
NEXT.

3/13/2023 Copyright © 2023 Network Development Group, Inc. www.netdevgroup.com Page 24


121BLab 17: Creating Templates and Deploying VMs

3. On the Select a template step, click Linux-OVF-LibTemplate. Click NEXT.

4. On the Select a name and folder step, enter Linux-13 for the VM name. Select ICM-Datacenter for
the location. Click NEXT.

3/13/2023 Copyright © 2023 Network Development Group, Inc. www.netdevgroup.com Page 25


121BLab 17: Creating Templates and Deploying VMs

5. On the Select a compute resource step, select sa-esxi-02.vclass.local and click NEXT.

6. On the Review details step, verify the template details, and click NEXT.

3/13/2023 Copyright © 2023 Network Development Group, Inc. www.netdevgroup.com Page 26


121BLab 17: Creating Templates and Deploying VMs

7. On the Select storage step, click iSCSI-Datastore. From the Select virtual disk format drop-down list,
select Thin Provision. Click NEXT.

8. On the Select networks step, leave VM Network selected in the Destination Network drop-down
list. Click NEXT.

3/13/2023 Copyright © 2023 Network Development Group, Inc. www.netdevgroup.com Page 27


121BLab 17: Creating Templates and Deploying VMs

9. On the Ready to complete step, review the information, and click FINISH.

10. In the Recent Tasks pane, monitor the progress of the template deployment task, and wait for it to
complete.

3/13/2023 Copyright © 2023 Network Development Group, Inc. www.netdevgroup.com Page 28


121BLab 17: Creating Templates and Deploying VMs

11. In the Navigator, verify that Linux-13 appears under ICM-Datacenter.

12. Leave vSphere Client open, and continue with the next task.

3/13/2023 Copyright © 2023 Network Development Group, Inc. www.netdevgroup.com Page 29


121BLab 17: Creating Templates and Deploying VMs

7 Delete a Content Library

In this task, you will delete a content library that is no longer required.

There are a few reasons why you might delete a content library:

• Storage space: If the content library is no longer needed or if it is taking up too much storage
space, it may be deleted to free up space.
• Security: If the content library contains sensitive information that is no longer needed or that
could pose a security risk if it were to fall into the wrong hands, it may be deleted for security
reasons.
• Maintenance: If the content library is outdated or is causing issues with the virtual
environment, it may be deleted to improve the performance and stability of the environment.
• Compliance: If the content library is no longer compliant with regulations or industry standards,
it may need to be deleted to ensure compliance.

It is important to note that when you delete a content library, all the templates, ISO, and other files in
it will be deleted permanently. So you should be sure that you don't need those files anymore before
deleting the library.

1. From the main menu, select Content Libraries.

2. Right-click the SA-Local-Library in the Navigator, and select Delete.

3/13/2023 Copyright © 2023 Network Development Group, Inc. www.netdevgroup.com Page 30


121BLab 17: Creating Templates and Deploying VMs

3. In the Delete Content Library confirmation dialog box, click YES.

4. The lab is now complete; you may end the reservation.

3/13/2023 Copyright © 2023 Network Development Group, Inc. www.netdevgroup.com Page 31

You might also like