qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
To: Eric Blake <eblake@redhat.com>
Cc: alex.williamson@redhat.com, peterx@redhat.com,
	qemu-devel@nongnu.org, laine@redhat.com
Subject: Re: [PATCH] migration: Provide a test for migratability
Date: Mon, 25 Jan 2021 13:27:29 +0000	[thread overview]
Message-ID: <20210125132729.GG2925@work-vm> (raw)
In-Reply-To: <7f789817-6a2d-124f-57dc-a468f7f596ba@redhat.com>

* Eric Blake (eblake@redhat.com) wrote:
> On 1/21/21 12:51 PM, Dr. David Alan Gilbert (git) wrote:
> > From: "Dr. David Alan Gilbert" <dgilbert@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 <dgilbert@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 / dgilbert@redhat.com / Manchester, UK



  reply	other threads:[~2021-01-25 13:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-21 18:51 [PATCH] migration: Provide a test for migratability Dr. David Alan Gilbert (git)
2021-01-21 20:04 ` Alex Williamson
2021-01-21 20:17   ` Dr. David Alan Gilbert
2021-01-21 22:28 ` Eric Blake
2021-01-25 13:27   ` Dr. David Alan Gilbert [this message]
2021-02-02 12:36   ` Dr. David Alan Gilbert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210125132729.GG2925@work-vm \
    --to=dgilbert@redhat.com \
    --cc=alex.williamson@redhat.com \
    --cc=eblake@redhat.com \
    --cc=laine@redhat.com \
    --cc=peterx@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).