vi3 ic rev b - 06 virtual machines
TRANSCRIPT
-
8/6/2019 VI3 IC REV B - 06 Virtual Machines
1/38
6-1VMware Infrastructure 3: Install and Configure Rev BCopyright 2006 VMware, Inc. All rights reserved.
Virtual Machine
Creation and Management
Module 6
-
8/6/2019 VI3 IC REV B - 06 Virtual Machines
2/38
6-2VMware Infrastructure 3: Install and Configure Rev BCopyright 2006 VMware, Inc. All rights reserved.
You are here
Virtual Machines
VM Resource Management
VM Access Control
VM Creation & Management
Virtual Infrastructure
VirtualCenter Installation
Operations
Networking
ESX Server Installation
Virtual Infrastructure Overview
Troubleshooting Tips
Data & Availability Protection
VM Resource Monitoring
Storage
-
8/6/2019 VI3 IC REV B - 06 Virtual Machines
3/38
6-3VMware Infrastructure 3: Install and Configure Rev BCopyright 2006 VMware, Inc. All rights reserved.
Importance and module objectives
Importance The most efficient way to use ESX Server is to create a base image
VM. Once you have a base image VM, you can create a templateand deploy additional VMs from the template. This saves time andprevents mistakes.
Objectives for the learner
Create a VM
Modify a VM
Create a template
Deploy a VM from a template
-
8/6/2019 VI3 IC REV B - 06 Virtual Machines
4/38
6-4VMware Infrastructure 3: Install and Configure Rev BCopyright 2006 VMware, Inc. All rights reserved.
Module lessons
Lesson 1: Create a VM
Lesson 2: Create Multiple VMs
Lesson 3: Manage VMs
-
8/6/2019 VI3 IC REV B - 06 Virtual Machines
5/38
6-5VMware Infrastructure 3: Install and Configure Rev BCopyright 2006 VMware, Inc. All rights reserved.
Lesson 1:
Create a VM
-
8/6/2019 VI3 IC REV B - 06 Virtual Machines
6/38
6-6VMware Infrastructure 3: Install and Configure Rev BCopyright 2006 VMware, Inc. All rights reserved.
Lesson topics
VM virtual hardware
Create a VM
Installing a guest OS into a VM
VMware Tools
-
8/6/2019 VI3 IC REV B - 06 Virtual Machines
7/38
6-7VMware Infrastructure 3: Install and Configure Rev BCopyright 2006 VMware, Inc. All rights reserved.
What is a virtual machine (VM)?
Set of virtual hardware onwhich a supported guestOS and its applicationsrun
A set of discrete files
A VMs configuration filedescribes the VMsconfiguration, including itsvirtual hardware
Avoid using specialcharacters and spaces inVMs display name
Virtual Machine
guestOS = winnetstandarddisplayName = MyVM(etc.)
MyVM.vmx
-
8/6/2019 VI3 IC REV B - 06 Virtual Machines
8/38
6-8VMware Infrastructure 3: Install and Configure Rev BCopyright 2006 VMware, Inc. All rights reserved.
VM virtual hardware
Upto 2 CD-ROMs
Upto 3 ports Upto 4 ports
1-4 adapters
1-4 adapters;1-15 devices each
Upto 16GB RAM
1-2 drives
VM Chipset1 CPU (2 or4 CPUswith VMware SMP)
-
8/6/2019 VI3 IC REV B - 06 Virtual Machines
9/38
6-9VMware Infrastructure 3: Install and Configure Rev BCopyright 2006 VMware, Inc. All rights reserved.
CPU and memory
1, 2 or 4 virtual CPUs (VCPUs)
Virtual SMP license requiredfor 2- and 4-VCPU VMs
Use 2-VCPU VMs on physicalmachines with more than 2
physical CPUs
Use 4-VCPU VMs on physicalmachines with more than 4physical CPUs
Specify maximum memory size
(up to 16GB) Amount the guest OS will be
told it has
Virtual Machine
-
8/6/2019 VI3 IC REV B - 06 Virtual Machines
10/38
6-10VMware Infrastructure 3: Install and Configure Rev BCopyright 2006 VMware, Inc. All rights reserved.
Virtual disk
Local
Virtual Machine
Parameter Sample value
Virtual disk size 4 GB
Datastore MyVMFS
Virtual disk node 0:0
Virtual disk mode Snapshots allowed
Virtual storage adapter LSILogic (or BusLogic)
Virtual disk file name Defaults to name of virtual machine, followed by .vmdk
-
8/6/2019 VI3 IC REV B - 06 Virtual Machines
11/38
6-11VMware Infrastructure 3: Install and Configure Rev BCopyright 2006 VMware, Inc. All rights reserved.
SnapshotManager
Virtual disk modes
Disk modes: Snapshots allowed (default)
Independent
Persistent
Non-persistent
Disk modes set per virtual disk
Snapshots
Useful when you need to revert repeatedly tothe same state, without creating new VMs
Useful in test/dev, training scenarios
Main use in ESX Server is for doing backups
Snapshot manager manages your snapshots
-
8/6/2019 VI3 IC REV B - 06 Virtual Machines
12/38
6-12VMware Infrastructure 3: Install and Configure Rev BCopyright 2006 VMware, Inc. All rights reserved.
Create a VMOther devices
Network adaptervlance
Connect to virtual switch
CD-ROM drive
Connect to CD-ROM or
ISO image
Floppy drive
Connect to floppy orfloppy image
Generic SCSI devices
(such as tape libraries) May be connected to
additional SCSI adapters
Virtual Machine
-
8/6/2019 VI3 IC REV B - 06 Virtual Machines
13/38
6-13VMware Infrastructure 3: Install and Configure Rev BCopyright 2006 VMware, Inc. All rights reserved.
Virtual Machine (VM) console
VM Console allows you to:
Send power changes to your VM
Access the VMs guest OS
Send Ctrl+Alt+Del to the guest OS
-
8/6/2019 VI3 IC REV B - 06 Virtual Machines
14/38
6-14VMware Infrastructure 3: Install and Configure Rev BCopyright 2006 VMware, Inc. All rights reserved.
Install guest OS into VM
Install from ISOimage (mounted on virtualCD-ROM drive) to virtual disk
Local
VM Console
-
8/6/2019 VI3 IC REV B - 06 Virtual Machines
15/38
6-15VMware Infrastructure 3: Install and Configure Rev BCopyright 2006 VMware, Inc. All rights reserved.
What are the VMware tools?
Device drivers for
Virtual video card
Mouse
Optimized SCSI driver
Memory management
Hardware acceleration formouse
Support for quiescing afilesystem
Used by VMware Consolidated
Backup VMware Tools installs into
guest OS like an applicationVMware Tools
VMware SVGA IIVMware Pointing Device
VMware SCSI Drivervmmemctl
VM Console
-
8/6/2019 VI3 IC REV B - 06 Virtual Machines
16/38
6-16VMware Infrastructure 3: Install and Configure Rev BCopyright 2006 VMware, Inc. All rights reserved.
VMware tools configurable features
Time synchronization between
guest and Service Console
Manage scripts to be runinside the guest OS
-
8/6/2019 VI3 IC REV B - 06 Virtual Machines
17/38
6-17VMware Infrastructure 3: Install and Configure Rev BCopyright 2006 VMware, Inc. All rights reserved.
Lab for lesson 1
Create a Virtual Machine Using VirtualCenter
In this lab, you will perform the following tasks:
Create a virtual machine
Install a guest OS into a virtual machine
Install VMware Tools into the guest OSVerify network connectivity from your virtual machine
-
8/6/2019 VI3 IC REV B - 06 Virtual Machines
18/38
6-18VMware Infrastructure 3: Install and Configure Rev BCopyright 2006 VMware, Inc. All rights reserved.
Lesson summary
A VM can be configured with up to 4 virtual CPUs and 16GB of memory
By default, snapshots are allowed on virtual disks
It is a best practice to install VMware Tools in every
virtual machine
-
8/6/2019 VI3 IC REV B - 06 Virtual Machines
19/38
6-19VMware Infrastructure 3: Install and Configure Rev BCopyright 2006 VMware, Inc. All rights reserved.
Lesson 2:Create Multiple VMs
-
8/6/2019 VI3 IC REV B - 06 Virtual Machines
20/38
6-20VMware Infrastructure 3: Install and Configure Rev BCopyright 2006 VMware, Inc. All rights reserved.
Lesson topics
Templates
Creating and deploying VMs from a template
Cloning a VM
Customizing a guest OS
-
8/6/2019 VI3 IC REV B - 06 Virtual Machines
21/38
6-21VMware Infrastructure 3: Install and Configure Rev BCopyright 2006 VMware, Inc. All rights reserved.
What is a template?
Used to createcommonly-deployedVMs
A virtual machine thatis marked as never tobe powered on
Templates virtual diskfiles are stored in eithermonolithic or sparse fileformat
Can be stored in a
VMFS, NFS orservice consolefilesystem
-
8/6/2019 VI3 IC REV B - 06 Virtual Machines
22/38
6-22VMware Infrastructure 3: Install and Configure Rev BCopyright 2006 VMware, Inc. All rights reserved.
Create a template
Two methods:
Clone to Template
Convert to Template
Choose Clone to
Template if the originalVM is still needed
-
8/6/2019 VI3 IC REV B - 06 Virtual Machines
23/38
6-23VMware Infrastructure 3: Install and Configure Rev BCopyright 2006 VMware, Inc. All rights reserved.
Update a template
Use the Convert toVirtual Machine task
Place VM on isolatednetwork to prevent user
access Make changes
Convert VM back totemplate
-
8/6/2019 VI3 IC REV B - 06 Virtual Machines
24/38
6-24VMware Infrastructure 3: Install and Configure Rev BCopyright 2006 VMware, Inc. All rights reserved.
View templates
View templates from the
Virtual Machines &Templates view
Or from the Hosts &
Clusters view, VirtualMachines tab
-
8/6/2019 VI3 IC REV B - 06 Virtual Machines
25/38
6-25VMware Infrastructure 3: Install and Configure Rev BCopyright 2006 VMware, Inc. All rights reserved.
Deploy VM from template
Name the virtual machine and place into inventory
-
8/6/2019 VI3 IC REV B - 06 Virtual Machines
26/38
6-26VMware Infrastructure 3: Install and Configure Rev BCopyright 2006 VMware, Inc. All rights reserved.
Clone a VM
An alternate method ofdeploying a VM
Exact copy of VM
Customization of a clones
guest OS is recommendedto prevent software andnetwork conflicts
-
8/6/2019 VI3 IC REV B - 06 Virtual Machines
27/38
6-27VMware Infrastructure 3: Install and Configure Rev BCopyright 2006 VMware, Inc. All rights reserved.
Guest OS customization
VirtualCenter can apply unique system information to a VM
when it is cloned or deployed from template
For guest OS customization to work, it must be enabled inVirtualCenter
To enable for Windows VMs, install sysprep files on VirtualCenter Server
Already enabled for Linux VMs (Open Source components are installed onthe VirtualCenter Server)
-
8/6/2019 VI3 IC REV B - 06 Virtual Machines
28/38
6-28VMware Infrastructure 3: Install and Configure Rev BCopyright 2006 VMware, Inc. All rights reserved.
Lab for lesson 2
Template Provisioning
In this lab, you will perform the following tasks:
Configure guest OS customization on the VirtualCenter Server
Convert a virtual machine to a template
Convert a template back to a virtual machine
Clone a virtual machine to a template
Deploy a virtual machine from a template
-
8/6/2019 VI3 IC REV B - 06 Virtual Machines
29/38
6-29VMware Infrastructure 3: Install and Configure Rev BCopyright 2006 VMware, Inc. All rights reserved.
Lesson summary
A template can be stored on disk in either monolithic orsparse file format
A template can be converted back to a VM; this is usefulif you need to update your template with new software
When you clone a VM or deploy a VM from a template,VirtualCenter can automatically customize the guest OSfor you
-
8/6/2019 VI3 IC REV B - 06 Virtual Machines
30/38
6-30VMware Infrastructure 3: Install and Configure Rev BCopyright 2006 VMware, Inc. All rights reserved.
Lesson 3:Manage VMs
-
8/6/2019 VI3 IC REV B - 06 Virtual Machines
31/38
6-31VMware Infrastructure 3: Install and Configure Rev BCopyright 2006 VMware, Inc. All rights reserved.
Lesson topics
Move VM to a different ESX Server
Modify a VMs configuration
-
8/6/2019 VI3 IC REV B - 06 Virtual Machines
32/38
6-32VMware Infrastructure 3: Install and Configure Rev BCopyright 2006 VMware, Inc. All rights reserved.
Move VM between ESX servers: cold migration
A cold migration moves a VM that is powered off
May or may not involve movement of virtual disk
Perform a cold migration when
Moving VM to an ESX Server with a local (non-shared) datastore
Moving VMs between ESX Servers using different CPU families
Virtual diskis notmoved Virtual diskis moved
-
8/6/2019 VI3 IC REV B - 06 Virtual Machines
33/38
6-33VMware Infrastructure 3: Install and Configure Rev BCopyright 2006 VMware, Inc. All rights reserved.
Modify a VM
Most devices must beadded while the VM ispowered off
Floppies and CDscan be mounted or
unmounted whileVM is on
Network connectioncan be changed whileVM is on Hard disk is the only
hot-pluggable device
Unavailable means VM
must be powered off for
device to be added
-
8/6/2019 VI3 IC REV B - 06 Virtual Machines
34/38
6-34VMware Infrastructure 3: Install and Configure Rev BCopyright 2006 VMware, Inc. All rights reserved.
Example 1: add raw LUN access to VM
Why use a raw LUN with a VM?
To allow VM clusteringacrossboxes, or physical-to-virtual
To enable use of SAN managementsoftware inside guest OS
Can be added while VM is
powered on
A VM can access a raw SANLUN using an RDM(Raw Device Mapping)
An RDM allows a special file in a
VMFS volume to act as a proxyfor a raw device
An RDM allows a raw LUNto use snapshots
-
8/6/2019 VI3 IC REV B - 06 Virtual Machines
35/38
6-35VMware Infrastructure 3: Install and Configure Rev BCopyright 2006 VMware, Inc. All rights reserved.
Example 2: add a virtual NIC to VM
Why add an additionalNIC?
To allow a VM to accessmultiple networks
To create a firewall
environment
Must be added whileVM is powered off
-
8/6/2019 VI3 IC REV B - 06 Virtual Machines
36/38
6-36VMware Infrastructure 3: Install and Configure Rev BCopyright 2006 VMware, Inc. All rights reserved.
Labs for lesson 3
1. Create a Firewalled Virtual Machine Environment
In this lab, you will perform the following tasks: Create a Linux virtual machine that functions as a NAT Router
Configure an existing virtual machine as a NAT Client that uses the NATRouter to access the external network
2. (OPTIONAL) Allow Virtual Machine Access to a Raw LUN
In this lab, you will perform the following tasks: Add a raw LUN to a virtual machines configuration
Verify that the virtual machine can access its new LUN
3. (OPTIONAL) Using VLANs
In this lab, you will perform the following tasks:
Add two port groups (VLANs) to the internal virtual switch Create a second NAT Router virtual machine
Configure the original NAT Client/NAT Router pair to use one VLAN, and asecond NAT Client/NAT Router pair to use the other VLAN
Verify NAT routing works for both pairs of virtual machines
-
8/6/2019 VI3 IC REV B - 06 Virtual Machines
37/38
6-37VMware Infrastructure 3: Install and Configure Rev BCopyright 2006 VMware, Inc. All rights reserved.
Module summary
A VM snapshot is useful when you need to revertrepeatedly to the same state, without creating new VMs
VirtualCenter allows automatic guest OS customizationwhen cloning a VM or deploying a VM from a template
It is possible to add a hard disk to your VM while the VMis up and running
-
8/6/2019 VI3 IC REV B - 06 Virtual Machines
38/38
6-38VMware Infrastructure 3: Install and Configure Rev BCopyright 2006 VMware, Inc. All rights reserved.
Questions?