From: Wei Liu Subject: Re: [PATCH OSSTEST v2 06/13] toolstack/libvirt: guest migrate, save and restore support Date: Tue, 21 Jul 2015 17:17:38 +0100 Message-ID: <20150721161738.GS12455@zion.uk.xensource.com> References: <1436718036-7985-1-git-send-email-wei.liu2@citrix.com> <1436718036-7985-7-git-send-email-wei.liu2@citrix.com> <1436786632.7019.105.camel@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1ZHaEi-0008Vv-KX for xen-devel@lists.xenproject.org; Tue, 21 Jul 2015 16:17:44 +0000 Content-Disposition: inline In-Reply-To: <1436786632.7019.105.camel@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: Ian Campbell Cc: Xen-devel , Wei Liu , ian.jackson@eu.citrix.com List-Id: xen-devel@lists.xenproject.org On Mon, Jul 13, 2015 at 12:23:52PM +0100, Ian Campbell wrote: > On Sun, 2015-07-12 at 17:20 +0100, Wei Liu wrote: > > Perhaps the libvirt part of the check_for_command stuff ought to be > moved here? Otherwise we are claiming support before the code is > actually willing to try to do so. I move this patch before "toolstack: distinguish local and remote migration support" (the patch that claims support). It should be fine now. Wei. > > > Signed-off-by: Wei Liu > > Cc: Ian Campbell > > Cc: Ian Jackson > > Acked-by: Ian Campbell > > --- > > Osstest/Toolstack/libvirt.pm | 11 ++++++++--- > > 1 file changed, 8 insertions(+), 3 deletions(-) > > > > diff --git a/Osstest/Toolstack/libvirt.pm b/Osstest/Toolstack/libvirt.pm > > index ddf84df..3dc1856 100644 > > --- a/Osstest/Toolstack/libvirt.pm > > +++ b/Osstest/Toolstack/libvirt.pm > > @@ -105,17 +105,22 @@ sub saverestore_check ($) { > > > > sub migrate ($) { > > my ($self,$gho,$dst,$timeout) = @_; > > - die "Migration is not yet supported on libvirt."; > > + my $ho = $self->{Host}; > > + my $gn = $gho->{Name}; > > + target_cmd_root($ho, "virsh migrate $gn $dst", $timeout); > > } > > > > sub save ($$$$) { > > my ($self,$gho,$f,$timeout) = @_; > > - die "Save is not yet supported on libvirt."; > > + my $ho = $self->{Host}; > > + my $gn = $gho->{Name}; > > + target_cmd_root($ho, "virsh save $gn $f", $timeout); > > } > > > > sub restore ($$$$) { > > my ($self,$gho,$f,$timeout) = @_; > > - die "Restore is not yet supported on libvirt."; > > + my $ho = $self->{Host}; > > + target_cmd_root($ho, "virsh restore $f", $timeout); > > } > > > > 1; >