From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:47958) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SzkRo-0003dT-Es for qemu-devel@nongnu.org; Fri, 10 Aug 2012 04:19:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SzkRl-00035Z-JV for qemu-devel@nongnu.org; Fri, 10 Aug 2012 04:19:56 -0400 Received: from va3ehsobe001.messaging.microsoft.com ([216.32.180.11]:11299 helo=va3outboundpool.messaging.microsoft.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SzkRl-00035I-En for qemu-devel@nongnu.org; Fri, 10 Aug 2012 04:19:53 -0400 From: Bhushan Bharat-R65777 Date: Fri, 10 Aug 2012 08:19:49 +0000 Message-ID: <6A3DF150A5B70D4F9B66A25E3F7C888D03DF7609@039-SN2MPN1-022.039d.mgd.msft.net> References: <6A3DF150A5B70D4F9B66A25E3F7C888D03DF0AC5@039-SN2MPN1-022.039d.mgd.msft.net> <1344268591.3441.45.camel@ul30vt.home> <6A3DF150A5B70D4F9B66A25E3F7C888D03DF2388@039-SN2MPN1-022.039d.mgd.msft.net> <6A3DF150A5B70D4F9B66A25E3F7C888D03DF6537@039-SN2MPN1-022.039d.mgd.msft.net> <20120810072416.GB24410@redhat.com> In-Reply-To: <20120810072416.GB24410@redhat.com> Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [Qemu-devel] Running KVM guest on X86 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gleb Natapov Cc: Avi Kivity , Alex Williamson , "qemu-devel@nongnu.org" , Stuart Yoder > > > >> On Mon, 2012-08-06 at 15:40 +0000, Bhushan Bharat-R65777 wrote: > > > >> > Hi Avi/All, > > > >> > > > > >> > I am facing issue to boot KVM guest on x86 (I used to work on > > > >> > PowerPC platform > > > >> and do not have enough knowledge of x86). I am working on making > > > >> VFIO working on PowerPC Booke, So I have cloned Alex Williamsons > > > >> git repository, compiled kernel for x86 on fedora with > > > >> virtualization configuration (selected all kernel config options > > > >> for same). Run below command to boot Guest (I have not provided vf= io > device yet): > > > >> > > > > >> > "qemu-system-x86_64 -enable-kvm -m 1024 -nographic -kernel > > > >> arch/x86_64/boot/bzImage -initrd /boot/initramfs-3.5.0-rc4+.img > > > >> -serial tcp::4444,server,telnet" > > > >> > > > > >> > After the I can see qemu command line (able to run various > > > >> > commands like "info > > > >> registers" etc), while guest does not boot (not even the first pri= nt > comes). > > > >> > > > > >> > Can anyone help in what I am missing or doing wrong? > > > >> > > > >> x86 doesn't use the serial port for console by default, so you're > > > >> making things quite a bit more difficult that way. Typically > > > >> you'll want to provide a disk image (the -hda option is the > > > >> easiest way to do this), a display (-vga std -vnc :0 is again > > > >> easiest), and probably something to install from (-cdrom > > > >> ). You can also add a -boot d to get it to choose the = cdrom > the first time for install. > > > >> Thanks, > > > > > > > > Thanks Avi and Alex, I can see the KVM guest boot prints by adding > > > > -append > > > "console=3DttyS0" > > > > > > Note, once you get to user space you will need a getty specified in > > > inittab in order to get a login on your serial port. Something like= : > > > > > > T0:23:respawn:/sbin/getty -L ttyS0 > > > > 1) > > I tried booting with prebuilt qcow2 then it works for me: > > qemu-system-x86_64 -enable-kvm -nographic -device sga -m 1024 -hda > > debian_squeeze_amd64_standard.qcow2 > > > > Does anyone help on how I can add my kernel to qcow2? Or create a prope= r > qcow2? > > > > 2) > > Also I tried as mentioned in section "3.9 Direct Linux Boot": > http://qemu.weilnetz.de/qemu-doc.html#disk_005fimages : > > > > qemu-kvm -enable-kvm -nographic -kernel /boot/vmlinuz-3.5.0+ -hda > > /boot/initramfs-3.5.0+.img -append "console=3DttyS0 root=3D/dev/sda" -= m > > 1024 > > > -hda /boot/initramfs-3.5.0+.img is incorrect. Should be -hda > debian_squeeze_amd64_standard.qcow2 -initrd /boot/initramfs-3.5.0+.img an= d > root=3D/dev/sda1 probably. I tried : qemu-system-x86_64 -enable-kvm -nographic -kernel /boot/vmlinuz-3.5.0+ = -initrd /boot/initramfs-3.5.0+.img -append "root=3D/dev/sda1 rw console=3D= ttyS0" -m 1024 -hda debian_squeeze_amd64_standard.qcow2 With this I get the login prompt, but it is not taking input character from= keyboard properly (not able to give login credentials even). Seeing some w= eird behavior, like sometimes it treat normal character as like ENTER press= ed. Below are some boot prints and it is found that there were some junk charac= ters after "Setting console screen modes". -------------- Setting console screen modes. ]Rcannot (un)set powersave mode [9;30][14;30]Skipping font and keymap setup (handled by console-setup). Setting up console font and keymap...done. [ 11.547904] rc (278) used greatest stack depth: 1760 bytes left Starting portmap daemon...Already running.. Starting NFS common utilities: statd. Starting enhanced syslogd: rsyslogd. Starting deferred execution scheduler: atd. Starting ACPI services.... Starting periodic command scheduler: cron. Starting MTA: exim4. Debian GNU/Linux 6.0 debian-amd64 ttyS0 debian-amd64 login: ------------ Thanks=20 -Bharat