© 2010 VMware Inc. All rights reserved Virtual Machines Module 7.

83
© 2010 VMware Inc. All rights reserved Virtual Machines Module 7

Transcript of © 2010 VMware Inc. All rights reserved Virtual Machines Module 7.

Page 1: © 2010 VMware Inc. All rights reserved Virtual Machines Module 7.

© 2010 VMware Inc. All rights reserved

Virtual Machines

Module 7

Page 2: © 2010 VMware Inc. All rights reserved Virtual Machines Module 7.

Module 7-2

© 2010 VMware Inc. All rights reserved

You Are Here

vSphere Environment

Virtual Machines

Introduction to VMware Virtualization

VMware ESX and ESXi

VMware vCenter Server

Networking

Storage

Operations

Access Control

Resource Monitoring

Data Protection

Scalability

High Availability

Patch Management

Installing VMware ESX and ESXi

VMware vSphere 4.1: Install, Configure, Manage – Revision A

Page 3: © 2010 VMware Inc. All rights reserved Virtual Machines Module 7.

Module 7-3

© 2010 VMware Inc. All rights reserved

Importance

You can create a virtual machine in a number of ways. Choosing the correct method can help you save time and make the deployment process manageable and scalable.

VMware vSphere 4.1: Install, Configure, Manage – Revision A

Page 4: © 2010 VMware Inc. All rights reserved Virtual Machines Module 7.

Module 7-4

© 2010 VMware Inc. All rights reserved

Module Lessons

Lesson 1: Virtual Machine Concepts

Lesson 2: Creating a Virtual Machine

Lesson 3: Creating Templates and Clones

Lesson 4: vCenter Converter

Lesson 5: Modifying Virtual Machines

Lesson 6: Managing Virtual Machines

VMware vSphere 4.1: Install, Configure, Manage – Revision A

Page 5: © 2010 VMware Inc. All rights reserved Virtual Machines Module 7.

Module 7-5

© 2010 VMware Inc. All rights reserved

Lesson 1:Virtual Machine Concepts

VMware vSphere 4.1: Install, Configure, Manage – Revision A

Page 6: © 2010 VMware Inc. All rights reserved Virtual Machines Module 7.

Module 7-6

© 2010 VMware Inc. All rights reserved

Lesson Objectives

Describe a virtual machine

Display a virtual machine’s files

List the virtual machine hardware

VMware vSphere 4.1: Install, Configure, Manage – Revision A

Page 7: © 2010 VMware Inc. All rights reserved Virtual Machines Module 7.

Module 7-7

© 2010 VMware Inc. All rights reserved

What Is a Virtual Machine?

A virtual machine is:

A set of virtual hardware on which a supported guest operating system and its applications run

A set of discrete files

A virtual machine’s configuration file describes the virtual machine’s configuration, including its virtual hardware.

Avoid using special characters and spaces in the virtual machine’s name.

…guestOS = “winnetstandard”

…displayName = “MyVM”

(etc.)

MyVM.vmx

VMware vSphere 4.1: Install, Configure, Manage – Revision A

virtual machine

Page 8: © 2010 VMware Inc. All rights reserved Virtual Machines Module 7.

Module 7-8

© 2010 VMware Inc. All rights reserved

What Files Make Up a Virtual Machine?

Filename Description

<VM_name>.vmx Virtual machine configuration file

<VM_name>.vmdk File describing virtual disk characteristics

<VM_name>-flat.vmdk Preallocated virtual disk file that contains the data

<VM_name>.nvram Virtual machine BIOS

vmware.log,vmware-#.log

Virtual machine log file andfiles containing old virtual machine log entries

<VM_name>.vswp Virtual machine swap file

<VM_name>.vmsd File that describes the virtual machine’s snapshots

<Template_name>.vmtx Virtual machine template configuration file

Other files exist for snapshots, raw disk mappings, NFS locks, and change tracking with VMware Data Recovery.

VMware vSphere 4.1: Install, Configure, Manage – Revision A

Page 9: © 2010 VMware Inc. All rights reserved Virtual Machines Module 7.

Module 7-9

© 2010 VMware Inc. All rights reserved

Displaying a Virtual Machine’s Files

On the Configuration tab, click the Storage link.

Right-click a datastore to browse its files.

VMware vSphere 4.1: Install, Configure, Manage – Revision A

Page 10: © 2010 VMware Inc. All rights reserved Virtual Machines Module 7.

Module 7-10

© 2010 VMware Inc. All rights reserved

Using the Storage Views Tab to Display Files

Click the Storage Views tab.

Select Show All Virtual Machine Files from the menu.

VMware vSphere 4.1: Install, Configure, Manage – Revision A

Page 11: © 2010 VMware Inc. All rights reserved Virtual Machines Module 7.

Module 7-11

© 2010 VMware Inc. All rights reserved

Virtual Machine Hardware

VMware vSphere 4.1: Install, Configure, Manage – Revision A

