ICTNWK559 Presentation Handout
ICTNWK559 Presentation Handout
Evaluate system
requirements
http://www.vmware.com/img/serverconsolidation.jpg
Non-virtualized Data Centers
• Too many servers for too little work
s3
s2 s1
– 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
Time
Virtualization Logic
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
Hardware
HardV Server Virtualization
• Microsoft Virtual Server
• Citrix XenServer
Applications Applications
Virtual
Guest OS Guest OS
(Windows) (Linux)
Hardware
HardV Server Virtualization Architecture
Applications Applications Applications
Hardware
HardV Server Virtualization Architecture
Applications Applications Applications
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)
• 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
• < $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.
VirtualBox
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
"New"
Step 2: Specify a VM
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...
Win XP Linux
VMware
Host
VMware Server
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
VMnet4
VLAN 155
VLAN 152
R1
VLAN 150
VLAN 156
RBB
VLAN 153
VLAN 155
R2
NETLAB Academy Edition ®
NETLAB+
Remote PC
Java Viewer
E0 E0 E0 E0
VMware Server
Windows Server 2003
OUTSIDE INSIDE
INTERFACE INTERFACE
N D G
TCP 902
NETLAB CONTROL
TCP 23 TCP 59XX PLANE
VNC PROXY
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?