* Eric Blake (ebl...@redhat.com) wrote: > On 1/21/21 12:51 PM, Dr. David Alan Gilbert (git) wrote: > > From: "Dr. David Alan Gilbert" <dgilb...@redhat.com> > > > > Provide a simple way to see if there's currently a migration blocker in > > operation: > > > > $ ./x86_64-softmmu/qemu-system-x86_64 -nographic -M pc,usb=on -chardev > > null,id=n -device usb-serial,chardev=n > > > > (qemu) info migratable > > Error: State blocked by non-migratable device '0000:00:01.2/1/usb-serial' > > > > $ ./x86_64-softmmu/qemu-system-x86_64 -nographic > > > > (qemu) info migratable > > Migratable > > > > Signed-off-by: Dr. David Alan Gilbert <dgilb...@redhat.com> > > --- > > > > +++ b/qapi/migration.json > > @@ -366,6 +366,20 @@ > > ## > > { 'command': 'query-migrate', 'returns': 'MigrationInfo' } > > > > +## > > +# @query-migratable: > > +# Tests whether it will be possible to migrate the VM in the current state. > > +# > > +# Returns: nothing on success (i.e. if the VM is migratable) > > Do we really need a new command? Or can we get away with enhancing the > existing 'query-migrate' to add another bool field to 'MigrationInfo'?
In the case where the VM is not migratable this command errors with the message set in a migration-blocker (Our migration blocker mechanism always takes an Error* as the reason). It didn't seem right to make that change for the existing commands; so how would you like the existing MigrationInfo to change; a boolean to say yes/no, and an error/list of errors for the reason? Dave > -- > Eric Blake, Principal Software Engineer > Red Hat, Inc. +1-919-301-3226 > Virtualization: qemu.org | libvirt.org -- Dr. David Alan Gilbert / dgilb...@redhat.com / Manchester, UK