mirror of
https://github.com/retspen/webvirtcloud
synced 2026-12-03 17:36:05 +00:00
feat(migrations): a migration's bandwidth can be capped
A migration took all the network it could, its disk copies too, and the VMs on both hosts felt it. Settings has a Migrations group with "Migration bandwidth" (MiB/s, 0: libvirt's default, the default); every migration, by hand, in bulk or for maintenance, passes it to libvirt, and its log line names it. libvirt applies it to the memory until the final switchover and to each copied disk on its own; the help and README say so. A refused setting is now named in the page's language.
This commit is contained in:
parent
46931bdbdb
commit
3da55342da
14 changed files with 438 additions and 333 deletions
|
|
@ -19,6 +19,7 @@ from django.utils.translation import gettext_noop
|
|||
from libvirt import libvirtError
|
||||
from logs.audit import reason, write
|
||||
from operations.models import Operation
|
||||
from operations.utils import migration_bandwidth
|
||||
from vrtManager.connection import counted_thread, other_hosts, wvmConnect
|
||||
from vrtManager.instance import wvmInstance, wvmInstances
|
||||
from vrtManager.util import ConnectionFailed, HostBusy, message, vol_dev_type
|
||||
|
|
@ -345,6 +346,7 @@ def migrate_instance(
|
|||
compress,
|
||||
uri=new_compute.migration_uri,
|
||||
tls=source.migration_tls and new_compute.migration_tls,
|
||||
bandwidth=migration_bandwidth(),
|
||||
pools=disk_pools,
|
||||
on_copy=on_copy,
|
||||
running_only=running_only,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue