ArchipelProject/Archipel — pull request #675 by nicolasochem (2013-03-08 17:47:36+00:00)
Title: ability to migrate powered down vms : agent part

The "migrate" iq can now be sent to switched off vms.
It occurs in 2 steps : a stanza is sent from the origin vm to the destination hypervisor, containing the vm xml (including description). I recycled the hypervisor's "iq_soft_alloc" function which was not used anywhere.
When the dest hypervisor receives this stanza, it soft-allocates the vm, then replies. The reply triggers "part 2" which soft-frees the vm in the origin hyp.

I also changed the live migration technique to use an id containing the jid instead of just numbers : I observed id collision bugs in this scenario (where 2 threads use the same stanza id resulting in one of them being ignored).

This partially fixes issue #94 and can be merged as-is.
but of course, there is some easy work to be done with the client which I don't have the means to do right now :
- in vm controls, remove the "To enable migration, you need to start the virtual machine" text : migration should always be possible.
- the title of the section should be changed from "Live migration" to simply "Migration"
- there is a bug: when I migrate the vm, the jid resource in the bottom left info pane is not updated : it still appears as belonging to the origin hypervisor.