[virt-tools-list] [PATCH virt-install] virtinst: Add --transient flag.

Daniel P. Berrange berrange at redhat.com
Thu Jun 2 10:27:33 UTC 2016


On Thu, Jun 02, 2016 at 12:20:32PM +0200, Pavel Hrdina wrote:
> On Thu, Jun 02, 2016 at 11:02:27AM +0100, Richard W.M. Jones wrote:
> > On Thu, Jun 02, 2016 at 11:00:16AM +0200, Pavel Hrdina wrote:
> > > We should forbid to use --transient with all other types of install
> > > methods because it doesn't make any sense and it doesn't work.
> > > Unfortunately we need to add a check "if options.transient and
> > > (options.pxe or options.cdrom or ....), we cannot simply check for
> > > --import or --boot because --boot can be combined with any other
> > > install method.
> > 
> > I'm not sure I understand.  Surely a --pxe install (for example) could
> > involve a boot, and so --transient could be appropriate?
> > 
> > What other options are in the list elided above?
> 
> The thing is that virt-install has 2 phases while installing and each phase has
> its own XML.  The first phase is the install phase where install XML is used.
> After the installation is completed virt-install destroys the guest, replace the
> domain XML with boot XML and starts it again.
> 
> If you set that the domain is transient, the domain disappears after the first
> phase is completed.  Which leads to two different solutions:

> 1. allow --transient only with --import or --boot but not with other install
> options, because they redefine the domain XML
> 
> 2. update the code so also all other install option would be able to destroy the
> guest and start it again only as transient.  Currently it doesn't work.  If you
> use --noautoconsole or kill the virt-install during first phase there is no
> process that will start the guest again and if you let the virt-install to start
> the guest again it will fail with error message that the domain cannot be found.

IMHO it is valid to want to install a guest, but *not* start it after
installation is complete. IOW, --transient is semantically valid even
with --install IMHO - it just means you would not start it after intsall
completes.

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|




More information about the virt-tools-list mailing list