From mboxrd@z Thu Jan 1 00:00:00 1970 From: Oliver Rath Subject: Howto connect to a terminal in an emalated linux-livecd? Date: Thu, 11 Sep 2014 13:48:51 +0200 Message-ID: <54118C23.60209@mglug.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit To: kvm@vger.kernel.org Return-path: Received: from phineas.fibbs.org ([109.234.106.32]:48679 "EHLO mail.fibbs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753310AbaIKL4w (ORCPT ); Thu, 11 Sep 2014 07:56:52 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.fibbs.org (Postfix) with ESMTP id D8E5A20042E for ; Thu, 11 Sep 2014 13:48:55 +0200 (CEST) Received: from mail.fibbs.org ([127.0.0.1]) by localhost (mail.fibbs.org [127.0.0.1]) (amavisd-new, port 10025) with ESMTP id g-19Y5yQULRz for ; Thu, 11 Sep 2014 13:48:55 +0200 (CEST) Received: from [IPv6:2003:62:4849:bf00:d9f2:1dc8:2018:a8d6] (p200300624849BF00D9F21DC82018A8D6.dip0.t-ipconnect.de [IPv6:2003:62:4849:bf00:d9f2:1dc8:2018:a8d6]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mail.fibbs.org (Postfix) with ESMTPSA id 9037620042D for ; Thu, 11 Sep 2014 13:48:55 +0200 (CEST) Sender: kvm-owner@vger.kernel.org List-ID: Hi list, after hours for searching in google-world, i didnt find any appropriate for this problem: I want to boot a live-cd (i.e. ubuntu 14.04.1-desktop) in qemu, which starts with an graphical interface, done i.e. by qemu-system-x86_64 -m 3G -smp 2 -drive file=ubuntu-14.04.1-desktop-i386.iso,media=cdrom,if=virtio --enable-kvm Now i want to access to the console of the ubuntu-livecd. At the moment i can do this over changing to text mode via sendkey ctrl-alt-f1 in qemu-console (Alt-2), then switching back to qemu-window (alt-1). Now i have access to tty1 of my livecd. But IMHO there should be a more simple way to access to such a console with qemu, i.e. through a pipe, a serial console etc., but i didnt found anything working. The best i got was with -chardev pty,id=myid, which resulted in a "char device redirected to /dev/pts/0 (label myid)". But with a "screen /dev/pts/0" i wasnt able to see any input or output. ssh is unfortunatly not available at this time on the livecd (so i could connect i.e. via -net user,hostfwd:tcp:10022-:22) Any hints to connect directly to a console in an emulated linux? Tfh! Oliver