0% found this document useful (0 votes)
37 views159 pages

ICTNWK559 Presentation Handout

The document outlines the installation and management of an enterprise virtual computing environment, focusing on virtualization technologies and their benefits. It describes virtual machines, their architecture, types of virtualization, and the role of hypervisors in managing resources. Additionally, it discusses various virtualization techniques and their applications in data centers to optimize resource utilization and reduce costs.
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)
37 views159 pages

ICTNWK559 Presentation Handout

The document outlines the installation and management of an enterprise virtual computing environment, focusing on virtualization technologies and their benefits. It describes virtual machines, their architecture, types of virtualization, and the role of hypervisors in managing resources. Additionally, it discusses various virtualization techniques and their applications in data centers to optimize resource utilization and reduce costs.
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/ 159

Information Technology

ICTNWK559 Install an enterprise virtual


computing environment
ICTNWK559 Install an enterprise virtual computing
environment

Determine enterprise virtual


computing requirements

Analyse the virtualisation


host software

Evaluate system
requirements

Plan and install the


virtualisation host software
Virtual Machines
Virtual Machine

• A Virtual Machine is a software that


creates a virtualized environment
between the computer platform and the
end user in which the end user can
operate software.
Description
• A virtual machine provides an interface
identical to the underlying bare
hardware.
• The operating system creates the illusion
of multiple processes, each executing on
its own processor with its own (virtual)
memory.
Definitions
• Host Operating System:
– The operating system actually running on the hardware
– Together with virtualization layer, it simulates
environment for …
• Guest Operating System:
– The operating system running in the simulated
environment
– E.g., the one we are trying to debug
Virtualization
• Virtualization deals with “extending or replacing
an existing interface so as to mimic the
behavior of another system”

• Virtual system examples: virtual private network,


virtual memory, virtual machine
Virtualization
• Virtualization is an abstraction layer that decouples
the physical hardware from the operating system to
deliver greater IT resource utilization and flexibility.
• It allows multiple virtual machines, with
heterogeneous operating systems to run in
isolation, side-by-side on the same physical
machine.
Virtualization contd..
• Each virtual machine has its own set of virtual
hardware (e.g., RAM, CPU, NIC, etc.) upon which an
operating system and applications are loaded.
• The operating system creates the illusion of multiple
processes, each executing on its own processor with
its own (virtual) memory.
• Desktop Virtualization
• Server Virtualization
• Network Virtualization
• Storage Virtualization
• Application Virtualization
Vendors of Virtualization
History

• Virtualization was first introduced in the


1960s to allow partitioning of large,
mainframe hardware.
• In the 1990s, researchers began to see how
virtualization could solve some of the
problems associated with the proliferation of
less expensive hardware, including
underutilization, escalating management
costs and vulnerability.
Virtual Machine Monitor
• The host software that provides
virtualization is often referred to as a
virtual machine monitor (VMM) or
hypervisor.
• The VMM gives each virtual machine an
illusion of a complete computer to itself.
Architecture
Features
• Each virtual machine has its own set of virtual
hardware (e.g., RAM, CPU, NIC, etc.) upon which an
operating system and applications are loaded.
• The operating system sees a consistent, normalized
set of hardware regardless of the actual physical
hardware components.
Benefits
1. Partitioning
- Multiple applications and operating
systems can be supported within a single
physical system.
- There is no overlap amongst memory
as each Virtual Memory has its own memory
space.
Benefits
2.Isolation
-Virtual machines are completely
isolated from the host machine and other
virtual machines. If a virtual machine
crashes, all others are unaffected.
-Data does not leak across virtual
machines.
• Run legacy software on non-legacy hardware
• Run multiple operating systems on the same
hardware
• Create a manageable upgrade path
• Manage outages (expected and unexpected)
dynamically
• Reduce costs by consolidating services onto
the fewest number of physical machines

http://www.vmware.com/img/serverconsolidation.jpg
Non-virtualized Data Centers
• Too many servers for too little work

• High costs and infrastructure needs


– Maintenance
– Networking
– Floor space
– Cooling
– Power
– Disaster Recovery
Dynamic Data Center
• Virtualization helps us break the “one service per server”
model
• Consolidate many services into a fewer number of
machines when workload is low, reducing costs
• Conversely, as demand for a particular service increases, we
can shift more virtual machines to run that service
• We can build a data center with fewer total resources, since
resources are used as needed instead of being dedicated to
single services
VM workload multiplexing
Separate VM sizing VM multiplexing

s3

s2 s1

We expect s3 < s1 + s2. Benefit of multiplexing !