Page 12: © 2010 VMware Inc. All rights reserved Virtual Machines Module 7.

Module 7-12

© 2010 VMware Inc. All rights reserved

CPU and Memory

Up to eight virtual CPUs (vCPUs):

VMware® Virtual SMP license required

Also depends on the number of licensed CPUs on a host and the number of processors supported by a guest operating system

Maximum memory size(up to 255GB):

Amount the guest operating system will be told that it has

VMware vSphere 4.1: Install, Configure, Manage – Revision A

Page 13: © 2010 VMware Inc. All rights reserved Virtual Machines Module 7.

Module 7-13

© 2010 VMware Inc. All rights reserved

Virtual Disk

VMware vSphere 4.1: Install, Configure, Manage – Revision A

Sample virtual disk definition:Virtual disk size: 4GBDatastore: MyVMFSVirtual disk node: 0:0Virtual storage adapter: LSI Logic SASVirtual disk files: Server1.vmdk and Server1-flat.vmdkDefault disk mode: Snapshots allowedOptional disk mode: Independent – persistent or nonpersistentDisk provisioning: Thick or thin

Page 14: © 2010 VMware Inc. All rights reserved Virtual Machines Module 7.

Module 7-14

© 2010 VMware Inc. All rights reserved

Virtual Network Interface Card

Network adapters that might be available for your virtual machine: Flexible – Can function as either

a vlance or vmxnet adapter:• vlance – Also called PCNet32,

supported by most 32-bit guest operating systems

• vmxnet – Provides significantly better performance than vlance

e1000 – High-performance adapter available for only some guest operating systems

vmxnet2 (Enhanced vmxnet) – vmxnet adapter with enhanced performance

vmxnet3 – Builds on the vmxnet2 adapter

VMware vSphere 4.1: Install, Configure, Manage – Revision A

Whenever possible, choose vmxnet3.

Page 15: © 2010 VMware Inc. All rights reserved Virtual Machines Module 7.

Module 7-15

© 2010 VMware Inc. All rights reserved

Other Devices

CD/DVD drive:

Connect to CD-ROM, DVD, or ISO image.

Floppy drive:

Connect to floppy or floppy image.

Generic SCSI devices (such as tape libraries):

Can be connected to additional SCSI adapters

VMware vSphere 4.1: Install, Configure, Manage – Revision A

Page 16: © 2010 VMware Inc. All rights reserved Virtual Machines Module 7.

Module 7-16

© 2010 VMware Inc. All rights reserved

Virtual Machine Console

Send power changes to the virtual machine.

Access the virtual machine’s guest operating system.

Send Ctrl+Alt+Del to the guest operating system. Press Ctrl+Alt+Ins

in the virtual machine console.

Press Ctrl+Alt to release the pointer from the virtual machine console.

VM console

icon

VM console

VMware vSphere 4.1: Install, Configure, Manage – Revision A

Page 17: © 2010 VMware Inc. All rights reserved Virtual Machines Module 7.

Module 7-17

© 2010 VMware Inc. All rights reserved

Lesson Summary

Describe a virtual machine

Display a virtual machine’s files

List the virtual machine hardware

VMware vSphere 4.1: Install, Configure, Manage – Revision A

Page 18: © 2010 VMware Inc. All rights reserved Virtual Machines Module 7.

Module 7-18

© 2010 VMware Inc. All rights reserved

Lesson 2:Creating a Virtual Machine

VMware vSphere 4.1: Install, Configure, Manage – Revision A

Page 19: © 2010 VMware Inc. All rights reserved Virtual Machines Module 7.

Module 7-19

© 2010 VMware Inc. All rights reserved

Lesson Objectives

Provision a virtual machine:

• Create the virtual machine

• Install the guest operating system into the virtual machine

• Install VMware Tools into the guest operating system

Describe how to import a virtual appliance

VMware vSphere 4.1: Install, Configure, Manage – Revision A

Page 20: © 2010 VMware Inc. All rights reserved Virtual Machines Module 7.

Module 7-20

© 2010 VMware Inc. All rights reserved

Provisioning a Virtual Machine

Methods for creating virtual machines:

Use the Create New Virtual Machine wizard.

Import a virtual appliance.

Deploy a virtual machine from template.

Clone a virtual machine.

Use VMware vCenter Converter.

Use Guided Consolidation.

VMware vSphere 4.1: Install, Configure, Manage – Revision A

Page 21: © 2010 VMware Inc. All rights reserved Virtual Machines Module 7.

Module 7-21

© 2010 VMware Inc. All rights reserved

Create New Virtual Machine Wizard

Create a new virtual machine in the VMware vCenter Server inventory.

In the Hosts and Clusters view, select a datacenter, cluster, or host.

In the VMs and Templates view, select a datacenter or folder.

Start the Create New Virtual Machine wizard.

Perform a “typical” or “custom” configuration.

