4 CIS Module 3_VDC_Compute
4 CIS Module 3_VDC_Compute
4 CIS Module 3_VDC_Compute
VIRTUALIZED DATA
CENTER – COMPUTE
Copyright © 2011 EMC Corporation. All Rights Reserved. Virtualized Data Center – Compute 2
Virtualized Data Center
Transforming a Classic Data Center Virtualized Data Center (VDC)
(CDC) into a Virtualized Data Center
(VDC) requires virtualizing the core
elements of the data center. Virtualize Network
Virtualize Storage
Virtualize Compute
Copyright © 2011 EMC Corporation. All Rights Reserved. Virtualized Data Center – Compute 3
Module 3: Virtualized Data Center –
Compute
Lesson 1: Compute Virtualization Overview
Topics covered in this lesson:
• Drivers for compute virtualization
• Types of hypervisor
• Benefits of compute virtualization
Copyright © 2011 EMC Corporation. All Rights Reserved. Virtualized Data Center – Compute 4
Compute Virtualization
Compute Virtualization
Copyright © 2011 EMC Corporation. All Rights Reserved. Virtualized Data Center – Compute 5
Need for Compute Virtualization
Hypervisor
x86 Architecture
x86 Architecture
Copyright © 2011 EMC Corporation. All Rights Reserved. Virtualized Data Center – Compute 6
Hypervisor
Hypervisor
Copyright © 2011 EMC Corporation. All Rights Reserved. Virtualized Data Center – Compute 7
Types of Hypervisor
APP
Hypervisor
Hypervisor
Copyright © 2011 EMC Corporation. All Rights Reserved. Virtualized Data Center – Compute 8
• Hypervisors are categorized into two types: hosted hypervisor
and bare-metal hypervisor.
Type 1 (Bare-metal hypervisor): In this type, the hypervisor is
directly installed on the x86 based hardware. Bare-metal
hypervisor has direct access to the hardware resources. Hence, it
is more efficient than a hosted hypervisor.
Type 2 (Hosted hypervisor): In this type, the hypervisor is installed
and run as an application on top of an operating system. Since it
is running on an operating system, it supports the broadest
range of hardware configurations.
• A hypervisor is the primary component of virtualization that
enables compute system partitioning (i.e. partitioning of CPU
and memory). In this course, we will focus on type 1 hypervisors
because it is most predominantly used within Virtualized Data
Center (VDC).
Copyright © 2011 EMC Corporation. All Rights Reserved. Virtualized Data Center – Compute 9
Benefits of Compute Virtualization
• Server consolidation
• Isolation
• Encapsulation
• Hardware independence
• Reduced cost
Copyright © 2011 EMC Corporation. All Rights Reserved. Virtualized Data Center – Compute 10
Module 3: Virtualized Data Center –
Compute
Lesson 2: Compute Virtualization Techniques
Topics covered in this lesson:
• Requirements of x86 hardware virtualization
• Compute virtualization techniques
Copyright © 2011 EMC Corporation. All Rights Reserved. Virtualized Data Center – Compute 11
Requirements: x86 Hardware Virtualization
• An operating system (OS) is designed to run on a
bare-metal hardware and to fully own the
hardware Ring 3 User Apps
x86 architecture offer four levels of privilege
Ring 2
Ring 0, 1, 2, and 3
User applications run in Ring 3 Ring 1
OS run in Ring 0 (most privileged) OS
Ring 0
• Challenges of virtualizing x86 hardware
Requires placing the virtualization layer below the X86 Hardware
OS layer
Is difficult to capture and translate privileged OS
instructions at runtime
• Techniques to virtualize compute
Full, Para, and hardware assisted virtualization
Copyright © 2011 EMC Corporation. All Rights Reserved. Virtualized Data Center – Compute 12
Full Virtualization
• Virtual Machine Monitor (VMM) runs in
the privileged Ring 0
• VMM decouples guest operating system Ring 3 User Apps
Copyright © 2011 EMC Corporation. All Rights Reserved. Virtualized Data Center – Compute 13
Paravirtualization
• Guest operating system (OS) knows that it is
virtualized
Ring 3 User Apps
• Guest OS runs in Ring 0
• Modified guest OS kernel is used, such as Ring 2
Linux and OpenBSD Ring 1
• Unmodified guest OS is not supported, such Paravirtualized
Ring 0
as Microsoft Windows Guest OS
Hypervisor
Physical Machine
X86 Hardware
Copyright © 2011 EMC Corporation. All Rights Reserved. Virtualized Data Center – Compute 14
Hardware Assisted Virtualization
• Achieved by using hypervisor-aware CPU to
handle privileged instructions Ring 3 User Apps
Reduces virtualization overhead caused due to
full and paravirtualization Ring 2
CPU and Memory virtualization support is
Ring 1
provided in hardware
• Enabled by AMD-V and Intel VT technologies Ring 0 Guest OS
Physical Machine
X86 Hardware
Copyright © 2011 EMC Corporation. All Rights Reserved. Virtualized Data Center – Compute 15
Module 3: Virtualized Data Center –
Compute
Lesson 3: Virtual Machine
Topics covered in this lesson:
• Virtual machine (VM) files
• File systems that manage Virtual machine files
• Virtual machine hardware
• Virtual machine console
Copyright © 2011 EMC Corporation. All Rights Reserved. Virtualized Data Center – Compute 16
Virtual Machine
• From a user’s perspective, a
logical compute system
Runs an operating system (OS) and
application like a physical machine
Contains virtual components such
as CPU, RAM, disk, and NIC
• From a hypervisor’s perspective Hypervisor
Copyright © 2011 EMC Corporation. All Rights Reserved. Virtualized Data Center – Compute 17
Virtual Machine Files
Copyright © 2011 EMC Corporation. All Rights Reserved. Virtualized Data Center – Compute 19
Virtual Machine Hardware
RAM Keyboard
Copyright © 2011 EMC Corporation. All Rights Reserved. Virtualized Data Center – Compute 20
VM Hardware Components
Copyright © 2011 EMC Corporation. All Rights Reserved. Virtualized Data Center – Compute 22
Module 3: Virtualized Data Center –
Compute
Lesson 4: Resource Management
Topics covered in this lesson:
• Resource management and resource pool
• Share, limit, and reservation
• CPU and memory resource optimization techniques
Copyright © 2011 EMC Corporation. All Rights Reserved. Virtualized Data Center – Compute 23
Resource Management
Resource management
Copyright © 2011 EMC Corporation. All Rights Reserved. Virtualized Data Center – Compute 24
Resource Pool
Resource pool
Copyright © 2011 EMC Corporation. All Rights Reserved. Virtualized Data Center – Compute 25
Resource Pool Example
Copyright © 2011 EMC Corporation. All Rights Reserved. Virtualized Data Center – Compute 26
Share, Limit, and Reservation
• Parameters that control the resources consumed by a child
resource pool or a virtual machine (VM) are as follows:
Share
Amount of CPU or memory resources a VM or a child resource pool can have
with respect to its parent’s total resources
Limit
Maximum amount of CPU and memory a VM or a child resource pool can
consume
Reservation
Amount of CPU and memory reserved for a VM or a child resource pool
Copyright © 2011 EMC Corporation. All Rights Reserved. Virtualized Data Center – Compute 27
Optimizing CPU Resources
• Modern CPUs are equipped with multiple cores and hyper-
threading
Multi-core processors have multiple processing units (cores) in a
single CPU
Hyper-threading makes a physical CPU appear as two or more
logical CPUs
• Allocating a CPU resource efficiently and fairly is critical
• Hypervisor schedules virtual CPUs on the physical CPUs
• Hypervisors support multi-core, hyper-threading, and CPU load-
balancing features to optimize CPU resources
Copyright © 2011 EMC Corporation. All Rights Reserved. Virtualized Data Center – Compute 28
Multi-core Processors
VM with VM with VM with
one CPU two CPUs four CPUs
Virtual CPU
Virtual
Physical
Core
Socket
Copyright © 2011 EMC Corporation. All Rights Reserved. Virtualized Data Center – Compute 29
Hyper-threading
VM with VM with VM with
one CPU two CPUs one CPU
• Makes a physical CPU appear as
two Logical CPUs (LCPUs)
Enables operating system (OS) to
schedule two or more threads
simultaneously
• Two LCPUs share the same
physical resources
While the current thread is stalled,
CPU can execute another thread
LCP LCP
• Hypervisor running on a hyper- U U
Copyright © 2011 EMC Corporation. All Rights Reserved. Virtualized Data Center – Compute 30
CPU Load Balancing
VM with VM with VM with
one CPU one CPU one CPU
LCP LCP
U U
LCP LCP
U U
Copyright © 2011 EMC Corporation. All Rights Reserved. Virtualized Data Center – Compute 31
Optimizing Memory Resource
• Hypervisor manages a machine’s physical memory
Part of this memory is used by the hypervisor
Rest is available for virtual machines (VMs)
• VMs can be configured with more memory than physically
available, called ‘memory over commitment’
Memory optimization is done to allow over commitment
• Memory management techniques are Transparent page sharing,
memory ballooning, and memory swapping
Copyright © 2011 EMC Corporation. All Rights Reserved. Virtualized Data Center – Compute 32
Transparent Page Sharing
• Hypervisor detects identical memory pages of virtual machines (VMs) and
maps them to same physical page
Read-only when shared
• For writes, hypervisor treats the shared pages as copy-on-write
• Attempts to write on shared page
Generates minor page fault
Creates private copy after write and remaps the memory
Private copy
Physical Memory
Memory Page
Copyright © 2011 EMC Corporation. All Rights Reserved. Virtualized Data Center – Compute 33
Memory Ballooning
Copyright © 2011 EMC Corporation. All Rights Reserved. Virtualized Data Center – Compute 35
Module 3: Virtualized Data Center –
Compute
Lesson 5: Physical to Virtual Conversion
Topics covered in this lesson:
• Converter components
• Conversion options
• Conversion process
• Conversion considerations
Copyright © 2011 EMC Corporation. All Rights Reserved. Virtualized Data Center – Compute 36
Physical to Virtual Machine (P2V) Conversion
P2V Conversion
Copyright © 2011 EMC Corporation. All Rights Reserved. Virtualized Data Center – Compute 37
Benefits of P2V Converter
• Reduces time needed to setup new virtual machine (VM)
• Enables migration of legacy machine to a new hardware without
reinstalling operating system (OS) or application
• Performs migration across heterogeneous hardware
Copyright © 2011 EMC Corporation. All Rights Reserved. Virtualized Data Center – Compute 38
Components of P2V Converter
• There are three key components:
Converter server
Is responsible for controlling conversion process
Is used for hot conversion only (when source is running its OS)
Pushes and installs agent on the source machine
Converter agent
Is responsible for performing the conversion
Is used in hot mode only
Is installed on physical machine to convert it to virtual machine (VM)
Converter Boot CD
Bootable CD contains its operating system (OS) and converter
application
Converter application is used to perform cold conversion
Copyright © 2011 EMC Corporation. All Rights Reserved. Virtualized Data Center – Compute 39
Conversion Options
• Hot conversion
Occurs while physical machine is running
Performs synchronization
Copies blocks that were changed during the initial cloning period
Performs power off at source and power on at target virtual
machine (VM)
Changes IP address and machine name of the selected machine, if
both machines must co-exist on the same network
• Cold conversion
Occurs while physical machine is not running OS and application
Boots the physical machine using converter boot CD
Creates consistent copy of the physical machine
Copyright © 2011 EMC Corporation. All Rights Reserved. Virtualized Data Center – Compute 40
Hot Conversion Process
Converter server
running converter
software
Agent
Copyright © 2011 EMC Corporation. All Rights Reserved. Virtualized Data Center – Compute 41
Hot Conversion Process (contd.)
Converter server
running converter
software
Reconfiguration
Agent
Powered-on
Source Physical Source
Snapshot
Machine Volume
Copyright © 2011 EMC Corporation. All Rights Reserved. Virtualized Data Center – Compute 42
Cold Conversion Process
Powered-on
Source Physical Source
Volume
Machine
Destination Physical
Machine (Running
Hypervisor)
Copyright © 2011 EMC Corporation. All Rights Reserved. Virtualized Data Center – Compute 43
Cold Conversion Process (contd.)
Converter boot CD
Reconfiguration
Powered-on
Source Physical Source Step 3: Clones source
Machine Volume disk to VM disk
Destination Physical
Machine (Running
Hypervisor)
Copyright © 2011 EMC Corporation. All Rights Reserved. Virtualized Data Center – Compute 44
P2V Conversion: Considerations
• Some hardware-dependent drivers and mapped drive letters
might not be preserved
• Source machine configuration remains unchanged such as:
Operating system (OS) configuration, such as computer name,
security ID, user accounts, profiles, and preferences
Applications and data files
Volume serial number for each disk partition
• Source and target machines will have the same identities
Running them on the same network might result in conflicts
• Applications that depend on characteristics of the hardware may
not work
Copyright © 2011 EMC Corporation. All Rights Reserved. Virtualized Data Center – Compute 45
MODULE 3 QUIZ
Copyright © 2011 EMC Corporation. All Rights Reserved. Virtualized Data Center – Compute 46
Check Your Knowledge
1. Explain two types of hypervisor.
2. What are the challenges of x86 hardware virtualization?
3. Explain the function of each virtual machine (VM) file.
4. Explain the three memory optimization techniques.
5. What are the two options to convert physical to VM?
Copyright © 2011 EMC Corporation. All Rights Reserved. Virtualized Data Center – Compute 47