– Multiplex VMs’ workload on same physical server


• Aggregate multiple workload. Estimate total capacity need based on
aggregated workload
• Performance level of each VM be preserved
So, it is just like Java VM, right?
Thee Virtualization Approaches
▪ Full Virtualization
▪ Paravirtualization
▪ Hardware-assisted Virtualization
Full Virtualization

– Everything is virtualized
– Full hardware emulation
– Emulation = latency
Privileged Instructions
– Privileged instructions: OS kernel and device
driver access to system hardware
– Trapped and emulated by VMM
Pros and Cons – Full
Virtualization
• Pros
– Disaster recovery, failover
– Virtual appliance deployment
– Legacy code on non-legacy hardware
• Cons – LATENCY of core four resources
– RAM performance reduced 25% to 75%
– Disk I/O degraded from 5% to 20%
– Network performance decreased up to 10%
– CPU privileged instruction dings nearing 1% to 7%
Paravirtualization
–OS or system devices are virtualization aware
Requirements:
–OS level – recompiled kernel
–Device level – paravirtualized or “enlightened” device
drivers
Paravirtualization
• Pro: fast

• Con: requires a specially modified guest OS, thus precludes the ability to run off-the-shelf and legacy OS in paravirtual
environments
Hardware-assisted Virtualization
– Server hardware is virtualization aware
– Hypervisor and VMM load at
privilege Ring -1 (firmware)
– Removes CPU emulation bottleneck
– Memory virtualization coming in quad
core AMD and Intel CPUs
Evolution of Software solutions*
• 2nd Generation: • 3rd Generation: Silicon-
• 1st Generation: Full based (Hardware-assisted)
Paravirtualization
virtualization (Binary virtualization
rewriting) – Cooperative
virtualization – Unmodified guest
– Software Based – VMware and Xen on
– Modified guest
– VMware and Microsoft virtualization-aware
– VMware, Xen
hardware platforms

Virtual
Machine
Virtual
Machine
VM … VM
Dynamic Translation

Virtual
Machine
Virtual
Machine

Operating System Hypervisor Hypervisor

Hardware Hardware Hardware

Time
Virtualization Logic

*This slide is from Intel® Corporation


Virtualisation Types and Practicalities
Desktop Virtualization

• VMware Workstation (Local)


• Microsoft Virtual PC (Local)
• Citrix XenDesktop (Centralized)
Desktop Virtualization Architecture
Applications Applications Applications
Virtual

Guest OS Guest OS Guest OS


(Windows) (Linux) (VMware ESX)
Virtual Machine Virtual Machine Virtual Machine

Virtual Machine Manager


Physical

Host OS

Hardware
Components of Virtual Machines?

• Configuration file
• Hard disk file(s)
• Virtual machine state file
• In-memory file
Comparison
• VMware Workstation
– Costs more
– More host & guests support
– Better features (Snapshots, USB)
– 64-bit hosts and guests
• Microsoft Virtual PC
– Free
– Less hosts & guests support
– Less VM features and capabilities
Uses
• Development
• Testing
• Training
Server Virtualization
• Software (SoftV)
• Hardware (HardV)
SoftV Server Virtualization

• VMware Server
SoftV Server Virtualization Architecture

Applications Applications Applications


Virtual

Guest OS Guest OS Guest OS


(Windows) (Linux) (VMware ESX)
Virtual Machine Virtual Machine Virtual Machine

Virtual Machine Manager(Server Products)


Physical

Host OS(Server Products)

Hardware
HardV Server Virtualization
• Microsoft Virtual Server
• Citrix XenServer

• VMware ESX Server


• Microsoft Hyper-V Server

• VMware ESXi Server


HardV Server Virtualization Architecture

Applications Applications
Virtual

Guest OS Guest OS
(Windows) (Linux)

Virtual Machine Virtual Machine

Host OS Virtualization Layer


Physical

Hardware
HardV Server Virtualization Architecture
Applications Applications Applications

Guest OS Guest OS Guest OS


Virtual

(Windows) (Linux) (VMware ESX)


Virtual Machine Virtual Machine Virtual Machine

Host OS + Virtualization Layer


Physical

Hardware
HardV Server Virtualization Architecture
Applications Applications Applications

Guest OS Guest OS Guest OS


Virtual

(Windows) (Linux) (VMware ESX)


Virtual Machine Virtual Machine Virtual Machine

Virtualization Layer (Hypervisor)


Physical

