From mboxrd@z Thu Jan 1 00:00:00 1970 From: Osier Yang Subject: [libvirt] [PATCH 6/7] conf: Set source type of the stub console Date: Fri, 11 Nov 2011 19:57:05 +0800 Message-ID: <1321012626-31713-8-git-send-email-jyang@redhat.com> References: <1321012626-31713-1-git-send-email-jyang@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: libvir-list@redhat.com, kvm@vger.kernel.org, penberg@cs.helsinki.fi, levinsasha928@gmail.com, gorcunov@gmail.com, mingo@elte.hu, asias.hejun@gmail.com Return-path: In-Reply-To: <1321012626-31713-1-git-send-email-jyang@redhat.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com List-Id: kvm.vger.kernel.org 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: 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