011. Migration of KVM-V2V

Source: Internet
Author: User
1. virtual storage pool 1.1 create a virtual storage pool
  1 [[email protected] ~]# mkdir -p /data/vmfs
1.2 define storage pools and directories
  1 [[email protected] ~]# virsh pool-define-as vmdisk --type dir --target /data/vmfs/
1.3 create a storage pool
  1 [[email protected] ~]# virsh pool-build vmdisk
1.4 view the defined storage pool
  1 [[email protected] ~]# virsh pool-list --all
1.5 activate the storage pool
1 [[email protected] ~] # Virsh pool-autostart vmdisk # Set the storage pool to automatically start 2 [email protected] ~] # Virsh pool-start vmdisk
1.6 create a storage volume in the storage pool
  1 [[email protected] ~]# virsh vol-create-as vmdisk test.qcow2 1G --format qcow2
1.6 other related commands
1 [[email protected] ~] # Virsh vol-delete -- pool vmdisk test. qcow2 # Delete Storage Volume 2 [[email protected] ~] # Virsh pool-destroy vmdisk # cancel the activated storage pool 3 [[email protected] ~] # Virsh pool-delete vmdisk # Delete the directory defined by the storage pool 4 [[email protected] ~] # Virsh pool-undefine vmdisk # cancel the definition of the storage pool
2 V2V migration 2.1 preparation source host: vm01-centos6.8 source VM name: KVM-host destination host: kvm-host-2 Virtual Machine name after migration: vm01-cloud-centos6.8 source + Destination hosts all need to refer to creating the same virtualized storage pool. View the VM status of the target host. Note: The virt-v2v only supports static migration, you must stop the VM to be migrated first. 2.2 move the VM disk to the storage pool
  1 [[email protected] ~]# mv /data/images/vm01-centos6.8.img /data/vmfs/
2.3 formal migration method 1: migrate the source to the target
  1 [[email protected] ~]# virt-v2v -oc qemu+ssh:// -os vmdisk  -b br0 vm01-centos6.8
2.4 formal migration method 2: migration from the source
  1 [[email protected] ~]# virt-v2v -ic qemu+ssh:// -os vmdisk  -b br0 vm01-centos6.8
Note: If you do not have the virt-v2v command, you can install it using the Yum-y install virt-v2v.2.4 verification and adjustment attachment-Internal Migration
1 [[email protected] ~] # Virt-v2v-OC qemu + SSH: // vmdisk-on vm01-clone-centos6.8-B br0 vm01-centos6.8 # self Migration Operations
  • -OS: Specifies the storage pool in KVM;
  • -Of: the format of the migrated VM Disk

011. Migration of KVM-V2V

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.