FusionCompute V100R003C10 Computing Virtualization
FusionCompute V100R003C10 Computing Virtualization
Computing
Virtualization
www.huawei.com
Copyright © 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 3
Contents
1. Introduction to Virtualization
1. Development Background
2. Working Principles
Copyright © 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 4
What Is Virtualization?
Before After
APP APP APP APP APP APP APP APP APP APP APP APP
APP APP APP
Win Linux Win Linux Win Linux Win Linux Win Linux Win Linux
Resource pool
Virtualization layer Virtualization layer Virtualization layer
Copyright © 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 5
Origin
The virtualization technology applied on mainframe computers in 1960s.
History
Logic partition was used on midrange computers in 1999.
The x86 platform virtualization technology began to appear in 2000.
The x86 platform virtualization technology is used on servers in 2001.
The CPU processes data much faster than that required by software.
INTEL and AMD add virtualization commands to the CPU.
Impetus Enterprises need to reduce costs.
Environment protection becomes increasingly urgent.
Service pressure consistently increases.
Copyright © 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 6
Benefits
1. Hardware utilization is improved.
2. Power consumption is reduced.
3. IT O&M efficiency is enhanced so less system administrators are required.
4. The OS and hardware are decoupled.
Partition Isolation
Multiple VMs can run on a single VMs that run on the same server
physical server. are isolated from each other.
Copyright © 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 7
Concepts
Physical Guest OS:
VM
machine
OS installed on a VM
Host OS Guest OS Guest OS Guest machine:
VM VM Hypervisor:
(guest machine) (guest machine)
Virtualized software layer/virtual
machine monitor (VMM)
VM monitor
(Hypervisor) Host OS:
Physical server
Copyright © 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 8
Mainstream Virtualization Types
Hosted Bare-metal Hybrid
OS virtualization
virtualization virtualization virtualization
Application Application Application Application Application Application
Application Application Application
OS System System
service template base template base
OS OS management
OS OS OS
Virtualization layer console
Virtual container Virtual storage
Bare-metal virtualization and hybrid virtualization are the virtualization architecture development
trends.
Copyright © 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 9
Contents
1. Introduction to Virtualization
1. Development Background
2. Working Principles
Copyright © 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 10
CPU Virtualization
CPU Shared by VMs
This feature uses the mechanism similar to the traditional OS, that is, use the
interruption by the timer expiration to trigger the privileged instructions trapped in the
VMM. Then, the system schedules CPU usages according to scheduling mechanism.
OS
Instruction 2 Instruction 1
VMM
Instruction (1)
Physical CPU
Copyright © 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 11
Memory Virtualization
Memory virtualization manages physical memory of computers in
a centralized manner and then allocates the memory resources to
multiple VMs.
Guest virtual memory
VM1 VM2 VM3 VM4
1
2
3
4
5
Virtual machine monitor (VMM)
5
1
2
3 4
Machine physical memory
Copyright © 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 12
I/O Virtualization
VMs reuse limited peripheral
Domain 0 Domain U resources:
The VMM intercepts the access request
User Control
sent by the guest OS to the device and
mode panel User mode simulates device's actions using
software.
The front-end drive forwards data to the
Kernel Kernel back-end drive through the VMM's
interface.
Back-end Front
The back-end drive processes VM data
Device drive
drive drive
in different time segments and
channels.
Copyright © 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 13
Virtualization Supported by INTEL
Hardware (Expansion)
VT-x: Virtualization Technology for IA-32
Copyright © 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 14
Contents
1. Introduction to Virtualization
2. VM HA
3. CPU QoS
4. Memory overcommitment
Copyright © 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 15
Working Principles of VM Live Migration
Definition:
VM live migration is to migrate a running VM to a specified host on the same site.
Working principles:
Transmits VM configurations and device information to the target host.
Transmits VM memory.
Synchronizes the initial memory and memory defragmentation upon the
memory migration to the target host.
Pauses the original VM and transmit the VM status.
Pauses the VM to be migrated on the original host.
Transmits latest memory changes to the target host.
Resumes the target VM.
Resumes the VM on the target host and stop the VM on the original host.
Copyright © 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 16
Cross-CPU VM Live Migration
Background
Live migration requires that CPUs of the original and target physical computers have the
same features or are compatible with each other. Otherwise, the live migration fails. The
Cross-CPU VM Live Migration feature is introduced to resolve the compatibility issue.
Working principles:
Based on the Intel Flex Migration technology, the hypervisor intercepts and modifies
CPUID instructions and returns responses. By doing so, the VM cannot sense changes
of CPUs in the same cluster. Therefore, the VM can be migrated to any host within the
cluster.
Application suggestions
In the host list, you can view the IMC mode with the highest level supported by each
host. Users can specify the cross-CPU migration mode in the cluster configuration or try
from the highest to the lowest levels. When a mode level passes the verification, this
level is the highest mode level supported by the cluster.
The cluster can only be set to a mode with a lower level. Therefore, the CPU generation
support capability between nodes cannot be too high during the cluster planning.
Otherwise, the overall performance deteriorates and resources are wasted.
Copyright © 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 17
Cross-CPU VM Live Migration
Application and Configuration
In the advanced settings of the
cluster, an option for enabling the
Incompatible Migration Cluster
(IMC) is added.
The following five baselines are
supported:
Merom
Penryn
Nehalem
Westmere
Sandy Bridge
Copyright © 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 18
Contents
1. Introduction to Virtualization
2. VM HA
3. CPU QoS
4. Memory overcommitment
Copyright © 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 19
VM HA
Definition: If a server or a VM fails, the system automatically migrates the
VM to another available server.
1. Fault types of the VM: host power-off, restart, and breakdown
Working principle:
1. A VM or a host is faulty.
2. The management node queries the VM status and finds that the VM is faulty.
3. The management node confirms that the faulty VM has enabled the HA function and starts
the VM on an available host according to the stored VM information (specifications and
volume).
4. After receiving the HA request, the host starts the VM on another host based on the VM
specification and volume information.
5. The host attaches the volumes (including user disks) of the VM from the source host to the
destination host.
Copyright © 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 20
Automatic Service Recovery
5 6
1 2 3 4 5 6
machine is faulty.
5' 5'
storage volume to this
node and start the VM.
Copyright © 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 21
Contents
1. Introduction to Virtualization
2. VM HA
3. CPU QoS
4. Memory overcommitment
Copyright © 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 22
CPU QoS
The hypervisor schedules CPUs in TDM mode according to configured
CPU parameters. By doing so, the hypervisor controls the percentage of
physical computing resources allocated to each VM, ensuring QoS.
CPU QoS parameters
Limit (MHz): specifies the maximum CPU resources that can be allocated to a VM. For
example, if a VM has one CPU and this parameter is set to 2000, a maximum of 2000
MHz CPU resources can be allocated to the VM.
Reserved (MHz): specifies the minimum CPU resources required by a VM. For example,
if a VM has one CPU and this parameter is set to 1000, the VM requires a minimum of
1000 MHz CPU resources.
Quota: specifies the CPU quota a VM can obtain in resource contention. The quota
indicates the relative priority or importance of a VM. For example, if the CPU quota of a
VM is twice that of another VM, this VM has the priority to consume the CPU resources as
twice as that of the other VM.
Copyright © 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 23
CPU QoS Application and Configuration
Copyright © 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 24
Contents
1. Introduction to Virtualization
2. VM HA
3. CPU QoS
4. Memory overcommitment
Copyright © 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 25
Definition of Memory Overcommitment
The memory overcommitment feature enables the total VM memory running on
the same host to be greater than the memory available on the host through the
application of virtualization technology (memory ballooning, zero page sharing,
and memory swapping), improving VM density and reducing the cost of a single
VM. For different VMs, such as the management VMs and service VMs, this
feature provides different QoS policies to meet customer's service requirements.
Virtualization
Host
Physical memory (8 GB)
Copyright © 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 26
Working Principle of the Memory
Overcommitment
Using overcommitment technologies (memory ballooning, zero page sharing, and memory
swapping), this feature enables a VM to promptly respond to memory access requests through the
proper scheduling, reducing the performance deterioration of the VM with memory overcommitment
enabled.
VM1 VM2
Idle
Idle
Memory
ballooning
Used
Used
Copyright © 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 27
Memory Overcommitment
Parameters
Memory overcommitment in a cluster
The cluster memory overcommitment is disabled by default. You can enable this function for
hosts in the cluster.
When the memory overcommitment function is disabled on a cluster, the memory
overcommitment does not take effect for all hosts in the cluster.
Copyright © 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 28
QoS Parameters for the Memory
Overcommitment
QoS parameters for the VM memory include the following:
Reserved (MB): indicates the minimum memory reserved for a VM. If Reserved (MB) is set
to 0, the system reserves the minimum required memory resources for the VM.
Quota: specifies the CPU quota a VM can obtain in resource contention. The quota
indicates the relative priority or importance of a VM. For example, if the CPU quota of a VM
is twice that of another VM, this VM has the priority to consume the CPU resources as twice
as that of the other VM.
Size: specifies the minimum memory resource required by a VM.
Copyright © 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 29
Relationship Between VM QoS and
Host Memory
Relationship between the VM
N
memory QoS and host memory
rese ot Res
e
rved GB rved 6
for V
IPs specifications:
The total memory reserved for VMs in
the host is less than or equal to the host
memory specifications.
Windows VM(6 GB) Linux VM (6 GB) The total limited memory for VMs in the
host can be greater than the host
memory specifications.
Virtualization
The quota for VMs on the host is not
limited.
Host
Copyright © 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 30
Contents
1. Introduction to Virtualization
2. VM HA
3. CPU QoS
4. Memory Overcommitment
Copyright © 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 31
Remote CD/DVD-ROM Mapping
With this feature, the local CD/DVD-ROM drive or ISO image can be remotely
accessed through the VM USB CD/DVD-ROM on the server.
Copyright © 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 32
Working Principle of Remote
CD/DVD-ROM Mapping
The virtual USB CD/DVD-ROM drive is used on the server, so that the local media
(CD/DVD-ROM drive, ISO image of the disk) can be remotely accessed.
Copyright © 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 33
Contents
1. Introduction to Virtualization
2. VM HA
3. CPU QoS
4. Memory Overcommitment
Copyright © 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 34
Principles of Dynamic Resource
Scheduling
Dynamic resource scheduling
Dynamic resource scheduling is to change the
number of resources used by a VM without
affecting VM services.
Resources that can be scheduled
include the following:
Number of CPUs, memory size, number of
NICs, and number of disks
Offline Online Adjustment and Online Adjustment and
Resource Type
Adjustment Effective upon Restart Effective Immediately
Supported by the competition
CPU Supported Supported
tests
Supported by the competition
Memory Supported Supported
tests
Common NIC Supported N/A Supported
iNIC Supported Not supported Not supported
Number of disks Supported N/A Supported
Disk size
(used in virtualization scenarios, Partially supported (for details,
Supported Supported
and the disk size can only be see the following remarks)
increased)
Copyright © 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 35
Dynamic Resource Scheduling and
Configuration
VM resources can be adjusted on the Hardware tab under VM and Template.
Copyright © 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 36
Contents
1. Introduction to Virtualization
2. VM HA
3. CPU QoS
4. Memory Overcommitment
Copyright © 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 37
Introduction to Computing
Resource Scheduling
What is computing resource scheduling?
This feature allows automatic adjustment for the layout of VMs deployed on
the host.
What functions does the computing resource scheduling provide?
Load-balancing of the host
Automated power management: The system automatically powers off the host
when the number of idle resources is huge and powers on the host when the
number of idle resources is insufficient.
Exclusiveness between VMs, and ensuring that VMs run on a group of hosts
What policies can be configured for the computing resource scheduling?
Load-balancing
Automated power management
Advanced scheduling rules
Copyright © 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 38
Computing Resource Scheduling:
Load Balancing
According to policies configured by users, the system balances CPU usages and
memory usages of normal nodes (properly communicate with the management
node and are not isolated) through VM live migration.
The load-balancing is performed at an interval of 50 minutes.
Copyright © 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 39
Computing Resource Scheduling:
Flowchart of Load Balancing
Collect
Collect CPU
CPU and
and memory
memory usages
usages ofof each
each node
node in
in the
the cluster.
cluster.
(for
(for 10
10 collection
collection periods)
periods)
Is
Is the
the standard
standard load
load
deviation
deviation of
sampling
of the
the node
node for
for at
at least
least five
five No
sampling points
points and
and the
the last
last
sampling
sampling point
point greater
greater than
than the
the initial
initial
threshold?
threshold?
Yes
Collect
Collect CPU
CPU and
and memory
memory usages
usages for
for VMs
VMs that
that can
can be
be
scheduled in the cluster.
scheduled in the cluster.
Calculate
Calculate the
the change
change of
of standard
standard load
load deviations
deviations for
for each
each VM
VM
migrated
migrated to
to other
other nodes
nodes in
in the
the cluster.
cluster.
Does
Does the
the standard
standard deviation
deviation caused
caused
by
by the
the migration
migration is
is less
less than
than 0?
0? No
Yes
Sort
Sort out
out migrations
migrations with
with largest
largest reduction
reduction of
of the
the standard
standard
deviation
deviation and
and update
update the
the standard
standard deviation.
deviation.
Yes
Is
Is the
the number
number of
of such
such migrations
migrations
greater
greater than
than 40?
40?
No
Add
Add such
such migrations
migrations toto the
the migration
migration queue.
queue. Complete
Complete
the
the scheduling
scheduling of
of this
this cluster
cluster and
and start
start aa next
next one.
one.
Copyright © 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 40
Computing Resource Scheduling:
Power Management Principle
Before the power management is After the power management is
implemented implemented
VM1
VM2 VM2
Copyright © 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 41
Computing Resource Scheduling:
Introduction to Load Balancing
Copyright © 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 42
Computing Resource Scheduling: Flowchart
of Automated Power Management
Start
Start
Collect
Collect CPU
CPU and
and memory
memory usages
usages of
of each
each node
node in
in Check
Check whether
whether the
the sampling
sampling point
point is
is overloaded,
overloaded,
the cluster.
the cluster. light,
light, or normal due to CPU or memory.
or normal due to CPU or memory.
(for
(for 10
10 collection
collection periods)
periods)
Is
Is the
the node
node heavy-
heavy-
Calculate
Calculate the
the light-loaded
light-loaded score
score of
of CPU
CPU and
and loaded?
loaded?
memory
memory usages
usages for
for each
each sampling
sampling point.
point. Yes
No
Calculate Is
Is the
the node
node light-loaded? Power
Power on
on the
the host
Calculate the
the heavy-loaded
heavy-loaded score
score of
of CPU
CPU and
and light-loaded? host
memory No and
and select an
select
memory usages for each sampling point.
usages for each sampling point. an
appropriate
appropriate node
node to
to
Yes migrate VMs.
migrate VMs.
Select
Select an
an appropriate
appropriate node,
node, migrate
migrate VMs
VMs to
to the
the
node, and power off the original node.
node, and power off the original node.
End
End
Copyright © 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 43
Computing Resource Scheduling:
Introduction to Advanced Scheduling Rules
Copyright © 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 44
Computing Resource Scheduling: Advanced
Scheduling Rule Configuration —
Exclusiveness Between VMs
Enter the cluster and chose Set Computing Resource Scheduling > Rule
Management, click Add, and choose Keep VMs mutually exclusive for Type.
The following dialog box is displayed.
Copyright © 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 45
Computing Resource Scheduling:
Advanced Scheduling Rules
Configuration — VMs to Hosts
Preparations: A host group and a VM group have been created.
Creation rule: Enter the cluster and chose Set Computing Resource Scheduling
> Rule Management, click Add, and choose VMs to hosts for Type. The
following dialog box is displayed.
Copyright © 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 46
Computing Resource Scheduling:
Example of Advanced Scheduling Rules
VM1
Copyright © 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 47
Thank you
www.huawei.com