
On Tue, Jul 05, 2016 at 02:35:28PM +0200, Paolo Bonzini wrote:
This is preferrable to -nographic which (in addition to disabling graphics output) redirects the serial port to stdio and on OpenBIOS enables the firmware's serial console.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> --- src/qemu/qemu_command.c | 7 ++++- src/qemu/qemu_parse_command.c | 4 +++ .../qemuargv2xml-nographics-vga-display.args | 23 +++++++++++++++ .../qemuargv2xml-nographics-vga-display.xml | 34 ++++++++++++++++++++++ tests/qemuargv2xmltest.c | 1 + .../qemuxml2argv-nographics-display.args | 22 ++++++++++++++ .../qemuxml2argv-nographics-display.xml | 25 ++++++++++++++++ tests/qemuxml2argvtest.c | 2 ++ tests/qemuxml2xmltest.c | 2 +- 9 files changed, 118 insertions(+), 2 deletions(-) create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-nographics-vga-display.args create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-nographics-vga-display.xml create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-nographics-display.args create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-nographics-display.xml
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 3898ed7..68ee313 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -9210,7 +9210,12 @@ qemuBuildCommandLine(virQEMUDriverPtr driver, * these defaults ourselves... */ if (!def->ngraphics) { - virCommandAddArg(cmd, "-nographic"); + if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_DISPLAY)) { + virCommandAddArg(cmd, "-display"); + virCommandAddArg(cmd, "none"); + } else { + virCommandAddArg(cmd, "-nographic"); + }
Am I right in thinking that -display none vs -nographic has *no* effect on guest machine ABI ? I think we're safe based on my reading of it, particularly since we use -nodefaults and -nodefconfig, but want to confirm there's no edge case i'm not aware of. Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|