Description of problem: 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. Version-Release number of selected component (if applicable): libguestfs-tools-1.22.7-4.fc19.x86_64
Note this is possible already by running this non-obvious command: ops=`virt-sysprep --list-operations | fgrep ' * ' | grep -v tmp-files | awk -vORS=, '{print $1}' | sed 's/,$/\n/'` virt-sysprep --enable $ops -a disk.img (runs all default operations except tmp-files) Pino can have a look at this, as a low priority. The reason this wasn't implemented initially is that it's not clear what the semantics are when people start to use multiple --disable and --enable options, or use both options together, or they think that order matters. Likely any attempt to use multiple --enable and/or --disable options should be rejected.
Yes, I've been doing something similar, but it's not terribly elegant. Having --enable/disable options be exclusive would be perfectly acceptable for me.
This is fixed with https://github.com/libguestfs/libguestfs/commit/efb5f1841524ec75d765368b447270b8a3aff8ac which is in libguestfs >= 1.25.21. Basically (back to Richard's example in #c2) now you can do: virt-sysprep --operations defaults,-tmp-files ... to execute all the default operations (i.e. those that would be executed specifying no --enable/--operations) minus the tmp-files one.