Hello team,

I want to add two more features related to KVM; one related to
migration capabilities and one for online disk resize. I would
like to discuss some implementation details before sending any
patch.

migration caps
--------------

KVM supports multiple migration capabilities. The are enforsed
via `migrate_set_capability` monitor command which takes capability and
on/off as arguments. Currently (1.7) kvm has 4 caps:

MIGRATION_CAPABILITY_X_RDMA_PIN_ALL
MIGRATION_CAPABILITY_AUTO_CONVERGE
MIGRATION_CAPABILITY_ZERO_BLOCKS
MIGRATION_CAPABILITY_XBZRLE

We have been using xbzrle and auto-converge for a while now. Both
improve migration speed a lot. Still on some cases (Windows 2008r2 +
drbd + xbzrle) cause BSOD on the windows VM.

So I want to include migration caps in hvparams. The dilema is the
following:

1) Introduce *one* hypervisor parameter named `migration_caps` and include
   a "something" separated list of enabled caps. For example:

 HT_MIGRATION_CAPS = "xbzrle:-auto-converge"
 HT_MIGRATION_CAPS_DELIM = ":-"

just like HV_KVM_SPICE_TLS_CIPHERS or

2) Introduce multiple hypervisor parameters named:

 migration_cap_auto_converge
 migration_cap_auto_xbzrle
 ....

that can take on/off values?

Ofcourse the best would be to defines a dict as an hvparam which is
currenlty not supported (nor it would be I guess).


online disk resize
------------------

On a debian wheezy VM I have tried the following:

 gnt-instance grow-disk debian 0 10G

and then:

 echo block_resize hotdisk-a37058ee-pci-4 35G | socat - 
unix:/var/run/ganeti/kvm-hypervisor/ctrl/debian.monitor

and inside the VM fdisk -l shows a 35G disk (I think a 3.2 kernel is needed).

Hotplug support introduced NIC/Disk identifiers for KVM. So now we are able
to use such a command.

By the way if you do the resize you cannot shrink it. Plus giving a size
larger than the physical disk results to an error.

Currently HotplugDevice() regarding disk modifications is not implemented on
the hypervisor side. We could either use the existing code and extend
HotModDevice() or we could create new RPC/backend/hypervisor methods.

So, what do you think?

Thanks in advance,
dimara


PS: Currently grow-disks takes only disk index as identifier. We should
support name and uuid as well. I will fix that in the online disk resize
patch set.

Attachment: signature.asc
Description: Digital signature

Reply via email to