VMware vSphere 4.1: Install, Configure, Manage – Revision A

Page 22: © 2010 VMware Inc. All rights reserved Virtual Machines Module 7.

Module 7-22

© 2010 VMware Inc. All rights reserved

Choosing the Typical Configuration

Information needed for a typical configuration:

Virtual machine name and inventory location

Location in which to place the virtual machine (cluster, host, resource pool)

Datastore on which to store the virtual machine’s files

Guest operating system and version

Disk parameters for creating a new virtual disk:• Disk size

• Disk-provisioning settings:

Allocate and commit space on demand (Thin Provisioning)

Support clustering features such as Fault Tolerance

VMware vSphere 4.1: Install, Configure, Manage – Revision A

Page 23: © 2010 VMware Inc. All rights reserved Virtual Machines Module 7.

Module 7-23

© 2010 VMware Inc. All rights reserved

Choosing the Custom Configuration

Other information needed for a custom configuration:

Virtual machine version (version 7 is the latest)

Number of CPUs and size of memory

Number of NICs, network to connect to, and network adapter type

SCSI controller type

Whether to create a new disk, use an existing disk, use an RDM, or use no disk

Other disk-provisioning settings:• Whether to store the virtual disk with the virtual machine or in a different

datastore

• Virtual device node (for example, SCSI(0:0))

• Mode-independent (persistent and nonpersistent)

For both the typical and the custom configurations:

You can edit virtual machine settings before completing the task.• For example, attach an ISO image to the virtual CD/DVD drive.

VMware vSphere 4.1: Install, Configure, Manage – Revision A

Page 24: © 2010 VMware Inc. All rights reserved Virtual Machines Module 7.

Module 7-24

© 2010 VMware Inc. All rights reserved

Installing the Guest Operating System

Install the guest operating system into the virtual machine.

VMware vSphere 4.1: Install, Configure, Manage – Revision A

Page 25: © 2010 VMware Inc. All rights reserved Virtual Machines Module 7.

Module 7-25

© 2010 VMware Inc. All rights reserved

VMware Tools

Features of VMware Tools include: Device drivers:

• SVGA display

• vmxnet/vmxnet3

• Balloon driver for memory management

• Sync driver for quiescing I/O

• Improved mouse

Virtual machine heartbeat

Time synchronization

Ability to shut down virtual machine

VMware vSphere 4.1: Install, Configure, Manage – Revision A

VMware Tools icon

Install VMware Tools into the guest operating system.

Page 26: © 2010 VMware Inc. All rights reserved Virtual Machines Module 7.

Module 7-26

© 2010 VMware Inc. All rights reserved

Virtual Appliances

Preconfigured virtual machines:

Usually designed for a single purpose (for example, a safe browser or firewall)

Deployed as an OVF template

Available from the VMware Virtual Appliance Marketplace:

http://www.vmware.com/appliances

Use the VMware vSphere™ Client to upload appliances into vCenter Server.

VMware vSphere 4.1: Install, Configure, Manage – Revision A

Page 27: © 2010 VMware Inc. All rights reserved Virtual Machines Module 7.

Module 7-27

© 2010 VMware Inc. All rights reserved

Deploying an OVF Template

Another way to deploy a virtual appliance or any virtual machine stored in OVF format:

Deploy from an OVF template.

VMware vSphere 4.1: Install, Configure, Manage – Revision A

Page 28: © 2010 VMware Inc. All rights reserved Virtual Machines Module 7.

Module 7-28

© 2010 VMware Inc. All rights reserved

Lab 8

In this lab, you will create, import, and prepare virtual machines for use.

1. Create a virtual machine.

2. Install a guest operating system in a virtual machine.

3. Create a virtual machine on an iSCSI VMFS datastore.

4. Import a virtual machine into the vCenter Server inventory.

5. Identify a virtual machine’s disk format and usage statistics.

6. Install VMware Tools into a virtual machine installed with a Windows operating system.

7. Enable time synchronization between a virtual machine and an ESXi host.

8. Copy class lab files to your virtual machine.

VMware vSphere 4.1: Install, Configure, Manage – Revision A

Page 29: © 2010 VMware Inc. All rights reserved Virtual Machines Module 7.

Module 7-29

© 2010 VMware Inc. All rights reserved

Lesson Summary

Provision a virtual machine:

• Create the virtual machine

• Install the guest operating system into the virtual machine

• Install VMware Tools into the guest operating system

Describe how to import a virtual appliance

VMware vSphere 4.1: Install, Configure, Manage – Revision A

Page 30: © 2010 VMware Inc. All rights reserved Virtual Machines Module 7.

Module 7-30

© 2010 VMware Inc. All rights reserved

Lesson 3:Creating Templates and Clones

VMware vSphere 4.1: Install, Configure, Manage – Revision A

Page 31: © 2010 VMware Inc. All rights reserved Virtual Machines Module 7.

Module 7-31