Hardware
What is a hypervisor?
• A hypervisor, also called a virtual machine manager
(VMM), is a program that allows multiple operating
systems to share a single hardware host. Each operating
system appears to have the host's processor, memory,
and other resources all to itself. However, the hypervisor
is actually controlling the host processor and resources,
allocating what is needed to each operating system in
turn and making sure that the guest operating systems
(called virtual machines) cannot disrupt each other.
ESX & ESXi
• ESX has a Service Console is based on Red Hat Enterprise Linux 3 (Update 6)
that is heavily modified and stripped down and is used for management
purposes. During the boot process the Service Console bootstraps the
VMKernel using initrd and then turns over full control of all hardware
resources to the VMkernel. When the VMkernel takes over the hardware
resources of the host, the Service Console is warm booted and managed as
a privileged virtual machine within the VMkernel.

• ESXi does not have a full Service Console but instead has a limited
management console based on an implementation of the Posix variant of
Unix within a Busybox framework and has many features that you will find in
the full Service Console.
Techniques of VMware
• VMotion
• Storage VMotion
• High Availability
• Memory
Reclamation
VMotion
• VMotion allows you to quickly move an
entire running virtual machine from one
host to another without any downtime or
interruption to the virtual machine This is
also known as a “hot” or “live” migration.
• The entire state of a virtual machine is
encapsulated and the VMFS file system
allows both the source and the target ESX
host to access the virtual machine files
concurrently. The active memory and
precise execution state of a virtual
machine can then be rapidly transmitted
over a high speed network. The virtual
machine retains its network identity and
connections, ensuring a seamless
migration process.
Storage VMotion
• Storage VMotion is a new feature introduced in ESX 3.5,
it allows you to migrate a running virtual machine and
its disk files from one datastore to another on the same
ESX host
• The difference between VMotion and Storage VMotion
is that VMotion simply moves a virtual machine from
one ESX host to another but keeps the storage location
of the VM the same, Storage VMotion on the other
hand changes the storage location of the virtual
machine while it is running and moves it to another
datastore on the same ESX host. The virtual machine
can be moved to any datastore on the ESX host which
includes local and shared storage.
High Availability (HA)

• Continuously monitors all hosts in a cluster


and restarts virtual machines affected by a
host failure on other hosts
• Can also monitor guest OS's for a failure via
a heartbeat and restart them on the same
host in case of a failure
• Continuously monitors and chooses the
optimal physical servers within a resource
pool on which to restart virtual machines (if
used in conjunction with DRS)
An Overview Of Virtual Machine
Architectures
Early Computers
• Hardware designed
– Software written for hardware
• Each system crafted with own instruction set
– Software had to made specifically for each instruction set
• Eventually instruction sets became more
standardized
– However, software still requires a certain instruction set
architecture and operating system that meets strict
standards.
Virtual Machines
• Eliminate real machine constraint
– Increases portability and flexibility
• Virtual machine adds software to a physical
machine to give it the appearance of a different
platform or multiple platforms.
• Benefits
– Cross platform compatibility
– Increase Security
– Enhance Performance
– Simplify software migration
Initial Hardware Model
• All applications access hardware resources (i.e. memory,
i/o) through system calls to operating system
(privalaged instructions)

