现在的位置: 首页 > 综合 > 正文

Migrating KVM hosts with virsh

2012年03月20日 综合 ⁄ 共 1134字 ⁄ 字号 暂无评论

I played around with KVM live migration over the weekend, and it worked flawlessly. When I was first getting the environment (i.e., /etc/libvirt/libvirtd.conf, /etc/sysconfig/libvirt, SASL credentials, etc.) set up to allow migrations to work, I was greeted with the following error:

virsh # migrate –live kvmnode1 qemu+tcp://thecrue/system
error: invalid argument in only tcp URIs are supported for KVM migrations

This message wasn’t the most descriptive error I’ve ever read, so I turned to the libvirt source to see what was going on. I saw the following comment:

/* Prepare is the first step, and it runs on the destination host. */

And immediately fired up virsh to double check the migrate syntax I was using:
$ virsh
Welcome to virsh, the virtualization interactive terminal.

Type: 'help' for help with commands
'quit' to quit

virsh # help migrate
.....
migrate [--live] [] []

I had accidently run the migrate command from the destination host instead of the source host. Once I knew what was going on, I fired off the migrate from the source host and everything worked flawlessly:

virsh # migrate –live kvmnode1 qemu+tcp://thecrue/system

virsh #

I really dig KVM, and have recently become somewhat smitten with openvz. Both technologies rock, and I hope to talk about my experiences with each virtualization technology sometime in the future.

给我留言

留言无头像?