BKNET VSICM8 M7 Deploying-Virtual-Machines
BKNET VSICM8 M7 Deploying-Virtual-Machines
BKNET VSICM8 M7 Deploying-Virtual-Machines
Virtual Machines
Importance
2
Module Lessons
3
Lesson 1: Creating Virtual Machines
Learner Objectives
5
About Provisioning Virtual Machines
You can create VMs in several ways.
6
Creating VMs with the New Virtual Machine Wizard
In the vSphere Client, you can use the New Virtual Machine wizard to
create a VM.
7
New Virtual Machine Wizard: Name, Folder, Compute
Resource
You can use the New Virtual Machine wizard in the vSphere Client to
create a VM.
The New Virtual Machine wizard prompts you for standard information:
• The VM name
• Folder in which to place the VM
• Resource on which the VM runs
8
New Virtual Machine Wizard: Name, Folder, Compute
Resource
9
New Virtual Machine Wizard: Storage, Compatibility
10
New Virtual Machine Wizard: Guest Operating System
You select the guest OS to be installed in the VM.
11
New Virtual Machine Wizard: Virtual Hardware
You can configure the virtual machine hardware. The default values for CPU,
memory and hard disk size are based on the guest OS that you selected.
12
Installing the Guest Operating System
Installing a guest operating system in your VM is similar to installing it on a
physical computer.
13
About VMware Tools
VMware Tools is a set of features that enhance the performance of a VM’s
guest operating system.
Benefits and features include:
• Device drivers • Increased graphical
– SVGA display performance
– VMXNET/VMXNET3 • Improved mouse performance
– Balloon driver for memory management • Guest OS heartbeat service
– Sync driver for quiescing I/O • Time synchronization
– Paravirtual SCSI controller • Ability to shut down the VM
remotely
14
Installing VMware Tools
Ensure that you select the latest version of VMware Tools for your guest
operating system.
To find out which VMware Tools ISO images are bundled with vSphere 8, see the
vSphere 8 Release Notes.
The method for installing VMware Tools depends on the guest operating system
type.
15
Downloading VMware Tools
You can download a specific version of VMware Tools from the VMware
Tools product download page.
17
Removing VMs
You can remove a VM in the following ways:
• Remove from the inventory:
– The VM is unregistered from the ESXi host and vCenter.
– The VM’s files remain on the disk.
– The VM can later be registered (added) to the inventory.
• Delete from disk:
– All VM files are permanently deleted from the datastore.
– The VM is unregistered from the ESXi host and vCenter.
18
Lab 12: Creating and Removing a Virtual Machine
19
Lab 13: (Simulation) Installing VMware Tools
20
Review of Learner Objectives
21
Lesson 2: Virtual Machine Hardware
Deep Dive
Learner Objectives
23
Virtual Machine Encapsulation
Each VM is stored either as a collection of
files or objects:
• Files in a directory on a VMFS or NFS
datastore
• Objects on a vSAN or vSphere Virtual
Volumes datastore
Each virtual disk is encapsulated into a
single file or object.
24
About Virtual Machine Files
A VM includes a set of related files.
25
About VM Virtual Hardware
26
Virtual Hardware Versions
The virtual hardware version, or VM compatibility level, determines the operating
system functions that a VM supports.
Do not use a later version that is not supported by the VMware product.
27
About CPU and Memory
You can add, change, or configure CPU and memory resources to improve
VM performance.
The maximum number of virtual CPUs (vCPUs) that you can assign to a
VM depends on the
following factors:
• The number of logical CPUs on the host
• The type and version of installed guest operating system
A VM running on an ESXi 8.0 host can have up to 768 vCPUs.
The maximum memory size of a VM depends on the VM’s compatibility
setting.
The maximum memory size of a VM with ESXi 8.0 compatibility running on
ESXi 8.0 is 24 TB.
28
Compute Maximums
vSphere provides compute maximums, which are available at
https://configmax.vmware.com.
30
About Thick-Provisioned Virtual Disks
Thick provisioning uses all the defined disk space at the creation of the
virtual disk, regardless of how much disk space is actually used by the
guest operating system file system.
Thick-provisioned disk types are either eager zeroed or lazy zeroed:
• In an eager-zeroed thick-provisioned disk, every block is prefilled with a
zero.
• In a lazy-zeroed thick-provisioned disk, a block is filled with zeroes
before data is written for the first time.
31
About Thick-Provisioned Virtual Disks
32
About Thin-Provisioned Virtual Disks
With thin provisioning, VMs use the disk space as needed:
• Virtual disks use only the capacity needed to hold the current files.
• The VM always sees the full allocated disk size.
Run the unmap command to reclaim the unused space from the virtual
disks.
Reporting and alerts help manage allocations and capacity.
You can mix thick and thin formats.
33
About Thin-Provisioned Virtual Disks
The following examples show efficient use of
storage:
• Provisioned space for virtual disks: 140 GB
• Available datastore capacity: 100 GB
• Used datastore capacity: 80 GB
34
Managing Datastores Containing ThinProvisioned Disk
When the total provisioned space of thin-provisioned disks is greater than
the size of the datastore, the datastore becomes overcommitted.
To actively monitor datastore capacity:
• Set alarms to send notifications about:
– Datastore disk overallocation
– VM disk use
• Use reporting to view space use.
To actively manage datastore capacity:
• Increase datastore capacity when necessary.
• Use vSphere Storage vMotion to mitigate space use problems on a
particular datastore.
35
Thick-Provisioned and Thin-Provisioned Disks
Virtual disk options differ in terms of creation time, block allocation, layout,
and zeroing out of allocated file blocks
36
About Virtual Networks
VMs and physical machines communicate through a virtual network.
When you configure networking for a VM, you select or change the
following settings:
• Network adapter type
• Port group to connect to
• Network connection state
• Whether to connect to the network when the VM powers on
37
About Virtual Networks
39
About PCI Passthrough Devices
Passthrough devices help your environment use resources efficiently and
improve performance.
You connect a VM's guest OS to PCI or PCIe passthrough devices that are
configured on an ESXi host.
40
Other Virtual Devices
A VM must have a vCPU and virtual memory. The addition of other virtual devices
makes the
VM more useful:
• CD/DVD drive: For connecting to a CD, DVD, or ISO image.
• USB 3.0 and 3.1: Supported with host-connected and client-connected devices.
• Floppy drive: For connecting a VM to a floppy drive or a floppy image.
• Generic SCSI devices: A VM can be connected to additional SCSI adapters.
• vGPUs: A VM can use GPUs on the physical host for high-computation activities.
• Precision Clock: Provides a virtual machine with access to the system time of the
primary
ESXi host.
• vTPM: Trusted Platform Module 2.0 virtual cryptoprocessor, providing hardware-based
security-related functions.
41
About the Virtual Machine Console
The VM console provides the mouse, keyboard, and screen features to control
the VM.
You can use the remote console or the Web console to connect to client devices
42
Lab 14: Adding Virtual Hardware
43
Review of Learner Objectives
44
Lesson 3: Modifying Virtual Machines
Learner Objectives
46
Modifying Virtual Machine Settings
You can modify a VM’s configuration by
editing the VM's settings:
• Add virtual hardware:
– You can add some hardware while the
VM is powered on.
• Remove virtual hardware:
– You can remove some hardware only
when the VM is powered off.
• Set VM options.
• Control a VM’s CPU and memory
resources
47
Hot-Pluggable Devices
With the hot plug option, you can add resources to a running VM.
Examples of hot-pluggable devices:
• USB controllers
• Ethernet adapters
• Hard disk devices
48
Hot-Pluggable Devices
49
Dynamically Increasing Virtual Disk Size
You can increase the size of a
virtual disk that belongs to a
powered-on VM.
• It must not have snapshots
attached.
• It might require system tools to
make the new space usable.
50
Inflating Thin-Provisioned Disks
Thin-provisioned virtual disks can be converted to a thick, eager-zeroed
format.
Choose one of the following methods to inflate a thin-provisioned disk on a
VM that is either powered on or off:
• Select the VM’s file with the .vmdk extension and select Inflate.
• Select thick-provisioned when you use vSphere Storage vMotion to
migrate the VM to a different datastore.
51
Inflating Thin-Provisioned Disks
52
Inflating Thin-Provisioned Disks
53
VM Options: General Settings
You can use the VM Options tab to modify properties such as the display
name for the VM and the type of guest operating system that is installed.
54
VM Options: VMware Tools Settings
You can use the VMware Tools controls to customize the power buttons on
the VM
55
VM Options: VM Boot Settings
Occasionally, you might need to set the VM boot options
56
Lab 15: Modifying Virtual Machines
57
Review of Learner Objectives
58
Lesson 4: Creating Templates and
Cloning VMs
Learner Objectives
60
About Templates
61
About Templates
To use templates, you must be connected to vCenter.
62
Creating a Template: Clone VM to Template
You can create templates using different methods. One method is to clone
the VM to a template. The VM can be powered on or off.
63
Creating a Template: Convert VM to Template
You can create a template by converting a VM to a template. In this case,
the VM must be powered off
64
Creating a Template: Clone a Template
You can create a template from an existing template.
65
Updating Templates
You update a template to include new patches,
add and remove virtual hardware, upgrade
VMware Tools, update the VM hardware
version, and install new applications.
To update a template:
1. Convert the template to a VM.
• VMs cannot be deployed from this template
while it is a VM.
2. Place the VM on an isolated network to
prevent user access.
3. Make appropriate changes to the VM.
4. Convert the VM to a template.
66
Deploying VMs from a Template
To deploy a VM, you must provide information such as the VM name, inventory
location, host, datastore, and guest operating system customization data.
67
Cloning Virtual Machines
Cloning a VM creates a VM that is an exact copy of the original:
• Cloning is an alternative to deploying a VM from a template.
• The source VM can be powered on or off.
68
Guest Operating System Customization
When you deploy a VM from a template or clone a VM, you can customize
some aspects of the guest operating system.
By customizing a guest operating system, you can change information,
including the following details:
• Computer name
• Network settings
• License settings
• Time zone
• Administrator or root password
• Windows Security Identifier
69
About Customization Specifications
70
Customizing the Guest Operating System
When cloning a VM or deploying a VM from a template, you can use a
customization specification to prepare the guest operating system.
71
Lab 16: Creating Templates and Deploying VMs
72
Review of Learner Objectives
73
Lesson 5: Introduction to Content
Libraries
Learner Objectives
75
About Content Libraries
Content libraries are repositories of OVF templates and other file types that can
be shared and synchronized across vCenter systems globally.
76
Benefits of Content Libraries
Storage efficiency and consistency are key reasons to install and use a
content library.
Using content libraries, administrators can perform the following functions:
• Store and share content, such as templates, ISO images, scripts.
• Perform distributed file management.
• Synchronize content libraries across sites and vCenter instances.
• Mount an ISO file directly from a content library.
• Maintain versions of VM templates
77
Benefits of Content Libraries
Content libraries are stored on vSphere datastores.
78
Content Library Types
Content is stored in one of the content library types:
• Local: Content that is controlled by the administrator
• Published: A local library that is available for subscription
• Subscribed: A library that synchronizes with a published library
Administrators can change content in a local or published content library.
Users cannot change content in a subscribed content library.
A subscribed content library cannot be published.
79
Content Library Interface
To create and manage your content libraries, from the main menu, select
Content Libraries.
80
Creating a Local Content Library
When you create a content library, you select the content library type, for
example, Local content library.
81
Populating the Content Library with Templates
You can populate the content library with the following template types:
VM Templates:
• Can be stored on any datastore type, except NFS
• Stored in the default disk format of the datastore (for example, thick-
provisioned eagerzeroed)
• Are associated with a host
• Appear in the vCenter inventory
82
Populating the Content Library with Templates
OVF Templates:
• Must be stored on the datastore (of any type) that is associated with the
content library
• Stored in thin-provisioned format
• Are not associated with a host
• Do not appear in the vCenter inventory
83
Adding VM or OVF Templates to a Content Library
When you clone a virtual machine into a template in a content library, you
can select whether to create a VM template or an OVF template.
84
Adding OVF Templates to a Content Library
When you clone a template from the vCenter inventory into a template in a
content library, the template is stored as an OVF template in the library.
85
Viewing Content Library Items
The content in the content library is divided into categories:
Templates:
• VM templates
• OVF templates
Other Types:
• All other file types, such as ISO images
86
Deploying VMs from a Content Library
You can deploy VMs from templates in a content library by using the New
Virtual Machine wizard.
87
Lab 17: Using Local Content Libraries
88
Review of Learner Objectives
89
Lesson 6: Subscribing to Content
Libraries
Learner Objectives
91
Content Libraries: Local, Published, and Subscribed
You can publish a local content library so that other libraries can subscribe
and download a copy of the data.
After synchronization, both published and subscribed libraries contain the
same items, or the subscribed library contains the metadata for the items.
92
Publishing a Content Library
You can enable publishing on a local content library by editing its settings.
You can add password protection to the library.
Subscribed libraries use the subscription URL to access the published library.
93
Subscribing to a Content Library
94