[PATCH 6/7] conf: Set source type of the stub console

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



As "serials[0]->source.type". This is for kvm tool driver only
supports one console currently, and it setup ptys (redirect
the stdout/stderr of kvm tool process to the master pty, and
the slave pty path will be set to source path of the console)
for connect to the guest via console. If the console config
is like:

      <console type='pty'>
        <target type='serial' port='0'/>
      </console>

Things don't work, as kvm tool driver only tries to find consoles
and set the slave pty path to "consoles[0]->source.path". Though
another solution is to set the slave pty path to "serials[0]->source.path"
if no console of type "pty" can be found.
---
 src/conf/domain_conf.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 55121d8..138105e 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -7287,6 +7287,7 @@ static virDomainDefPtr virDomainDefParseXML(virCapsPtr caps,
                 goto no_memory;
             chr->deviceType = VIR_DOMAIN_CHR_DEVICE_TYPE_CONSOLE;
             chr->targetType = VIR_DOMAIN_CHR_CONSOLE_TARGET_TYPE_SERIAL;
+            chr->source.type = def->serials[0]->source.type;
         }
 
         chr->target.port = i;
-- 
1.7.6

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]