[one-users] Pre-migrate and post-migrate actions

Székelyi Szabolcs szekelyi at niif.hu
Wed Jun 23 11:09:23 PDT 2010


Hello,

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 
opinion.

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 
that VM.

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 [1] [2]. 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?

Thanks,
-- 
cc


[1] This may require small extensions to the TM actions. Maybe new ones like 
PREMIGRATE and POSTMIGRATE.

[2] iSCSI targets must be logged out of, so a post-migrate call is also 
needed.)




More information about the Users mailing list