Re: [PATCH 3/3] virsh: add --paused option to create

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> diff --git a/tools/virsh.c b/tools/virsh.c
> index 1279f41..6b05949 100644
> --- a/tools/virsh.c
> +++ b/tools/virsh.c
> @@ -1141,6 +1141,7 @@ static const vshCmdOptDef opts_create[] = {
>  #ifndef WIN32
>      {"console", VSH_OT_BOOL, 0, N_("attach to console after creation")},
>  #endif
> +    {"paused", VSH_OT_BOOL, 0, N_("leave the guest paused after creation")},
>      {NULL, 0, 0, NULL}
>  };
> 
> @@ -1155,6 +1156,9 @@ cmdCreate(vshControl *ctl, const vshCmd *cmd)
>  #ifndef WIN32
>      int console = vshCommandOptBool(cmd, "console");
>  #endif
> +    unsigned int paused = (vshCommandOptBool(cmd, "paused")
> +                           ? VIR_DOMAIN_START_PAUSED
> +                           : VIR_DOMAIN_NONE);

I'd probably name this variable "flags" to avoid confusion (or the need to
rename it) if new flags are added to virDomainCreateXML().

...

> diff --git a/tools/virsh.pod b/tools/virsh.pod
> index 08e361d..3cadb87 100644
> --- a/tools/virsh.pod
> +++ b/tools/virsh.pod
> @@ -265,11 +265,13 @@ The option I<--disable> disables autostarting.
> 
>  Connect the virtual serial console for the guest.
> 
> -=item B<create> I<FILE>
> +=item B<create> I<FILE> optional I<--console> I<--paused>
> 
>  Create a domain from an XML <file>. An easy way to create the XML
>  <file> is to use the B<dumpxml> command to obtain the definition of a
> -pre-existing guest.
> +pre-existing guest.  The domain will be paused if the I<--option>

Should be "--paused" instead of "--option".

> +is used and supported by the driver; otherwise it will be running.
> +If I<--console> is requested, attach to the console after creation.
> 
>  B<Example>

ACK after making those tweaks.

Jirka

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]