From: Emil Langrock Subject: Using virtioconsole as initial console Date: Sun, 20 Feb 2011 17:03:49 +0100 Message-ID: <201102201703.51483.emil.langrock@gmx.de> Mime-Version: 1.0 Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: kvm@vger.kernel.org Return-path: Received: from mailout-de.gmx.net ([213.165.64.22]:58206 "HELO mailout-de.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1752301Ab1BTQDz (ORCPT ); Sun, 20 Feb 2011 11:03:55 -0500 Sender: kvm-owner@vger.kernel.org List-ID: Hi, I am currently trying to move all emulated devices in an emulated environment using kvm (0.14~rc1) to their virtio counterparts. Network, block, pci, rng and 9p were no problem, but the virtualised console gives me a hard time. I start my image using following options: $ qemu-system-x86_64 -m 128 -kernel vmlinuz-2.6.38-rc5 \ -drive file=root.img,if=virtio \ -net nic,macaddr=02:ca:ff:ee:ba:be,model=virtio,vlan=1 \ -net tap,ifname=tap1,vlan=1,script=no \ -serial none -chardev stdio,mux=on,id=cons \ -device virtio-serial \ -device virtconsole,chardev=cons,name=console.0 -mon cons -nographic \ -append "root=/dev/vda console=hvc0" The login (rungetty) shows up at hvc0, but I see no kernel output at all. So I checked that /dev/console works: $ echo 1 > /dev/hvc0 1 $ ls -l /dev/console crw------- 1 root root 5, 1 Feb 20 15:40 /dev/console $ echo 1 > /dev/console sh: cannot create /dev/console: No such device It seems that the initial console wasn't initialised correctly. dmesg also shows signs for a problem: ====================================== [ 0.000000] Kernel command line: root=/dev/vda console=hvc0 ...... [ 1.685883] device class 'virtio-ports': registering [ 1.686523] bus: 'virtio': add driver virtio_console [ 1.686584] bus: 'virtio': driver_probe_device: matched device virtio1 with driver virtio_console [ 1.686592] bus: 'virtio': really_probe: probing driver virtio_console with device virtio1 [ 1.694356] device: 'vport0p0': device_add [ 1.695558] driver: 'virtio1': driver_bound: bound to device 'virtio_console' [ 1.695564] bus: 'virtio': really_probe: bound device virtio1 to driver virtio_console ...... [ 1.707061] device: 'hvc0': device_add ...... [ 1.791875] Warning: unable to open an initial console. ====================================== Has anyone an idea how this initialisation of the initial console can be fixed or how i can debug it further? It is the default way to setup the initial console in xen, right? So I would think that my kernel parameter should be ok... hopefully. Kind regards, Emil