于 2011年02月08日 23:29, Berend Dekens 写道:
I am trying to work out what all the options are for migrating a KVM machine to another KVM machine, without using shared storage. The documentation is not quite verbose and not intuitive, so I'm hoping someone can explain this to me. The man pages show this syntax: migrate optional --live --p2p --direct --tunnelled --persistent --undefinesource --suspend --copy-storage-all --copy-storage-inc domain-id desturi migrateuri dname The 'live' and 'suspend' options are clear. The 'undefinesource' option is straightforward as well. But what does 'persistent' mean? I mean, when transferring a VM to a destination, it will be available on the destination when migration completes, so what does 'persistent' mean in this context?
It means the domain conf will be saved on your disk, e.g. /etc/libvirt/qemu/$domain.xml. Without specifying it, your domain will be disappear after destroying, that means your domain is transicient, opposite meaning of persistent.
The p2p, direct and tunneled options are not. When migrating, I assume it is possible to let the underlying virtualisation framework handle the migration - so I assume 'direct' means Qemu-KVM gets to migrate the VM and 'tunneled' means the RPC mechanism of libvirt migrates the machine. But what does 'p2p' mean? Normally, peer-to-peer implies direct communication, but since there is a 'direct' mode, I'm clueless what this option does.
It's a mess, though I known something about it, but can't explain it very well, leaving it to others who has good knownledge of it.. :-)
On a side note: is it possible to use tunneled mode to transfer VMs from for example Xen to KVM?
No, xen doesn't support tunneled and peer2peer migration.
Then I have some questions about the non-shared storage migration. I really like this option as most of my virtualized servers are run on one or two physical systems without shared VM storage. Migrating those VMs without downtime would be awesome. If I migrate the VMs, I assume the storage of the VM is places in the libvirt default storage location. But what is the difference between 'copy-storage-all' and 'copy-storage-inc'? Incremental hints that it would save incremental changes without actually transferring the storage between hosts. But how is that possible if the storage was not shared in the first place?
The incremental migration requires you have the image on destination host for the domain. e.g. assume you need to migrate the domains from time to time, then only the first time need "copy-storage-all". Regards Osier