© 2010 VMware Inc. All rights reserved

Lesson Objectives

Create a template

Deploy a virtual machine from a template

Clone a virtual machine

Allow guest operating system customization by vCenter Server

VMware vSphere 4.1: Install, Configure, Manage – Revision A

Page 32: © 2010 VMware Inc. All rights reserved Virtual Machines Module 7.

Module 7-32

© 2010 VMware Inc. All rights reserved

What Is a Template?

A master copy of a virtual machine used to create and provision new virtual machines

An image that typically includes a guest operating system, a set of applications, and a specific virtual machine configuration

VMware vSphere 4.1: Install, Configure, Manage – Revision A

Page 33: © 2010 VMware Inc. All rights reserved Virtual Machines Module 7.

Module 7-33

© 2010 VMware Inc. All rights reserved

Creating a Template

Clone the virtual machine to a template. The virtual machine can either

be powered on or powered off.

Convert the virtual machine to a template. The virtual machine must be

powered off.

Clone a template. Select the template in inventory

first.

VMware vSphere 4.1: Install, Configure, Manage – Revision A

Page 34: © 2010 VMware Inc. All rights reserved Virtual Machines Module 7.

Module 7-34

© 2010 VMware Inc. All rights reserved

Viewing Templates

Two ways to view templates:

Use the VMs and Templates inventory view.

Use the Virtual Machines tab in the Hosts and Clusters inventory view.

VMware vSphere 4.1: Install, Configure, Manage – Revision A

Page 35: © 2010 VMware Inc. All rights reserved Virtual Machines Module 7.

Module 7-35

© 2010 VMware Inc. All rights reserved

Deploying a Virtual Machine from Template

To deploy a virtual machine, provide such information as virtual machine name, inventory location, host, datastore, and guest operating system customization data.

VMware vSphere 4.1: Install, Configure, Manage – Revision A

Page 36: © 2010 VMware Inc. All rights reserved Virtual Machines Module 7.

Module 7-36

© 2010 VMware Inc. All rights reserved

Updating a Template

To update a template:1. Convert the

template to a virtual machine.

2. Place the virtual machine on an isolated network to prevent user access.

3. Make appropriate changes to the virtual machine.

4. Convert the virtual machine to a template.

VMware vSphere 4.1: Install, Configure, Manage – Revision A

Page 37: © 2010 VMware Inc. All rights reserved Virtual Machines Module 7.

Module 7-37

© 2010 VMware Inc. All rights reserved

Cloning a Virtual Machine

Cloning is an alternative to deploying a virtual machine.

A clone is an exact copy of the virtual machine.

The virtual machine being cloned can either be powered on or powered off.

VMware vSphere 4.1: Install, Configure, Manage – Revision A

Page 38: © 2010 VMware Inc. All rights reserved Virtual Machines Module 7.

Module 7-38

© 2010 VMware Inc. All rights reserved

Customizing the Guest Operating System

VMware recommends customization of a clone’s guest operating system to prevent software and network conflicts.

During cloning or deploying from template, you have the option of running the Guest Customization wizard.

The wizard lets you create a specification that you can use to prepare the guest operating systems of virtual machines.

Specifications can be stored in the database.

You can edit specifications in the Customization Specifications Manager.

VMware vSphere 4.1: Install, Configure, Manage – Revision A

Page 39: © 2010 VMware Inc. All rights reserved Virtual Machines Module 7.

Module 7-39

© 2010 VMware Inc. All rights reserved

Deploying Virtual Machines Across Datacenters

Virtual machine deployment is allowed across datacenters.

Clone a virtual machine from one datacenter to another.

Deploy from a template in one datacenter to a virtual machine in a different datacenter.

VMware vSphere 4.1: Install, Configure, Manage – Revision A

Page 40: © 2010 VMware Inc. All rights reserved Virtual Machines Module 7.

Module 7-40

© 2010 VMware Inc. All rights reserved

Lab 9

In this lab, you will deploy a virtual machine from a template and clone a virtual machine.

1. Configure guest operating system customization on a vCenter Server system.

2. Create a template.

3. Deploy a virtual machine from a template.

4. Clone a virtual machine that is powered on.

VMware vSphere 4.1: Install, Configure, Manage – Revision A

Page 41: © 2010 VMware Inc. All rights reserved Virtual Machines Module 7.

Module 7-41

© 2010 VMware Inc. All rights reserved

Lesson Summary

Create a template

Deploy a virtual machine from a template

Clone a virtual machine

Allow guest operating system customization by vCenter Server

VMware vSphere 4.1: Install, Configure, Manage – Revision A

Page 42: © 2010 VMware Inc. All rights reserved Virtual Machines Module 7.

Module 7-42

© 2010 VMware Inc. All rights reserved

Lesson 4:vCenter Converter

VMware vSphere 4.1: Install, Configure, Manage – Revision A