• Advantages
– Design is decoupled (i.e. OS people can develop OS
separate of Hardware people developing hardware)
– Hardware and software can be upgraded without
notifying the Application programs
• Disadvantage
– Application compiled on one ISA will not run on another
ISA..
• Applications compiled for Mac use different operating system
calls then application designed for windows.
– ISA’s must support old software
• Can often be inhibiting in terms of performance
– Since software is developed separately from hardware..
Software is not necessarily optimized for hardware.
Virtual Machine Basics
• Virtual software placed between
underlying machine and
conventional software
– Conventional software sees
different ISA from the one
supported by the hardware
• Virtualization process involves:
– Mapping of virtual resources
(registers and memory) to real
hardware resources
– Using real machine instructions
to carry out the actions
specified by the virtual machine
instructions
System/Process Virtual Machines
• Can view virtual machine as:
– System virtual machine (i.e. think cygwin)
• Full execution environment that can support multiple
processes
• Support I/O devices
• Support GUI
– Process virtual machine
• Virtual machines can be instantiated for a single
program (i.e. think Java)
• Virtual machine terminates when process terminates.
Standard Interfaces
• When implementing virtual machines there
are two standard interfaces
– Deal with Process and System Level virtual
machines
• ISA -> has both user and system instructions
– User instructions available to both the application programs
and to the operating system
• Application Binary Interface (ABI)
– Composed of two components
» First all user instructions
» System call interface -> allows to work with OS
privalaged instructions
Process Level Virtual Machines
• Provide user with application level virtual ABI environment
– Examples
• Multiprogramming
– Provide end users with illusion of having a complete machine to itself
» Each process given own address space and access to file structure
• Emulation and Binary Translators
– Use interpretation to allow a program to be emulated on an ISA that is different then
the ISA it was compiled on. (translate instruction when called into foreign ISA)
» Can also use translation to put foreign code in to the current machines ISA.
• High Level VMS
– When process VM at the same time you design the high level language.
» First done in Pascal.. Take high level code and translates it into intermediary
language. Intermediary language is then translated to the specific ISA.
System Level Virtual Machines
• Provide complete environment in which many
processes, possibly belonging to multiple users can
exist.
– Virtual machine is the interface to the ISA
• Divide a single set of hardware among multiple
guest Operating Systems.
– Reason -> different people want different operating
systems.
– Provides security
– Can configure hardware by monitoring performance
• Statistics allow it to configure hardware
Virtualization
• The computational function carried out by a
computer system is specified in terms of:
– architected state (registers, memory)
– instructions
• cause changes in the architected state.
• Today often more implementation state then
architecture state
• How do you virtualize a foreign ISA
– E.x. A foreign architecture maybe have 32 registers but
your architecture only has 8 registers.
– This means that a virtual machine may not map to an ISA
efficiently.
VMware
VMware – Modern Virtual Machine System

• Founded 1998, Mendel Rosenblum et al.


• Research at Stanford University
• VMware Workstation
• Separates Host OS from virtualization layer
• Host OS may be Windows, Linux, etc.
• Wide variety of Guest operating systems

• < $200
VMware Architecture
VMware Server
• Free version released in 2006
• http://www.vmware.com/products/server/
• Runs on any x86 server hardware and OS
• Windows Server and Linux Host OS’s
• Partition a physical server into multiple virtual
server machines
• Target market – IT centers providing multiple services
• Allows separate virtual servers to be separately configured for
separate IT applications
– Provisioning
• Portability, replication, etc.
VMware Server ESX
• Total decoupling between hardware and
applications
• High-end, high-performance IT applications
• Oracle, SQL Server, Microsoft Exchange server, SAP,
Siebel, Lotus Notes, BEA WebLogic, Apache
• Dynamically move running application to
different hardware
• Maintenance, hardware replacement
• Provisioning new versions, etc.
Must virtual machine be replica of
host machine?
• No, virtualization layer can simulate any
architecture
• Typically used for debugging specialized systems
• Real-time systems, niche products, etc.

• Guest architecture does not even have to be


real hardware!
Planning for Installation
Types of Virtual Machines and Implementations

n Many variations as well as HW details


l Assume VMMs take advantage of HW features
HW features can simplify implementation, improve performance
n Whatever the type, a VM has a lifecycle
l Created by VMM
l Resources assigned to it (number of cores, amount of memory,
networking details, storage details)
l In type 0 hypervisor, resources usually dedicated
l Other types dedicate or share resources, or a mix
l When no longer needed, VM can be deleted, freeing resouces
n Steps simpler, faster than with a physical machine install
l Can lead to virtual machine sprawl with lots of VMs, history and
state difficult to track
Types of VMs – Type 0 Hypervisor

• Old idea, under many names by HW manufacturers


