Guest using the virtio-blk driver for local disks, iothread is used to
handle IO operations, Qemu will segfault when copying disks during live
migration. To address this issue, use nbd server and drive_mirror
approach to copy the disks.
* fix(host): convert migrate set downtime value to float64
* fix(host): live migration optimize
Qemu will send `STOP` event on start last time migration, but this
moment migration not completed. So we need wait magration complete.
Configurable Auto converge max cpu throttle.
- support set live migrate bandwidth
- support cancel migrate
- live migrate enable multifd
- cancel set live migrate max downtime in init live migrate
- save and sync guest desc and start script on sync config
- init machine pci addresses on load guest desc
- load memory devices for guests not init pci addresses
- attach network set upscript and downscript
- add a guest launcher for redirect qemu stdout/stderr
- start monitor on guest script start
- fix guest hotplug cpu and mem not update desc
Generate pci addresses for guests create before structure desc.
Read guest pci info from qmp query-pci command and fill guest
description.
Guest desc add field AnonymousPCIDevs to save unidentified pci devices
address.
- describe pci controller and devices in guest desc.
- extend pcie bus and pcie-to-pci bridge and root ports, disks and
nics default attach to pci-bridge for support hotplug.
- generate pci address on guest starts
- live guest desc for running guest, and save source desc
Signed-off-by: wanyaoqi <wanyaoqi@yunion.cn>
Signed-off-by: wanyaoqi <wanyaoqi@yunion.cn>
* feat(region,host): refector guests cgroups
hostagent will create a root group cloudpods.hostagent at init.
guests group under cloudpods.hostagent. Qemu start params add '-S'
option freeze guest at first, after guest set cgroup or other initialize
hostagent will resume guest.
host support reserve cpus. if has reserved cpus, hostagent will create a
group cloudpods.hostagent.reserved, one thing to note is set host
reserved cpus must ensure host no guests running.
climc usage:
climc host-reserve-cpus --cpus '2-3,32-33' --mems '0-1' \
--disable-sched-load-balance <IDS>
Signed-off-by: wanyaoqi <d3lx.yq@gmail.com>
* hostman: disable cpuset balancer
Signed-off-by: wanyaoqi <d3lx.yq@gmail.com>
Guest start drive mirror job to copy full disk to target, after drive
mirror job ready, guest reopen target disk to replace source disk.
Qemu must support block reopen image feature.
Supported storage: local, ceph
Signed-off-by: wanyaoqi <d3lx.yq@gmail.com>