Page 43: © 2010 VMware Inc. All rights reserved Virtual Machines Module 7.

Module 7-43

© 2010 VMware Inc. All rights reserved

Lesson Objectives

Describe the capabilities of vCenter Converter

Import a system into vCenter Server

Perform a hot clone

VMware vSphere 4.1: Install, Configure, Manage – Revision A

Page 44: © 2010 VMware Inc. All rights reserved Virtual Machines Module 7.

Module 7-44

© 2010 VMware Inc. All rights reserved

vCenter Converter

vCenter Converter can import physical machines, virtual machines, and system images: Windows and Linux sources Hyper-V virtual machine sources A variety of third-party image formats

vCenter Converter can also export virtual machines for use in VMware hosted and managed products.

vCenter Converter allows you to: Reduce time needed to set up new virtual machines Migrate legacy servers to new hardware without reinstallation Perform migrations across heterogeneous hardware Readjust volume sizes and place volumes on separate virtual

disks Migrate disks across independent datastores

VMware vSphere 4.1: Install, Configure, Manage – Revision A

Page 45: © 2010 VMware Inc. All rights reserved Virtual Machines Module 7.

Module 7-45

© 2010 VMware Inc. All rights reserved

vCenter Converter Components

VMware vSphere 4.1: Install, Configure, Manage – Revision A

Page 46: © 2010 VMware Inc. All rights reserved Virtual Machines Module 7.

Module 7-46

© 2010 VMware Inc. All rights reserved

vCenter Converter Requirements

Install vCenter Converter and the vCenter Converter client only on Windows operating systems.

Allocate 525MB of disk space for vCenter Converter components:

Server files, client files, agent files, and the installation file

For hot clones, vCenter Converter requires 350MB of memory on the source machine.

vCenter Converter supports only pure IPv6 or IPv4 environments.

Certain limitations exist when you convert powered-on machines, virtual machines, third-party virtual machines, or system images.

VMware vSphere 4.1: Install, Configure, Manage – Revision A

Page 47: © 2010 VMware Inc. All rights reserved Virtual Machines Module 7.

Module 7-47

© 2010 VMware Inc. All rights reserved

Cloning

Cloning and system reconfiguration steps are used to create and reconfigure the virtual machine:

Cloning – Copy the source physical disks for the destination virtual machine. The destination virtual disk might not be an exact copy of the source disk.

System reconfiguration – Adjust the migrated operating system to enable it to function on virtual hardware.

vCenter Converter supports hot cloning:

Hot cloning – Clone a source machine while the operating system is running. The source machine can be accessed remotely.

VMware vSphere 4.1: Install, Configure, Manage – Revision A

Page 48: © 2010 VMware Inc. All rights reserved Virtual Machines Module 7.

Module 7-48

© 2010 VMware Inc. All rights reserved

Remote Hot Cloning of a Windows System

VMware vSphere 4.1: Install, Configure, Manage – Revision A

VSS snapshot

source volume

powered-onWindowsmachine

vSphere Client with vCenter Converter

client plug-in

vCenter Server with vCenter

Converter

host

destinationsource

Stage 1: Preparing source machine for conversion

agent

vCenter Converter installs the agent on source machine.vCenter Converter agent takes a VSS snapshot of the source volume.

VSS snapshot

Stage 2: Preparing the virtual machine on the destination machine

vCenter Converter creates a new virtual machine on the destination machine.

VM

vCenter Converter agent copies data from the source to the destination.

volume

Stage 3: Completing the conversion process

vCenter Converter agent installs required drivers and performs the necessary steps to allow OS to boot.

customization opt.

vCenter Converter agent customizes the virtual machine (for example, changing IP information).

Stage 4: Cleaning up

vCenter Converter agent (optionally) removes all traces from the source system and/or destination VM.

reconfiguration

LAN

Page 49: © 2010 VMware Inc. All rights reserved Virtual Machines Module 7.

Module 7-49

© 2010 VMware Inc. All rights reserved

Importing a Machine

VMware vSphere 4.1: Install, Configure, Manage – Revision A

vCenter Converter allows a number of sources:

Powered-on machine

VMware infrastructure virtual machine

VMware Workstation or other VMware virtual machine

Backup image or third-party virtual machine

Hyper-V Server

vCenter Converter provides flexibility in defining the destination virtual machine:

Select virtual machine name.

Select destination datastore.

Select virtual machine version.

Page 50: © 2010 VMware Inc. All rights reserved Virtual Machines Module 7.

Module 7-50

© 2010 VMware Inc. All rights reserved

Import Machine Wizard Options (1)

Optional settings allow you to further define your destination virtual machine.

VMware vSphere 4.1: Install, Configure, Manage – Revision A

Select destination virtual machine folder.

Select from several options to copy data to destination.

Modify number of processors, amount of memory, or disk

controller.

Add network adapters or connect to different networks.

Page 51: © 2010 VMware Inc. All rights reserved Virtual Machines Module 7.

