KVM: show live migration progress on the instance page and add transfer details to VM.MIGRATE events

Ouverte
#14,531 2 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

Personne n'a encore pris cette issue.

Évaluation

Difficulté
5/5
Temps estimé
Plus d'une semaine
Accessibilité débutants
35/100
Type d'issue
Fonctionnalité
Clarté
Plutôt claire
Activité
Active
Stack technique
java
Domaine
api, backend, devops, frontend

Piste de recherche

Start by tracing the KVM agent’s libvirt migration job information, the management server’s migrate work job and updateAsyncJobStatus(), the VM response API, and the instance page and VM.MIGRATE event handling. The issue describes the expected progress fields, display, and event summaries, but names no files or tests; first map the migration flow across these components. Done means progress is polled and exposed during migration, shown in the UI, and summarized in completion and error events.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

component:api component:kvm component:UI
The required feature described as a wish
SUMMARY

During a live migration the UI only shows the instance as Migrating, so admins have to run virsh domjobinfo on the source host to see how far along it is or whether it has stalled.

This proposes showing migration progress for KVM first. The API field is hypervisor-neutral, so VMware, XenServer and others can add it later from their own task progress.

PROPOSAL
  • KVM agent: new command that returns the libvirt domain job info (disk and memory processed / remaining / total).
  • Management server: poll the source host every few seconds while the migrate work job runs, and store the result on the job with updateAsyncJobStatus().
  • API: admin-only migrationprogress on the VM response while the state is Migrating, read from the pending vm_work_job. Percent is always set and the byte/rate figures are optional, since other hypervisors only report a percentage.
  • UI: progress bar under Status on the instance page with percentage, "x of y complete", estimated time remaining and transfer rate in MB/s. When volumes migrate with the VM, disks and memory get separate bars; libvirt already splits them in the same job info (file* / mem*). Mock-up attached.
  • Events: append a summary to the VM.MIGRATE Completed event description (data transferred, duration, average rate), and on Error - a record of how far it got and a short reason (e.g. timed out and not converging, destination unreachable). Sizes, rates and reason category only. I wouldn't include host or storage names, since the event can be visible to the VM owner.

Happy to work on a PR if this approach is acceptable.

Mock-up of the UI change below:
Progress in an instance:
Image

Event - Successful:
Image

Event - Failed:
Image

Langage dominant
Java
Étoiles
3.1k
Forks
1.4k
Merge moyen
7 j 16 h
PR mergées (30 j)
15

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de apache/cloudstack

Toutes les issues de apache/cloudstack

Issues similaires

Plus d'issues Java

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.