1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2026-11-08 19:26:48 +00:00
webvirtcloud/vrtManager/tests
catborise 51d24fce30 feat(instances): migrate a VM with its disks copied into pools of the destination
A migration needed every disk on storage both hosts share: it was refused
when the destination lacked a disk file, and a file of the same name
there was taken for the VM's own disk.

The Migrate tab now lists the VM's disk files for the chosen destination.
For each disk it offers the destination's pools that keep disk files
(directory, filesystem and NFS pools). A disk on storage both hosts share
can also stay where it is.

A directory counts as shared when both hosts have it as a storage pool
and a marker file created on the source exists on the destination. A
directory the probe cannot tell is never taken as shared.

libvirt copies the chosen disks during the migration: migrate3 with
NON_SHARED_DISK for those targets, and destination and persistent
definitions naming the new paths, where libvirt creates the files.

- A shut-off VM is started paused for the copy and shut off on the
  destination; its CPUs never run. Its UEFI variables are copied first,
  as the destination would start from the firmware's template. If the
  migration fails, the VM is shut off on the source again.
- Refused before anything changes, each disk with its reason:
  - a disk neither shared nor given a pool, also one only the next
    start's definition has;
  - CD-ROM images, read-only or encrypted disks, formats other than raw
    and qcow2, and disks with a backing file;
  - a pool that is not of disk files, or that has a file of that name,
    which libvirt would reuse and overwrite;
  - two disks copied to one file.
- The job claims each copy's name in its pool, and the source volume.
- A failed or cancelled migration deletes the copies libvirt made, and
  the UEFI variables copy, unless a VM on the destination has them.
- The source files stay and are named in the log. With "Delete the
  source files of copied disks" they go, except one another VM or volume
  uses; a failed delete is logged and the migration stands.

The NVRAM sharing check uses the same probe: a shut-off move stops when
it cannot be told, and the source file stays.

The API's migrate call takes disk_pools ({target: pool}) and
delete_source.
2026-10-29 19:46:31 +03:00
..
__init__.py test: each app keeps its tests in a tests package 2026-10-12 15:17:30 +03:00
test_agent_access.py feat(instances): a running VM gets its root password and SSH key through its guest agent 2026-10-25 15:37:37 +03:00
test_change_network.py test: each app keeps its tests in a tests package 2026-10-12 15:17:30 +03:00
test_clone_nvram.py feat(instances): VM clone runs as a job 2026-10-15 09:28:43 +03:00
test_cloud_init_seed.py feat(instances): a new VM can get a cloud-init seed with its hostname and SSH keys 2026-10-25 19:57:15 +03:00
test_connection.py test: each app keeps its tests in a tests package 2026-10-12 15:17:30 +03:00
test_connection_threads.py feat(operations): the job worker 2026-10-14 23:27:57 +03:00
test_console_setters.py test: each app keeps its tests in a tests package 2026-10-12 15:17:30 +03:00
test_device_edits.py test: each app keeps its tests in a tests package 2026-10-12 15:17:30 +03:00
test_disk_copy_migration.py feat(instances): migrate a VM with its disks copied into pools of the destination 2026-10-29 19:46:31 +03:00
test_external_snapshots.py feat(instances): a new VM can get a cloud-init seed with its hostname and SSH keys 2026-10-25 19:57:15 +03:00
test_host_reads.py fix(interfaces): interface changes roll back as one, a running one is not deleted, each interface is read once 2026-10-29 10:09:40 +03:00
test_instance_getters.py test: each app keeps its tests in a tests package 2026-10-12 15:17:30 +03:00
test_interface_addresses.py fix(instances): Guest Info says when the agent fails and keeps what it answered 2026-10-26 13:49:37 +03:00
test_iso_media.py test: each app keeps its tests in a tests package 2026-10-12 15:17:30 +03:00
test_live_clone.py fix(instances): a quiesced snapshot or live clone stops early on a silent guest agent 2026-10-25 17:42:01 +03:00
test_live_connection.py test: each app keeps its tests in a tests package 2026-10-12 15:17:30 +03:00
test_live_nvram.py test: each app keeps its tests in a tests package 2026-10-12 15:17:30 +03:00
test_migration.py feat(instances): migrate a VM with its disks copied into pools of the destination 2026-10-29 19:46:31 +03:00
test_network_ip.py fix(networks): a network's addresses are read as libvirt writes them, and its changes keep each other 2026-10-29 10:09:14 +03:00
test_persistent_edits.py test: each app keeps its tests in a tests package 2026-10-12 15:17:30 +03:00
test_read_cache.py test: each app keeps its tests in a tests package 2026-10-12 15:17:30 +03:00
test_remove_nvram.py feat(instances): migrate a VM with its disks copied into pools of the destination 2026-10-29 19:46:31 +03:00
test_resize_disk.py test: each app keeps its tests in a tests package 2026-10-12 15:17:30 +03:00
test_rwlock.py test: each app keeps its tests in a tests package 2026-10-12 15:17:30 +03:00
test_usage.py test: each app keeps its tests in a tests package 2026-10-12 15:17:30 +03:00
test_util.py test: each app keeps its tests in a tests package 2026-10-12 15:17:30 +03:00
test_volume_in_use.py fix(storages): keep volumes a VM still needs 2026-10-13 09:13:02 +03:00
test_xml_safety.py feat(instances): VM clone runs as a job 2026-10-15 09:28:43 +03:00
test_xpath_values.py fix(nwfilters): a filter in use is not deleted, and a change replaces no other filter 2026-10-29 10:10:17 +03:00