1 系统简介
- # kvm –version
- QEMU emulator version 0.14.0 (qemu-kvm-0.14.0), Copyright (c) 2003-2008 Fabrice Bellard
- # uname -r
- 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之间有相同的共享的硬盘)
英语原文:
- --copy-storage-all indicates migration with non-shared storage with full disk copy
- --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
- root@ubuntu-1:~#virsh migrate --live --copy-storage-all ubuntu-vm3 qemu+ssh://ubuntu-2/system --verbose
- root@ubuntu-2's password:
- error: unable to set user and group to '102:107' on '/var/disk1/images/ubuntu-vm3.img': No such file or directory
解决方法我的文章已经写过。
(3)迁移开始遇到问题2
- root@ubuntu-1:~#virsh migrate --live --copy-storage-all ubuntu-vm3 qemu+ssh://ubuntu-2/system --verbose
- root@ubuntu-2's password:
- error: operation failed: migration job:unexpectedly failed
解决方法我的文章已经写过。
阅读(6650) | 评论(2) | 转发(0) |