s390x: launch: libvirt: Use <console> device sclp for appliance debug messages (RHBZ#1376547).

Thanks: Cole Robinson, Dan Horak, Thomas Huth.
This commit is contained in:
Richard W.M. Jones
2017-05-16 20:12:54 +02:00
parent 2d25872df3
commit 6328f33236

View File

@@ -1359,6 +1359,7 @@ construct_libvirt_xml_devices (guestfs_h *g,
return -1;
}
#ifndef __s390x__
/* Console. */
start_element ("serial") {
attribute ("type", "unix");
@@ -1370,6 +1371,22 @@ construct_libvirt_xml_devices (guestfs_h *g,
attribute ("port", "0");
} end_element ();
} end_element ();
#else
/* https://bugzilla.redhat.com/show_bug.cgi?id=1376547#c14
* and https://libvirt.org/formatdomain.html#elementCharConsole
*/
start_element ("console") {
attribute ("type", "unix");
start_element ("source") {
attribute ("mode", "connect");
attribute ("path", params->data->console_path);
} end_element ();
start_element ("target") {
attribute ("type", "sclp");
attribute ("port", "0");
} end_element ();
} end_element ();
#endif
/* Virtio-serial for guestfsd communication. */
start_element ("channel") {