– “partitions”, “domains”
– A HW feature implemented by firmware
– OS need to nothing special, VMM is in firmware
– Smaller feature set than other types
– Each guest has dedicated HW
• I/O a challenge as difficult to have enough devices,
controllers to dedicate to each guest
• Sometimes VMM implements a control partition
running daemons that other guests communicate with
for shared I/O
• Can provide virtualization-within-virtualization (guest
itself can be a VMM with guests
– Other types have difficulty doing this
Type 0 Hypervisor
Types of VMs – Type 1 Hypervisor
• Commonly found in company datacenters
– In a sense becoming “datacenter operating systems”
• Datacenter managers control and manage OSes in new, sophisticated
ways by controlling the Type 1 hypervisor
• Consolidation of multiple OSes and apps onto less HW
• Move guests between systems to balance performance
• Snapshots and cloning
• Special purpose operating systems that run natively on HW
– Rather than providing system call interface, create run and manage guest
OSes
– Can run on Type 0 hypervisors but not on other Type 1s
– Run in kernel mode
– Guests generally don’t know they are running in a VM
– Implement device drivers for host HW because no other component can
– Also provide other traditional OS services like CPU and memory
management
Types of VMs – Type 1 Hypervisor (cont.)

Another variation is a general purpose OS that also


provides VMM functionality
RedHat Enterprise Linux with KVM, Windows with Hyper-V,
Oracle Solaris
Perform normal duties as well as VMM duties
Typically less feature rich than dedicated Type 1
hypervisors
In many ways, treat guests OSes as just another
process
Albeit with special handling when guest tries to execute
special instructions
Types of VMs – Type 2 Hypervisor

• Less interesting from an OS perspective


– Very little OS involvement in virtualization
– VMM is simply another process, run and
managed by host
• Even the host doesn’t know they are a VMM running
guests
– Tend to have poorer overall performance
because can’t take advantage of some HW
features
– But also a benefit because require no changes
to host OS
• Student could have Type 2 hypervisor on native host,
run multiple guests, all on standard host OS such as
Windows, Linux, MacOS
Types of VMs – Paravirtualization

• Does not fit the definition of virtualization – VMM not


presenting an exact duplication of underlying hardware
– But still useful!
– VMM provides services that guest must be modified to use
– Leads to increased performance
– Less needed as hardware support for VMs grows
• Xen, leader in paravirtualized space, adds several
techniques
– For example, clean and simple device abstractions
• Efficient I/O
• Good communication between guest and VMM about device I/O
• Each device has circular buffer shared by guest and VMM via
shared memory
Xen I/O via Shared Circular Buffer
Types of VMs – Paravirtualization (cont.)

• Xen, leader in paravirtualized space, adds several


techniques (Cont.)
Memory management does not include nested
page tables
Each guest has own read-only tables
Guest uses hypercall (call to hypervisor) when page-
table changes needed
Paravirtualization allowed virtualization of older
x86 CPUs (and others) without binary translation
Guest had to be modified to use run on
paravirtualized VMM
But on modern CPUs Xen no longer requires
guest modification -> no longer
paravirtualization
Types of VMs – Programming Environment Virtualization

Also not-really-virtualization but using same techniques, providing


similar features
Programming language is designed to run within custom-built
virtualized environment
For example Oracle Java has many features that depend on running in Java
Virtual Machine (JVM)
In this case virtualization is defined as providing APIs that define a set
of features made available to a language and programs written in that
language to provide an improved execution environment
JVM compiled to run on many systems (including some smart phones
even)
Programs written in Java run in the JVM no matter the underlying
system
Similar to interpreted languages
Types of VMs – Emulation
• Another (older) way for running one operating system on a different
operating system
– Virtualization requires underlying CPU to be same as guest was
compiled for
– Emulation allows guest to run on different CPU
• Necessary to translate all guest instructions from guest CPU to native CPU
– Emulation, not virtualization
• Useful when host system has one architecture, guest compiled for other
architecture
– Company replacing outdated servers with new servers containing
different CPU architecture, but still want to run old applications
• Performance challenge – order of magnitude slower than native code
– New machines faster than older machines so can reduce slowdown
• Very popular – especially in gaming where old consoles emulated on new
Types of VMs – Application Containment
• Some goals of virtualization are segregation of apps, performance and
resource management, easy start, stop, move, and management of them
• Can do those things without full-fledged virtualization
– If applications compiled for the host operating system, don’t need full
virtualization to meet these goals
• Oracle containers / zones for example create virtual layer between OS and
apps
– Only one kernel running – host OS
– OS and devices are virtualized, providing resources within zone with impression
that they are only processes on system
– Each zone has its own applications; networking stack, addresses, and ports;
user accounts, etc
– CPU and memory resources divided between zones
• Zone can have its own scheduler to use those resources
Solaris 10 with Two Zones
Virtualization and Operating-System Components

Now look at operating system aspects of


virtualization
CPU scheduling, memory management, I/O, storage, and
unique VM migration feature
How do VMMs schedule CPU use when guests believe they
have dedicated CPUs?
How can memory management work when many guests
require large amounts of memory?
OS Component – CPU Scheduling
Even single-CPU systems act like multiprocessor ones when
virtualized
One or more virtual CPUs per guest
Generally VMM has one or more physical CPUs and number of
threads to run on them
Guests configured with certain number of VCPUs
 Can be adjusted throughout life of VM
When enough CPUs for all guests -> VMM can allocate dedicated
CPUs, each guest much like native operating system managing its
CPUs
Usually not enough CPUs -> CPU overcommitment
 VMM can use standard scheduling algorithms to put threads on CPUs
 Some add fairness aspect
OS Component – CPU Scheduling (cont.)

• Cycle stealing by VMM and oversubscription of


CPUs means guests don’t get CPU cycles they
expect
– Consider timesharing scheduler in a guest trying to
schedule 100ms time slices -> each may take 100ms, 1
second, or longer
• Poor response times for users of guest
• Time-of-day clocks incorrect
– Some VMMs provide application to run in each guest
to fix time-of-day and provide other integration
features
OS Component – Memory Management
Also suffers from oversubscription -> requires extra management efficiency
from VMM
For example, VMware ESX guests have a configured amount of physical
memory, then ESX uses 3 methods of memory management
1. Double-paging, in which the guest page table indicates a page is in a
physical frame but the VMM moves some of those pages to backing
store
2. Install a pseudo-device driver in each guest (it looks like a device driver
to the guest kernel but really just adds kernel-mode code to the guest)
 Balloon memory manager communicates with VMM and is told to
allocate or deallocate memory to decrease or increase physical
memory use of guest, causing guest OS to free or have more
memory available
3. Deduplication by VMM determining if same page loaded more than
once, memory mapping the same page into multiple guests
OS Component – I/O
Easier for VMMs to integrate with guests because I/O
has lots of variation
Already somewhat segregated / flexible via device drivers
VMM can provide new devices and device drivers

But overall I/O is complicated for VMMs


Many short paths for I/O in standard OSes for improved performance
Less hypervisor needs to do for I/O for guests, the better
Possibilities include direct device access, DMA pass-through, direct interrupt delivery
 Again, HW support needed for these

Networking also complex as VMM and guests all need


network access
VMM can bridge guest to network (allowing direct access)
And / or provide network address translation (NAT)
 NAT address local to machine on which guest is running, VMM provides address translation to
guest to hide its address
OS Component – Storage
Management
• Both boot disk and general data access need be provided by VMM
• Need to support potentially dozens of guests per VMM (so
standard disk partitioning not sufficient)
• Type 1 – storage guest root disks and config information within file
system provided by VMM as a disk image
• Type 2 – store as files in file system provided by host OS
• Duplicate file -> create new guest
• Move file to another system -> move guest
• Physical-to-virtual (P-to-V) convert native disk blocks into VMM
format
• Virtual-to-physical (V-to-P) convert from virtual format to native or
disk format
• VMM also needs to provide access to network attached storage
(just networking) and other disk images, disk partitions, disks, etc
OS Component – Live Migration
• Taking advantage of VMM features leads to new functionality not found on general
operating systems such as live migration
• Running guest can be moved between systems, without interrupting user access to
the guest or its apps
• Very useful for resource management, maintenance downtime windows, etc
1. The source VMM establishes a connection with the target VMM
2. The target creates a new guest by creating a new VCPU, etc
3. The source sends all read-only guest memory pages to the target
4. The source sends all read-write pages to the target, marking them as clean
5. The source repeats step 4, as during that step some pages were probably
modified by the guest and are now dirty
6. When cycle of steps 4 and 5 becomes very short, source VMM freezes guest,
sends VCPU’s final state, sends other state details, sends final dirty pages, and
tells target to start running the guest
• Once target acknowledges that guest running, source terminates guest
Live Migration of Guest Between Servers
Examples - VMware
VMware Workstation runs on x86, provides VMM for
guests
Runs as application on other native, installed host
operating system -> Type 2
Lots of guests possible, including Windows, Linux, etc
all runnable concurrently (as resources allow)
Virtualization layer abstracts underlying HW, providing
guest with is own virtual CPUs, memory, disk drives,
network interfaces, etc
Physical disks can be provided to guests, or virtual
physical disks (just files within host file system)
VMware Workstation Architecture
Examples – Java Virtual Machine
Example of programming-environment virtualization
Very popular language / application environment invented by Sun
Microsystems in 1995
Write once, run anywhere
Includes language specification (Java), API library, Java virtual machine (JVM)
Java objects specified by class construct, Java program is one or more
objects
Each Java object compiled into architecture-neutral bytecode output (.class)
which JVM class loader loads
JVM compiled per architecture, reads bytecode and executes
Includes garbage collection to reclaim memory no longer in use
Made faster by just-in-time (JIT) compiler that turns bytecodes into native
code and caches them
The Java Virtual Machine
Run a Virtual Machine
Need a virtualization software
Only a virtualization software can "imitate" the hardware. It
manages the Virtual Machines, so we normally call it virtual machine
manager.

Open-Source virtualization software

VirtualBox

Commercial virtualization software

VMware workstation $189+tax


Why not use a free one?
• Download at http://www.virtualbox.org/wiki/Downloads
Windows(.exe)
Click "VirtualBox 4.0.2 for Windows hosts x86/amd64"
Ubuntu(.deb)
Click "VirtualBox 4.0.2 for Linux hosts"
Click "Ubuntu 10.04 LTS("Lucid Lynx") i386"

• Remember where you have saved the software package

• Double click the package and Click "Install package"

or
Go to
System->Administration->Synaptic Package Manager->virtualbox-ose
Prepare for a VM
• An OS Installation CD or DISC image(.iso)
Download Linux ISO from http://mirror.clarkson.edu/distributions.html

• Enough free disk space on your computer


At least 8Gigabytes free

• Enough memory on your computer


Recommend at least 2G for the system, 1G for a VM

• VirtualBox Installed in your system


Step 1: Create a VM
Go to Applications->System Tools-> Oracle VM VirtualBox

"New"
Step 2: Specify a VM

Configure a VM's hardware specification


1. Machine name

2. Memory size
At most, half of the physical machine's RAM size

3. Disk size
Less than the free space on the physical machine disk
Step 2.3.1: Disk Configuration
Step 2.3.2: Disk Configuration
Step 2.3.3: Disk Configuration
Step 3: Insert an Installation CD
Install a installation disc image (.iso)
choose a virtual cd/dvd disc file...

OR Insert an installation CD in DVD-ROM


Step 3: Run a VM
"Start"

Friendly Reminder: Next time, when you run this VM


Remember to remove the installation CD/ CD image from the VM
Implementation Example
VMware® Server
NETLAB+® Concept

⚫ Remote Lab Solution


⚫ Classroom Lecture Tool
⚫ 7x24 World Wide Web Lab Access
⚫ Remote PC Support (2005)
⚫ Lab & Account Management
⚫ Assessment & Data Collection
⚫ Custom Topology & Lab Design
What is a Virtual Machine (VM)
• Software on host instead of physical hardware
• Hardware resources allocated from the physical host
Virtual Machines

Win XP Linux

VMware
Host
VMware Server

Windows Server 2003

CPU Memory Disk NIC


Download VMware Server (Free)
– http://www.vmware.com/download/server/
Register for S/N (Free)
• Make sure to write down Serial Number (not
emailed)
Benefits & Usage for Academies
• Benefits of VMware Server and Virtual Machines (VM)
– Free Virtualization: http://www.vmware.com/products/server/
– Revert Snapshot: return PC to clean state for next student’s lab
time
– Users can have administrative privileges on a VM

• Additional Benefits with NETLAB+®


– Integrates with VMware API to provide VM automation for
labs
– Users may Power On/Off, Revert (scrub) a VM from web
interface
– Technical Support available
Academy Example
– VMnet: virtual switch that can interconnect 1 or
more virtual adapters
– VMnet’s can connect to one real adapter or
VLAN interface on host
Virtual Adapter
Virtual Machines

PCID=12 PCID=15 Real Adapter


WinXP Linux

VMnet5

VMnet7
PCID=7
WinXP
VMware GSX
Host
Academy Example (cont.)
– Virtual network interfaces on a VM can be tied to real networks
in lab exercises (requires 802.1q NIC on the VMware server)
Virtual Adapter
Virtual Machines

Intel 802.1q NIC


PC_1 IS_1
802.1q Trunk

Any Reserved Port

VMnet3 VLAN 152 Control Switch


BB
VMnet5 VLAN 156

VMnet4
VLAN 155

PC_2 IS_2 VMware GSX


Host

VLAN 152

R1
VLAN 150
VLAN 156

RBB
VLAN 153
VLAN 155

R2
NETLAB Academy Edition ®

– Access to VM is proxied through NETLAB & VMware servers


(simple web interface with built-in viewer based on Java; only
2 TCP ports) POD

NETLAB+
Remote PC
Java Viewer
E0 E0 E0 E0

VMware VM1 VM2 VM3 VM4


Host VNC 5901 VNC 5902 VNC 5903 VNC 5904

VMware Server
Windows Server 2003

OUTSIDE INSIDE
INTERFACE INTERFACE
N D G
TCP 902
NETLAB CONTROL
TCP 23 TCP 59XX PLANE
VNC PROXY

VNC (keyboard + video + mouse) API (status, on, off, revert)


Minimum Host Requirements
– http://www.vmware.com/pdf/server_admin_manual.pdf (page
5)
– 4 VM’s concurrently running per processor (recommended
max)
• Standard x86 based server with up to 16 processors
• 733MHz or faster compatible x86 processor (Intel or AMD; see
above guide)
• Memory: 512MB (min. for host); add memory for each guest O/S
installed
• Memory: 64MB max for hosts that support large memory
• Hard Disk: 200-250MB free disk space (min. for host)
• Hard Disk: additional space required for each guest O/S with
applications
• NIC: Static IP address for your host machine (recommended)
– Ability to install a wide variety of guest O/S’s and applications
VMware Host Example (NETLAB AE)
– http://www.netdevgroup.com/ae/vmware.htm
VMware Host Requirement Tips
• DO NOT Over-Cycle a single VMware Host
– 4 VM’s running concurrently per single-core processor
– Dual-Core Processor recommended

