错误说明 :unable to set user and group to '116:127' on '/var/lib/libvirt/images/teste.img': No such file or directory
错误原因:The image file should be shared (for example over NFS) and visible on
both hosts. It looks like you are migrating to a host that does not
have /var/lib/libvirt/images/teste.img.
镜像文件必须作为一个网络文件系统在所迁移的主机之间共享
对两个主机都可见
设置镜像文件为网络文件系统
说明: 按照上面的说法 这种迁移方式是基于共享存储的迁移。
将source host的 images 目录挂载到 destination host 目录下面
迁移指令:
- sudo migrate --live vm1 qemu+ssh://destinationhostIp/system
注:迁移完成后 sourceHost上的vm1 并没有删除 只是关闭了
能够同时在sourceHost和destination Host上运行Vm 并且 两者的MAC地址也是相同的
注解释: 自习查看migrate指令
- migrate optional --live --p2p --direct --tunnelled --persistent --undefinesource --suspend --copy-storage-all --copy-storage-inc --verbose domain-id desturi migrateuri dname --timeout
- Migrate domain to another host. Add --live for live migration; --p2p for peer-2-peer migration; --direct for direct migration; or --tunnelled for tunnelled migration. --persistent leaves the domain persistent on destination host, --undefinesource undefines the domain on the source host, and --suspend leaves the domain paused on the destination host. --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). --verbosedisplays the progress of migration.
- The desturi is the connection URI of the destination host, and migrateuri is the migration URI, which usually can be omitted. dname is used for renaming the domain to new name during migration, which also usually can be omitted.
- --timeout forces guest to suspend when live migration exceeds timeout, and then the migration will complete offline. It can only be used with --live.
- Note: The desturi parameter for normal migration and peer2peer migration has different semantics:
- normal migration: the desturi is an address of the target host as seen from the client machine.
- peer2peer migration: the desturi is an address of the target host as seen from the source machine.
里面写的很清楚:
--undefinesource就可以将source上的已经迁移的虚拟机给删除。。
要是我的做法有误 或者哪里不正确 欢迎指出。共同进步。
阅读(1877) | 评论(0) | 转发(0) |