[Libguestfs] [PATCH v2 2/2] p2v: add a Shutdown action (RHBZ#1642044)

Pino Toscano ptoscano at redhat.com
Tue Nov 6 15:06:35 UTC 2018


On Tuesday, 6 November 2018 14:07:51 CET Richard W.M. Jones wrote:
> On Tue, Nov 06, 2018 at 12:51:30PM +0100, Pino Toscano wrote:
> > +static void
> > +shutdown_clicked (GtkWidget *w, gpointer data)
> > +{
> > +  if (!is_iso_environment)
> > +    return;
> > +
> > +  sync ();
> > +  sleep (2);
> > +  ignore_value (system ("/sbin/shutdown now"));
> > +}
> 
> I've tested this and it works but of course it doesn't in fact power
> off the machine.  Would it be better to run "/sbin/poweroff" instead?

Hm shutdown by default does poweroff, and in my testing the VM was
powered off.  Do you see the VM still running after the system
shutdown?

-- 
Pino Toscano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <http://listman.redhat.com/archives/libguestfs/attachments/20181106/2d9d5cb0/attachment.sig>


More information about the Libguestfs mailing list