Module 7-51

© 2010 VMware Inc. All rights reserved

Import Machine Wizard Options (2)

VMware vSphere 4.1: Install, Configure, Manage – Revision A

Stop service on source or change startup mode on destination.

Synchronize source and destination,

power off source or power on destination,

do postconversion processing

Control CPU and network resources during conversion.

Page 52: © 2010 VMware Inc. All rights reserved Virtual Machines Module 7.

Module 7-52

© 2010 VMware Inc. All rights reserved

Changes to Virtual Hardware

Most applications function correctly.

Watch for applications that depend on:

Specific hardware characteristics

Different serial numbers

Software licensed to MAC addresses

Special graphics cards

VMware vSphere 4.1: Install, Configure, Manage – Revision A

Page 53: © 2010 VMware Inc. All rights reserved Virtual Machines Module 7.

Module 7-53

© 2010 VMware Inc. All rights reserved

Lab 10

In this lab, you will use vCenter Converter to create a virtual machine from an existing system.

1. Install vCenter Converter.

2. Configure vCenter Converter guest operating system customization.

3. Install and enable the vCenter Converter plug-in.

4. Prepare a system for hot cloning.

5. Hot-clone a system.

VMware vSphere 4.1: Install, Configure, Manage – Revision A

Page 54: © 2010 VMware Inc. All rights reserved Virtual Machines Module 7.

Module 7-54

© 2010 VMware Inc. All rights reserved

Lesson Summary

Describe the capabilities of vCenter Converter

Import a system into vCenter Server

Perform a hot clone

VMware vSphere 4.1: Install, Configure, Manage – Revision A

Page 55: © 2010 VMware Inc. All rights reserved Virtual Machines Module 7.

Module 7-55

© 2010 VMware Inc. All rights reserved

Lesson 5:Modifying Virtual Machines

VMware vSphere 4.1: Install, Configure, Manage – Revision A

Page 56: © 2010 VMware Inc. All rights reserved Virtual Machines Module 7.

Module 7-56

© 2010 VMware Inc. All rights reserved

Lesson Objectives

Describe virtual machine settings and options

Add a hot-pluggable device

Dynamically increase the size of a virtual disk

Add a raw device mapping (RDM)

VMware vSphere 4.1: Install, Configure, Manage – Revision A

Page 57: © 2010 VMware Inc. All rights reserved Virtual Machines Module 7.

Module 7-57

© 2010 VMware Inc. All rights reserved

Modifying Virtual Machine Settings

You can modify a virtual machine’s configuration in its Properties dialog box:

Add virtual hardware.• Some hardware can be added

while the virtual machine is powered on.

Remove virtual hardware.

Set virtual machine options.

Control a virtual machine’s CPU and memory resources.

VMware vSphere 4.1: Install, Configure, Manage – Revision A

Page 58: © 2010 VMware Inc. All rights reserved Virtual Machines Module 7.

Module 7-58

© 2010 VMware Inc. All rights reserved

Hot-Pluggable Devices

Examples of hot-pluggable devices: USB controllers, Ethernet adapters, and hard disk devices.

You can also add CPU and memory while the virtual machine is powered on.

VMware vSphere 4.1: Install, Configure, Manage – Revision A

Page 59: © 2010 VMware Inc. All rights reserved Virtual Machines Module 7.

Module 7-59

© 2010 VMware Inc. All rights reserved

Dynamically Increasing a Virtual Disk’s Size

Dynamically increase a virtual disk from, for

example, 2GB to 20GB.

Format the new space within the guest operating

system.

VMware vSphere 4.1: Install, Configure, Manage – Revision A

Page 60: © 2010 VMware Inc. All rights reserved Virtual Machines Module 7.

Module 7-60

© 2010 VMware Inc. All rights reserved

Creating an RDM

VMware vSphere 4.1: Install, Configure, Manage – Revision A

An RDM allows you to store virtual machine data directly on a LUN.

The RDM is a file on a VMware vStorage VMFS datastore that points to the raw LUN.

Page 61: © 2010 VMware Inc. All rights reserved Virtual Machines Module 7.

Module 7-61

© 2010 VMware Inc. All rights reserved

Virtual Machine Options

guest operating system type

VM directory

.vmx file location

VM display name

VMware vSphere 4.1: Install, Configure, Manage – Revision A

Page 62: © 2010 VMware Inc. All rights reserved Virtual Machines Module 7.

Module 7-62

© 2010 VMware Inc. All rights reserved

Options: VMware Tools

When to run VMware Tools

scripts

Customize power button actions.

Update checks and time sync.

VMware vSphere 4.1: Install, Configure, Manage – Revision A

Page 63: © 2010 VMware Inc. All rights reserved Virtual Machines Module 7.

Module 7-63

© 2010 VMware Inc. All rights reserved

Advanced: Boot Options

Advanced options rarely need to be set.

Delay power on.

