[one-users] Pre-migrate and post-migrate actions
szekelyi at niif.hu
Wed Jun 23 11:09:23 PDT 2010
we faced a problem and thought about more than one ways to fix it,
unfortunately they require source modification. We would like to know your
The problem is that we'd like to use iSCSI targets to store the VMs' disks,
one target per VM. The idea is that if a VM starts running on a host, then the
host logs in to the corresponding iSCSI target, thus sees the disk images for
This works now, we're able to do this with a custom TM driver. The problem is
with live migration. Unfortunately we found no possibility to make ONE call a
trigger that logs in to the target on the destination host right before live
migration starts, which means the VM is unable to start on the new host.
The most clear solution seems to be to make LCM call not just the VMM to do
the migration, but the TM driver beforehand  . Due to the asynchronous
nature of LCM, new VM states must be introduced, just like as it is done now
with non-live migration.
Another possibility is to hack VirtualMachineManager or
VirtualMachineManagerDriver to somehow run the appropriate commands before
(and after) migration, before returning the result to the LCM.
The third and most ugly way would be to hack one_vmm_kvm.rb (yes, we're using
KVM) to do the job.
What is your opinion about the way to implement this?
 This may require small extensions to the TM actions. Maybe new ones like
PREMIGRATE and POSTMIGRATE.
 iSCSI targets must be logged out of, so a post-migrate call is also
More information about the Users