Live Migration of Virtual Machines in Cloud: Ashima Agarwal, Shangruff Raina
Live Migration of Virtual Machines in Cloud: Ashima Agarwal, Shangruff Raina
Live Migration of Virtual Machines in Cloud: Ashima Agarwal, Shangruff Raina
ISSN 2250-3153
Abstract- Migration of a virtual machine is simply moving the reason why the availability and security of applications
VM running on a physical machine (source node) to another running in a virtual environment is far
physical machine (target node). It is done as, while the VM is 2. Encapsulation: A virtual machine is essentially a
running on the source node, and without disrupting any active software container that bundles or ―encapsulates‖ a
network connections, even after the VM is moved to the target complete set of virtual hardware resources, as well as an
node. It is considered ―live‖, since the original VM is running, operating system and all its applications, inside a
while the migration is in progress. Huge benefit of doing the live software package. Encapsulation makes virtual
migration is the very small (almost zero) downtime in the order machines incredibly portable and easy to manage.
of milliseconds. 3. Hardware Independence: Virtual machines are
There exists a model in which the load is balanced among the completely independent from their underlying physical
servers according to their processor usage or their IO usage and hardware. For example, you can configure a virtual
keeping virtual machines zero downtime. To increase the machine with virtual components (eg, CPU, network
throughput of the system, it is necessary that the virtual machines card, SCSI controller) that are completely different from
are load balanced statically, i.e. the load is distributed to each the physical components that are present on the
part of the system in proportion to their computing IO capacity. underlying hardware. Virtual machines on the same
To migrate a virtual machine from one physical host to physical server can even run different kinds of operating
another, the control of virtual machines is converted to the systems (Windows, Linux, etc).
management of services in Red Hat Cluster Suite. This creates a
high availability and load balancing cluster services, to migrate a
virtual machine from one physical host to another. II. WHAT IS LIVE MIGRATION?
Software services, file systems and network status can be Live migration [3] is the movement of a virtual machine from
monitored and controlled by the cluster suite, services and one physical host to another while continuously powered-up.
resources can be failed over to other network nodes in case of When properly carried out, this process takes place without any
failure. The cluster suite forcibly terminates a cluster node's noticeable effect from the point of view of the end user. Live
access to services or resources to ensure the node and data is in a migration allows an administrator to take a virtual machine
known state. The node is terminated by removing power or offline for maintenance or upgrading without subjecting the
access to the shared storage. system's users to downtime.
When a VM is running a live service it is important that this
I. INTRODUCTION transfer occurs in a manner that balances the requirements of
www.ijsrp.org
International Journal of Scientific and Research Publications, Volume 2, Issue 6, June 2012 2
ISSN 2250-3153
are some techniques to reduce live migration down-time such as allowing separation of hardware and software considerations, and
using probability density function of memory change.[3] consolidating clustered hardware into a single coherent
Pull phase: The new VM executes and, if it accesses a page management domain. If a physical machine needs to be removed
that has not yet been copied, this page is faulted in (.pulled.) from service an administrator may migrate OS instances
across the network from the source VM. VM migration is including the applications that they are running to alternative
initiated by suspending the VM at the source. With the VM machine(s), freeing the original machine for maintenance.
suspended, a minimal execution state of the VM (CPU, registers,
and non-pageable memory) is transferred to the target. The VM How is live migration achieved?
is then resumed at the target, even though the entire memory By using a pre-copy approach in which pages of memory are
state of the VM has not yet been transferred, and still resides at iteratively copied from the source machine to the destination
the source. At the target, when the VM tries to access pages that host, all without ever stopping the execution of the virtual
have not yet been transferred, it generates page-faults, which are machine being migrated. Page level protection hardware is used
trapped at the target and redirected towards the source over the to ensure a consistent snapshot is transferred, and a rate-adaptive
network. Such faults are referred to as network faults. Source algorithm is used to control the impact of migration traffic on
host responds to the network-fault by sending the faulted page. running services. The final phase pauses the virtual machine,
Since each page fault of the running VM is redirected towards copies any remaining pages to the destination, and resumes
the source, it can degrade the applications running inside the execution there. We eschew a `pull' approach which faults in
VM. However, when pure demand-paging accompanied with the missing pages across the network since this adds a residual
techniques such as pre-paging can reduce this impact by a great dependency of arbitrarily long duration, as well as providing in
extent. Live migration is widely used in virtualization ready data general rather poor performance.
centers and enterprise IT departments. It separates software’s The logical steps that we execute when migrating an OS are
from physical servers, and provides desirable abilities such as summarized in Figure 3. We take a conservative approach to the
online server maintenance, dynamic load balancing, and etc. management of migration with regard to safety and failure
Live migration can be applied in both local area network handling. Although the consequences of hardware failures can be
(LAN) environment and wide area network (WAN) environment. severe, our basic principle is that safe migration should at no
Live migration in LAN environment is simpler, because live time leave a virtual OS more exposed to system failure than
migration process avoids virtual storage migration by sharing a when it is running on the original single host. To achieve this, we
network storage. Furthermore, live migration in LAN skips the view the migration process as a transactional interaction between
migration of network topology, and the migration process only the two hosts involved:
needs to broadcast an unsolicited ARP reply from the migrated
VM, in order to advertise the MAC relocation. Stage 0 Pre-Migration: We begin with an active VM on
physical host A. To speed any future migration, a target host may
be preselected where the resources required to receive migration
III. SEAMLESS LIVE MIGRATION will be guaranteed.
When down-time of a VM during a live migration is zero or a
few millisecond which is not noticeable by end user, it is called a Stage 1 Reservation: A request is issued to migrate an OS from
seamless live migration. Otherwise, the end user will feel a small host A to host B. We initially confirm that the necessary
or relatively long glitch in the service. resources are available on B and reserve a VM container of that
size. Failure to secure resources here means that the VM simply
What is the purpose of live migration? continues to run on A unaffected.
Migrating an entire OS and all of its applications as one unit
allows us to avoid many of the difficulties faced by process-level Stage 2 Iterative Pre-Copy: During the first iteration, all pages
migration approaches. With virtual machine migration, on the are transferred from A to B. Subsequent iterations copy only
other hand, the original host may be decommissioned once those pages dirtied during the previous transfer phase.
migration has completed. This is particularly valuable when
migration is occurring in order to allow maintenance of the Stage 3 Stop-and-Copy: We suspend the running OS instance at
original host. A and redirect its network traffic A to B. As described earlier,
Secondly, migrating at the level of an entire virtual machine CPU state and any remaining inconsistent memory pages are
means that in-memory state can be transferred in a consistent and then transferred. At the end of this stage there is a consistent
(as will be shown) efficient fashion. This applies to kernel- suspended copy of the VM at both A and B. The copy at A is still
internal state (e.g. the TCP control block for a currently active considered to be primary and is resumed in case of failure.
connection) as well as application-level state, even when this is
shared between multiple cooperating processes. Stage 4 Commitment Host B indicates to A that it has
Thirdly, live migration of virtual machines allows a separation successfully received a consistent OS image. Host A
of concerns between the users and operator of a data center or acknowledges this message as commitment of the migration
cluster. Users have `carte blanche' regarding the software and transaction: host A may now discard the original VM, and host B
services they run within their virtual machine, and need not becomes the primary host.
provide the operator with any OS-level access at all. Live OS
migration is a extremely powerful tool for cluster administrators,
www.ijsrp.org
International Journal of Scientific and Research Publications, Volume 2, Issue 6, June 2012 3
ISSN 2250-3153
Stage 5 Activation: The migrated VM on B is now activated. DLBA (Distributed load balancing algorithm): It runs on each
Post-migration code runs to reattach device drivers to the new physical host separately and dynamically migrates virtual
machine and advertise moved IP addresses. machines of local host to other physical hosts according to
resource uses.
www.ijsrp.org
International Journal of Scientific and Research Publications, Volume 2, Issue 6, June 2012 4
ISSN 2250-3153
service can run on only one cluster node at a time to maintain is part of VDE switch software suite and implements package
data integrity. Failover priority can be specified in a failover transmission, encryption and authentication functions.
domain. Specifying failover priority consists of assigning a In figure 10 below, when vm2 belonging to VLAN1 migrates
priority level to each node in failover domain. The priority level from Host0 to Host1, we need to delete virtual network device
determines the failover order — determining which node that a veth2.0 from bridge br1 on Host0. If there were no other network
cluster service should fail over to. If you do not specify failover devices in bridge br1 except tap1 and veth2.0, we also would
priority, a cluster service can fail over to any node in its failover needed to unbind VLAN1 to untagged port 2, thus port 2 could
domain. Also, if a cluster service is restricted to run only on be used by other VLAN in the future. On the target Host1,
nodes of its associated failover domain. (When associated with because VLAN1 has existed, before Red Hat Cluster Suite starts
an unrestricted failover domain, a cluster service can start on any vm2, we only need create a pair of virtual network devices on
cluster node in the event no member of the failover domain is Host1 for vm2: eth0 and veth2.0 (eth0 in virtual machine vm2
available.) and veth2.0 on the Host1), then add veth2.0 into the bridge br0.
If there were not VLAN1 on
VDE (Virtual Distributed Ethernet) Host1, we would need to find an untagged port in VDE switch
and bind it to VLAN1, also create the corresponding bridge br0.
Introduction
The acronym VDE [6] is self explaining: it is a Virtual
network because it is built completely in software, it is
Distributed as parts of the same network can run on different
physical (real) computers and it is an Ethernet as the entire
virtual software structure is able to forward, dispatch and route
plain Ethernet packets. The main features of VDE are the
following:
With VDE it is also possible to integrate real computers in the Advantages of Live Migration
emulated network. When a real computer is connected to a VDE
a virtual interface (based on tuntap) is visible from the operating 1. Reduce IT costs and improve flexibility with server
system. This virtual interface appears exactly as it were a consolidation.
hardware interface and behaves as a physical ethernet interface. 2. Decrease downtime and improve reliability with
This operation however changes the network behavior of the host business continuity and disaster recovery.
computer and thus need administrative privileges to be 3. Increase energy efficiency by running fewer servers and
completed. dynamically powering down unused servers with our
Currently VDE supports User-Mode Linux virtual machines, green IT solutions
qemu, Bochs and MPS. 4. Accessing more processing power (in the sense of load
balancing),
Network Connection for Zero-Downtime Migrated Virtual 5. Exploitation of resource locality (for performance),
Machine resource sharing (meaning sharing of expensive or rare.
EUCALYPTUS provides support for VLAN across multi 6. Resources - such as telescopes or medical equipment –
physical hosts via VDE virtual switches. There is a VDE switch or large amounts o free memory by processes over a
on each physical host. Ports of VDE switch are classified into network), fault resilience.
two categories: tagged port and untagged port. Tagged ports 7. Simplified system administration and mobile computing
transmit packages belonging to multi VLAN, for example the (for instance as used by commuters from office to
port 3 on Host0 and untagged ports transmit packages belonging home).
to a VLAN, for example the port 1 and 2 on Host0. On single
physical host there may be multi VLAN, and each VLAN binds
to an untagged port of VDE switch on the host dynamically, or VI. CONCLUSION
example VLAN0 and VLAN1 on Host0 respectively bind to
untagged port 1 and 2,. Bridge device connects to untagged port Thus, Live Migration is the movement of a virtual
of VDE switch via virtual network card tap. VDE switches on machine from one physical host to another while continuously
different physical hosts connect to each other via vde plug which powered-up. This helps in decreasing downtime and improves
www.ijsrp.org
International Journal of Scientific and Research Publications, Volume 2, Issue 6, June 2012 5
ISSN 2250-3153
reliability with business continuity and disaster recovery. To [4] Daniel Nurmi, Rich Wolski, Chris Grzegorczyk., ―The EUCALYPTUS
Open-source Cloud computing System‖, in Proceedings of Cloud
migrate a virtual machine from one physical host to another, the
Computing and Its Applications [online], Chicago, Illinois, October 2008
control of virtual machines is configured to the management of [5] Yi Zhao, Wenlong Huang ― Adaptive Distributed Load Balancing
services in Red Hat Cluster Suite. VDE (virtual distributed Algorithm based on Live Migration of Virtual Machines in Cloud‖
Ethernet) virtual switches are used which are connected between [6] Davoli,R., ―VDE: virtual distributed Ethernet‖, Test beds and Research
Infrastructures for the Development of Networks and Communities, pages
the physical machines. Using VDE, users can create VLAN for
213-220, February 2005
each virtual machine instance. Hence, the motive of zero [7] http://www.centos.org/docs/5/html/5.1/Cluster_Suite_Overview/s1-service-
downtime of virtual machines is achieved by live migration. management-overview-CSO.html
AUTHORS
REFERENCES First Author – Ashima Agarwal, Third year, computer
[1] http://www.vmware.com/virtualization/virtual-machine.html engineering, MIT College of Engineering, Pune, Email:
[2] http://searchservervirtualization.techtarget.com/definition/virtual-machine
ashimaagarwal30@gmail.com
[3] C Clark, KFraser, S Hand, J Hansen, and E Jul., ―Live migration of virtual
machines‖, Proceedings of the 2nd ACM/USENIX Symposium on
Networked Systems Design and Implementation (NSDI), pages: 273-286, Second Author – Shangruff Raina, Third year,computer
2005 engineering, MIT College of Engineering, Pune, Email:
shangruff@gmail.com
www.ijsrp.org