Monitor status of qemu migration using PVE API

mrt

New Member
Jan 16, 2013
1
0
1
Hi,

I need to monitor the status of migrations through PVE API. I'm using PVE 2.1 and the Java client. For long time, I've used libvirt, where the call to trigger a live migration was blocking. Here, that's different, I need to know when a migration is finished, so I can start the next one. Otherwise, and this may be a bug, subsequent migrations very likely fail as port 60000 is already used. Additionally, the KVM process is then gone on the source node too - very bad. I assume it is not necessary to fix the migration port to 60000, but thats the current behaviour.

However, the Java client to PVE API is not helpful either. I thought I'm gonna fetch the list of tasks (getTasks() IIRC), and look for a "running" "qmigrate" task, but no chance. There seem to be several bugs causing JSONExceptions, e.g., EndTime is not parsable. Not very astonishing for a task that is not finished yet, meh. Anyways, even Status is not parsable, so I'm completely stuck here.

Is there a better way to monitor the status of a KVM migration, has the API changed, or how can I achieve what I need to do? Even if multiple live migrations were possible (using port 60000+x or whatever), I need to know when all live migrations are finished.

Thank you!
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!