• DO NOT Over-Allocate Memory and Disk Space


– Plan ahead and divide host resources evenly

• DO NOT Over-Build a single VMware Host


– Spread resources over multiple VMware Hosts
– VMnet limitation (10 VMnet’s per Windows host)
Installing VMware Server
– An installation wizard will guide you through the product
installation
– Custom Setup: removing VMware Management Interface
(overhead)

126
VMware Server Console
– Centralized management with the ability to run
several VM’s simultaneously
Creating Virtual Machines
– Step-by-step wizard for easy installation
Virtual Machine Configuration
– Custom has more flexibility (set memory and
access rights)
Select Guest O/S
– Variety of O/S’s running on same host
Naming Convention
– Choose VM name carefully (renaming VM later
may not succeed)

Examples:
1) POD_x PC_y
2) Server_x VM_y
Allowing Access to VM
– Allow all users to see and use a VM (instead of
private to creator)
Options for Running VM
• File system permissions of VM will be Local
system
Virtual Processor Options
– One processor recommended on VM’s
Memory for VM
– Recommendations for
Minimum/Optimum/Maximum
Virtual Networking Options
• “Use bridged networking” to bind VM’s VLAN
to VMnet
Create New Virtual Disk
– Create a new .vmdk partition (Virtual Machine
Disk Format)
Virtual Disk Capacity
– Allow virtual disk to dynamically grow (set the
maximum capacity)
Finish VM
– Do not change the .vmdk filename (no value
add)
VM Console
– Use console to boot virtual machine and install
guest O/S (CD-ROM)
Virtual CD-ROM
– Shared from host (disable so VM’s will not fight for same
resource)
– You may point to an ISO file to boot or run an application (or
O/S)
VM Snapshots
– Always save your work often (especially in early stages)
– Before and after (Windows Security Pack installations)
Installing VM Tools
– The equivalent of Virtual Machine Drivers
(required)
Installing VM Tools
– Each VM needs these drivers installed for enhanced
functionality
Copying VM’s
– There is no clone button (but you can copy VMDK hard
drive file)
– Create a new VM with same properties (proper Windows
licensing)
VM Copy Steps
– Create one good virtual machine with guest O/S and VM
Tools
– Use VM Wizard to create a new VM (make sure to use
same hard drive partitioning size/scheme)
– Instead of installing new VM guest O/S and VM Tools,
you can use the VMDK file in previous VM directory
– Make sure to copy / paste (do not cut, move or use
existing VMDK for new VM)
– You will want to change new VM’s guest O/S computer
name
Creating VLAN Adapters
– Intel Advanced Network Services Protocol (driver for Intel based
NIC)
– Be sure to uncheck TCP/IP and Client for MSN for each VLAN
VM Network Connection
– Choose Custom Specific VMnet (10 available for
Windows hosts)
Binding VLAN to VMnet
– Bind VLAN adapter to custom VMnet using Virtual Network
Editor
Adding Virtual Hardware
– Adding a USB controller is simple (Windows 2003
recommended)
– VM support for USB 1.1 (disable USB 2.0 from host BIOS)
– Install USB drivers on VM’s
USB Applications
– Wireless USB Adapter (Linksys WUSBF54G and WUSB54GC)
NETLAB+ & VMware API
– NETLAB user on Windows host (used to control
VM via API)
Directory Permission for API User
– NETLAB user must have full access to Virtual
Machines <dir>
VM Screen Resolution
– 32-bit color, 800x600 recommended (1024x768
supported in viewer)
VM System Properties
– Set Visual Effects for best performance (enhanced
experience)
VMX Configuration File
– Adding VNC support (Remove Java Viewer has
built-in client)
Take A Final Snapshot
– Adjust Snapshot setting (Ask me) and save the
final copy
NETLAB AE PODS
– NETLAB AE pods that support VM’s (2 custom pods of your choice)
Any Questions?

You might also like