From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH OSSTEST 04/12] toolstack: distinguish local and remote migration support Date: Wed, 11 Mar 2015 16:18:20 +0000 Message-ID: <1426090700.21353.307.camel@citrix.com> References: <1423480206-9729-1-git-send-email-wei.liu2@citrix.com> <1423480206-9729-5-git-send-email-wei.liu2@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1423480206-9729-5-git-send-email-wei.liu2@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Wei Liu Cc: jfehlig@suse.com, ian.jackson@eu.citrix.com, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Mon, 2015-02-09 at 11:09 +0000, Wei Liu wrote: > Libvirt supports migrating a guest to remote host but not local host. Jim, is that right? (Or alternatively, Wei: Do you have a reference for that?) > diff --git a/Osstest/Toolstack/libvirt.pm b/Osstest/Toolstack/libvirt.pm > index acb801c..a804ed5 100644 > --- a/Osstest/Toolstack/libvirt.pm > +++ b/Osstest/Toolstack/libvirt.pm > @@ -64,9 +64,22 @@ sub shutdown_wait ($$$) { > guest_await_destroy($gho,$timeout); > } > > -sub migrate_check ($) { > - my ($self) = @_; > - die "Migration check is not yet supported on libvirt."; > +sub migrate_check ($$) { > + my ($self, $mode) = @_; > + my $rc; > + > + if ($mode eq 'local') { > + # local migration is not supported > + $rc = 1; > + } else { > + # $mode eq 'remote' Perhaps a bool $local would be better than having to sanity check the values? > diff --git a/ts-migrate-support-check b/ts-migrate-support-check > index cd41f68..d237710 100755 > --- a/ts-migrate-support-check > +++ b/ts-migrate-support-check > @@ -23,5 +23,8 @@ use Osstest::TestSupport; > tsreadconfig(); > > our $ho = selecthost($ARGV[0]); > +# $ARGV[1] is guest name, $ARG[2] is migration mode. > +# Mode should be either "local" or "remote" > +our $mode = $ARGV[2]; > > -exit(toolstack($ho)->migrate_check()); > +exit(toolstack($ho)->migrate_check($mode));