Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2294574
  • 博文数量: 252
  • 博客积分: 5472
  • 博客等级: 大校
  • 技术积分: 3107
  • 用 户 组: 普通用户
  • 注册时间: 2011-09-17 18:39
文章分类

全部博文(252)

文章存档

2012年(96)

2011年(156)

分类: 虚拟化

2011-10-26 15:33:14

1  系统简介
  1. # kvm –version
  2. QEMU emulator version 0.14.0 (qemu-kvm-0.14.0), Copyright (c) 2003-2008 Fabrice Bellard
  3. # uname -r
  4. 2.6.38-8-server

2 系统架构

                                           (ubuntu-vm3)  

                VM  >>>>>>>>>>> live migration>>>>>>>>>  VM(migrated)

              ubuntu-1                                                                          ubuntu-2

           (source Host)                                                                  (destination Host)

 

系统中没有共享存储

从 kvm 0.12.1之后开始支持无共享的KVM live migration

  

3 迁移过程

(1)在ubuntu-2上使用qemu-img创建虚拟硬盘

(2)在ubuntu-2上使用kvm命令打开TCP socket

(3)在ubuntu-1上,运行live migration

4 具体实施过程记录。。。

(1)要基于无共享存储的live migration 你需要在命令中添加选项

--copy-storage-all 或者 --copy-storage-inc

说明:

--copy-storage-all :基于非共享存储的全部硬盘的迁移

--copy-storage-inc :基于非共享存储的额外的存储(在source和destination之间有相同的共享的硬盘)

英语原文:

 

  1. --copy-storage-all indicates migration with non-shared storage with full disk copy
  2. --copy-storage-inc indicates migration with non-shared storage with incremental copy (same base image shared between source and destination)
  • 关于--copy-storage-inc的说明
  • Live migration with incremental storage copy . This is for the case where you're using a “linked image”. In other words, If you're using a copy on write block image based on a base image a.k.a backing file. In this case the backing file must be present on both source and destination servers. For more on backing files or base images see the following post on base images.
  •  

    (2) 迁移开始遇到问题1

     

    1. root@ubuntu-1:~#virsh migrate --live --copy-storage-all ubuntu-vm3 qemu+ssh://ubuntu-2/system --verbose
    2. root@ubuntu-2's password:
    3. error: unable to set user and group to '102:107' on '/var/disk1/images/ubuntu-vm3.img': No such file or directory

    解决方法我的文章已经写过。

    (3)迁移开始遇到问题2

    1. root@ubuntu-1:~#virsh migrate --live --copy-storage-all ubuntu-vm3 qemu+ssh://ubuntu-2/system --verbose
    2. root@ubuntu-2's password:
    3. error: operation failed: migration job:unexpectedly failed

    解决方法我的文章已经写过。

    阅读(6545) | 评论(2) | 转发(0) |
    给主人留下些什么吧!~~

    xueliangfei2012-07-02 23:23:25

    williamherry: (2)在ubuntu-2上使用kvm命令打开TCP socket 是指什么? ssh?.....
    打开接收migrate的通道

    williamherry2012-05-07 08:37:32

    (2)在ubuntu-2上使用kvm命令打开TCP socket 是指什么? ssh?