Ubuntu 12.04 KVM-VM static migration-image-based

Source: Internet
Author: User
Tags dell r710

Static Migration: it is also called regular Migration and Offline Migration (Offline Migration ). Migration from one physical machine to another when the VM is shut down or paused. Because the Virtual Machine file system is built on the virtual machine image, when the virtual machine is shut down, you only need to simply migrate the virtual machine image and the corresponding configuration file to another physical host; if you need to save the status before migration, pause the VM before migration, copy the status to the target host, and then re-create the status of the VM on the target host to resume execution. In this way, the migration process needs to explicitly stop the running of virtual machines. From the user's perspective, there is a clear period of downtime, and services on the virtual machine are unavailable. This migration method is simple and suitable for scenarios where the service availability requirements are not strict.

How to install KVM Virtual Machine in CentOS

RHEL6 KVM virtualization creates a bridge NIC-Bridge

RedHat Linux KVM Virtual Machine bridging

Installation/bridging settings of KVM in CentOS 5.6/virtual machine creation and operation

The/bin/qemu-KVM problem cannot be found when the kvm virtual machine is installed with libvirt In Ubuntu.

Two dell R710 hosts and two local hosts are installed with kvm virtual machines. They are mainly used to test the static migration process of kvm VMS.

Ubuntu-src, Ubuntu-dst, and kvm are installed on Ubuntu-src as an example:

Install the following software packages on Ubuntu-src and Ubuntu-dst.

Apt-get install ubuntu-virt-server python-vm-builder kvm-ipxe bridge-utils

Perform the following operations on Ubuntu-src:

Check whether virtualization support is enabled for the cpu and BIOS. When the BIOS is started, press F2 to check, and run the following command to check the cpu:

Egrep '(vmx | svm)' -- color = always/proc/cpuinfo

Modify the NIC configuration (/etc/network/interfaces) to establish a bridge, as shown below:

Auto lo

Iface lo inet loopback

Auto eth0

Iface eth0 inet manual

Auto br0

Iface br0 inet static

Address 10.1.6.90

Netmask 255.255.255.0

Gateway 10.1.6.254

Bridge_ports eth0

Bridge_fd 9

Bridge_hello 2

Bridge_maxage 12

Bridge_stp off

Install the image-based vm, go to the/opt directory, import a debian6 iso installation image, and then use kvm-img to generate a vm image

Kvm-img create-f qcow2 debian. img 5G

Use the virt-install method to manage virtual machines and install the following Toolkit:

Apt-get install libvirt-bin restart Inst

Install the kvms Virtual Machine

Virt-install-d-n kvms-r 2048 -- disk path =/opt/debian. img, bus = virtio, cache = none, format = qcow2 -- network bridge = br0, model = virtio -- vnc -- cdrom =/opt/debian-6.0.2.1-amd64-CD-1.iso

Use vnc to open the installation Interface

Next, restart the virtual machine after the installation is completed step by step according to the normal installation process. Because the virtual machine is not started by default after the installation is completed using virt-install, you need to start the virtual machine first.

  • 1
  • 2
  • Next Page

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.