Boot into BIOS.

Retry after failed boot.

VMware vSphere 4.1: Install, Configure, Manage – Revision A

Page 64: © 2010 VMware Inc. All rights reserved Virtual Machines Module 7.

Module 7-64

© 2010 VMware Inc. All rights reserved

Lab 11

In this lab, you will modify a virtual machine’s hardware and add a raw LUN to a virtual machine.

1. Increase the size of a VMDK file.

2. Adjust memory allocation on a virtual machine.

3. Rename a virtual machine in the vCenter Server inventory.

4. Add a raw LUN to a virtual machine and verify that the guest operating system can see it.

5. Expand a thin-provisioned virtual disk.

VMware vSphere 4.1: Install, Configure, Manage – Revision A

Page 65: © 2010 VMware Inc. All rights reserved Virtual Machines Module 7.

Module 7-65

© 2010 VMware Inc. All rights reserved

Lesson Summary

Describe virtual machine settings and options

Add a hot-pluggable device

Dynamically increase the size of a virtual disk

Add an RDM

VMware vSphere 4.1: Install, Configure, Manage – Revision A

Page 66: © 2010 VMware Inc. All rights reserved Virtual Machines Module 7.

Module 7-66

© 2010 VMware Inc. All rights reserved

Lesson 6:Managing Virtual Machines

VMware vSphere 4.1: Install, Configure, Manage – Revision A

Page 67: © 2010 VMware Inc. All rights reserved Virtual Machines Module 7.

Module 7-67

© 2010 VMware Inc. All rights reserved

Lesson Objectives

Take a snapshot of a virtual machine and manage multiple snapshots

Remove a virtual machine from the vCenter Server inventory and completely from disk

Describe the types of migration

Use VMware Storage vMotion to migrate a virtual machine

VMware vSphere 4.1: Install, Configure, Manage – Revision A

Page 68: © 2010 VMware Inc. All rights reserved Virtual Machines Module 7.

Module 7-68

© 2010 VMware Inc. All rights reserved

Virtual Machine Snapshots

Snapshots allow you to preserve the state of the virtual machine so that you can return to the same state repeatedly.

For example, if you are testing software, snapshots allow you to back out of these changes.

VMware vSphere 4.1: Install, Configure, Manage – Revision A

Page 69: © 2010 VMware Inc. All rights reserved Virtual Machines Module 7.

Module 7-69

© 2010 VMware Inc. All rights reserved

Taking a Snapshot

You can take a snapshot while a virtual machine is powered on, powered off, or suspended.

A snapshot captures the entire state of the virtual machine:

Memory state, settings state, and disk state

VMware vSphere 4.1: Install, Configure, Manage – Revision A

Page 70: © 2010 VMware Inc. All rights reserved Virtual Machines Module 7.

Module 7-70

© 2010 VMware Inc. All rights reserved

Managing Snapshots

The Snapshot Manager lets you review all snapshots for the active virtual machine and act on them directly:

Revert to a snapshot.

Delete one or all snapshots.

VMware vSphere 4.1: Install, Configure, Manage – Revision A

Page 71: © 2010 VMware Inc. All rights reserved Virtual Machines Module 7.

Module 7-71

© 2010 VMware Inc. All rights reserved

Virtual Machine Snapshot Files

