[Libguestfs] [Bug 1046905] New: RFE: add argument to virt-sysprep to disable individual default operations

Pino Toscano ptoscano at redhat.com
Tue Jan 7 10:16:08 UTC 2014


On Friday 27 December 2013 10:58:15 you wrote:
> virt-sysprep either runs with all default operations or a selected
> list of operations with the --enable argument.  A few times I've
> found I'd like to use the default list, but minus one or two
> operations in particular, however there's no easy way to specify
> this.
> 
> A --disable argument that took the default operation list and skipped
> selected operations would be useful.

A rough idea I had about this is adding a new --operations parameter, 
which would take a a comma-separated list of operations (just like the 
current --enable), but with the following differences:
- a leading minus would disable the specified operation
- it would recognize the meta-keywords "all" (for all the available
  operations) and "defaults" (for the ones enabled by default)
Processing the list of operations would add/remove them from the current 
set of operations, bailing out whether the resulting set is empty (just 
like right now --enable rejects an empty string).

This way, you could write e.g.:
- --operations defaults,-hostname,user-account
  runs the default ones but not "hostname", and the non-default
  "user-account"
- --operations all
  easy shortcut to run all the available operations
and so on.

--enable could just be an alias for --operations, or this new syntax 
could be added directly to --enable directly.

Maybe I'm over-engineering, but IMHO seems a better way than potentially 
adding a --disable argument and deal with the order of
--enable & --disable and their interactions.

-- 
Pino Toscano




More information about the Libguestfs mailing list