On 01/26/2012 10:16 AM, Peter Krempa wrote:
This patch adds support for the newly introduced
VIR_DOMAIN_CONSOLE_FORCE and VIR_DOMAIN_CONSOLE_SAFE flags. The console
command now has an optional parameter --force that specifies that the
user wants to forcibly interrupt an ongoing console session and create
a new one. Flag --safe requests that the console should be opened only
if the hypervisor driver supports safe console handling.
The behaviour to this point was that the daemon opened two streams to
the console, that competed for data from the pipe, and the result was
that both of the consoles ended up scrambled.
* tools/console.c:
- add support for flag passthrough
* tools/console.h:
- modify function prototypes to match impl.
* tools/virsh.c:
- add flag --force for the console command
What you have is good, but you should also add --safe and --force to
'virsh start --console' and 'virsh create --console'. Hmm, for virsh
start, naming it --force might be risky since we already have
--force-boot; there, I might go --force-console. It also means that if
we ever add unambiguous prefix option parsing, then --force would be
ambiguous; oh well.