A snapshot consists of a set of files: the memory state (.vmsn), the description file (-00000#.vmdk), and the delta file (-00000#-delta.vmdk).

The snapshot list file (.vmsd) keeps track of the virtual machine’s snapshots.

VMware vSphere 4.1: Install, Configure, Manage – Revision A

Page 72: © 2010 VMware Inc. All rights reserved Virtual Machines Module 7.

Module 7-72

© 2010 VMware Inc. All rights reserved

Managing Virtual Machines with vApp

VMware vSphere 4.1: Install, Configure, Manage – Revision A

A VMware vApp:

Is a container for one or more virtual machines

Can be used to package and manage related applications

Is an object in the vCenter Server inventory

Page 73: © 2010 VMware Inc. All rights reserved Virtual Machines Module 7.

Module 7-73

© 2010 VMware Inc. All rights reserved

vApp Characteristics

VMware vSphere 4.1: Install, Configure, Manage – Revision A

You can configure a vApp:

CPU and memory allocation

IP allocation policy

Advanced settings

You can also configure the virtual machine startup and shutdown order.

Page 74: © 2010 VMware Inc. All rights reserved Virtual Machines Module 7.

Module 7-74

© 2010 VMware Inc. All rights reserved

Removing a Virtual Machine

Two ways to remove a virtual machine:

Remove a virtual machine from the inventory.• The virtual machine’s files remain

on disk.

• The virtual machine can later be re-added to the inventory.

Delete a virtual machine from disk.• The virtual machine is removed

from the inventory, and its files are permanently deleted from disk.

VMware vSphere 4.1: Install, Configure, Manage – Revision A

Page 75: © 2010 VMware Inc. All rights reserved Virtual Machines Module 7.

Module 7-75

© 2010 VMware Inc. All rights reserved

Migrating Virtual Machines

Migration – Moving a virtual machine from one host or datastore to another. Types of migrations:

Cold – Migrate a virtual machine that is powered off.

Suspended – Migrate a virtual machine that is suspended.

VMware vMotion™ – Migrate a virtual machine that is powered on.

Storage vMotion – Migrate a virtual machine’s files, while the virtual machine is powered on, to a different datastore.

Concurrent migrations are possible:

A host can be involved in up to two migrations with vMotion or Storage vMotion at one time.

A maximum of eight simultaneous vMotion, cloning, deployment, or Storage vMotion accesses to a single VMFS-3 datastore is supported.

VMware vSphere 4.1: Install, Configure, Manage – Revision A

Page 76: © 2010 VMware Inc. All rights reserved Virtual Machines Module 7.

Module 7-76

© 2010 VMware Inc. All rights reserved

Comparison of Migration Types

Migration type

VM power state

Change host/

datastore?

Across datacenters?

Shared storage

required?

CPU compatibility?

Cold OffHost or

datastore or both

Yes NoDifferent CPU

families allowed

Suspended SuspendedHost or

datastore or both

Yes No

Must meet CPU

compatibility requirements

vMotion On Host No Yes

Must meet CPU

compatibility requirements

Storage vMotion On Datastore No No N/A

VMware vSphere 4.1: Install, Configure, Manage – Revision A

Page 77: © 2010 VMware Inc. All rights reserved Virtual Machines Module 7.

Module 7-77

© 2010 VMware Inc. All rights reserved

Storage vMotion

Storage vMotion allows you to:

Perform storage maintenance and reconfiguration

Redistribute storage load

Evacuate physical storage soon to be retired

Perform storage tiering

Upgrade VMware ESX™/ESXi hosts without virtual machine downtime

Storage vMotion is storage-type independent.

Source and destination can be different storage types.

VMware vSphere 4.1: Install, Configure, Manage – Revision A

Page 78: © 2010 VMware Inc. All rights reserved Virtual Machines Module 7.

Module 7-78

© 2010 VMware Inc. All rights reserved

Storage vMotion in Action

VMware vSphere 4.1: Install, Configure, Manage – Revision A

4

512

3

Page 79: © 2010 VMware Inc. All rights reserved Virtual Machines Module 7.

Module 7-79

© 2010 VMware Inc. All rights reserved

Migrating Virtual Machines

VMware vSphere 4.1: Install, Configure, Manage – Revision A

vMotion

Storage vMotion

Function available when virtual machine

is powered off

You can use the Migrate Virtual Machine wizard to perform both hot and cold migrations.

Page 80: © 2010 VMware Inc. All rights reserved Virtual Machines Module 7.

Module 7-80

© 2010 VMware Inc. All rights reserved

Storage vMotion Guidelines and Limitations

Guidelines:

Plan and coordinate with administrators.

Perform during off-peak hours.

Ensure that source host has access both to source datastores and target datastores.

Limitations:

Virtual machines with snapshots cannot be migrated.

Virtual machine disks must be in persistent mode or be RDMs.

The virtual machine must be powered off to concurrently migrate to another host and datastore.

VMware vSphere 4.1: Install, Configure, Manage – Revision A

Page 81: © 2010 VMware Inc. All rights reserved Virtual Machines Module 7.

Module 7-81

© 2010 VMware Inc. All rights reserved

Lab 12

In this lab, you will perform several virtual machine management tasks.

1. Unregister a virtual machine in the vCenter Server inventory.

2. Register a virtual machine in the vCenter Server inventory.

3. Unregister and delete virtual machines from disk.

4. Take snapshots of a virtual machine.

5. Revert to a snapshot.

6. Migrate virtual machine files with Storage vMotion.

VMware vSphere 4.1: Install, Configure, Manage – Revision A

Page 82: © 2010 VMware Inc. All rights reserved Virtual Machines Module 7.

Module 7-82

© 2010 VMware Inc. All rights reserved

Lesson Summary

Take a snapshot of a virtual machine and manage multiple snapshots

Remove a virtual machine from the vCenter Server inventory and completely from disk

Describe the types of migration

Use Storage vMotion to migrate a virtual machine

VMware vSphere 4.1: Install, Configure, Manage – Revision A

Page 83: © 2010 VMware Inc. All rights reserved Virtual Machines Module 7.

Module 7-83

© 2010 VMware Inc. All rights reserved

Key Points

You can use several methods to create a virtual machine. Choose the method that best fits your needs.

Deploying virtual machines from a template allows you to easily create many virtual machines.

vCenter Server provides useful features for provisioning virtual machines, such as templates, cloning, and vCenter Converter.

VMware vSphere 4.1: Install, Configure, Manage – Revision A