From: Ian Campbell Subject: Re: [PATCH RFC OSSTEST 6/9] Toolstack: Refactor guest lifecycle. Date: Tue, 17 Jun 2014 17:56:39 +0100 Message-ID: <1403024199.25771.40.camel@kazak.uk.xensource.com> References: <1403018758.25074.5.camel@kazak.uk.xensource.com> <1403018809-25509-6-git-send-email-ian.campbell@citrix.com> <1403023514.16864.210.camel@Solace> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1403023514.16864.210.camel@Solace> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Dario Faggioli Cc: ian.jackson@eu.citrix.com, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Tue, 2014-06-17 at 18:45 +0200, Dario Faggioli wrote: > On mar, 2014-06-17 at 16:26 +0100, Ian Campbell wrote: > > Implement destory/create as per toolstack methods, including implementing the > > libvirt version which previously didn't work. To do this we use the virsh > > capability to convert an xl/xm style config file into the correct XML. > > > > xend basically calls into the xl helper since they are compatible. > > > > Signed-off-by: Ian Campbell > > --- > > > +sub create ($$) { > > + my ($self,$cfg) = @_; > > + my $ho = $self->{Host}; > > + my $lcfg = $cfg; > > + $lcfg =~ s,/,-,g; > > + $lcfg = "$ho->{Name}--$lcfg"; > > + target_cmd_root($ho, "virsh domxml-from-native xen-xm $cfg > $cfg.xml", 30); > > + target_getfile_root($ho,60,"$cfg.xml", "$stash/$lcfg"); > > + target_cmd_root($ho, "virsh create --file $cfg.xml", 100); > > +} > > + > I agree that domxml-from-native would be the best thing to do here. > > However, we need to double check how well it works, and probably commit > to improve that, as, last time I checked, it was doing a pretty poor > job. :-( > > Jim, what's the status of that thing? It worked well enough for osstest to start a guest with its usual config, with the libvirt bugfix I sent out a few hours ago. But the whole point of the tests is to find bugs, so I don't see the fact that this may or may not be buggy as a reason for osstest not to use it. If that shows that it is buggy then we should fix it. Ian.