Description of problem: -q/--quiet is described to "Avoid extra informational messages."; however, it is not always respected. For example, I can see the following: $ virsh -q pool-refresh test Pool test refreshed $ virsh -q define some.xml Domain test defined from some.xml $ virsh -q pool-destroy test Pool test destroyed $ virsh -q undefine test Domain test has been undefined (there might be more, but I did not check further.) Indeed, all these outputs use the internal vshPrint function, which just prints the message regardless of the debug level and the quiet flag. From a cursory look, vshPrintExtra should instead respect -q. Version-Release number of selected component (if applicable): libvirt-client-1.3.3.1-4.fc24.x86_64 ... or also with current git/master
Fixed upstream by: commit b620bdee14472c811a4f48b665c6f5dac43253d7 Author: Pino Toscano <ptoscano> AuthorDate: Wed Aug 24 16:14:23 2016 +0200 Commit: Michal Privoznik <mprivozn> CommitDate: Wed Aug 24 17:43:29 2016 +0200 virsh: respect -q/--quiet more Turn various vshPrint() informative messages into vshPrintExtra(), so they are not printed when requesting the quiet mode; neither XML/info outputs nor the results of commands are affected. Also change the expected outputs of the virsh-undefine test, since virsh is invoked in quiet mode there. Some informative messages might still be converted (and thus silenced when in quiet mode), but this is an improvements nonetheless. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1358179
The fix was released as part of libvirt-2.2.0.