From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:53117) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SyeGP-0005gD-TM for qemu-devel@nongnu.org; Tue, 07 Aug 2012 03:31:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SyeGJ-00089J-TB for qemu-devel@nongnu.org; Tue, 07 Aug 2012 03:31:37 -0400 Received: from mx1.redhat.com ([209.132.183.28]:51221) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SyeGJ-00087L-Kr for qemu-devel@nongnu.org; Tue, 07 Aug 2012 03:31:31 -0400 Date: Tue, 7 Aug 2012 10:31:26 +0300 From: Gleb Natapov Message-ID: <20120807073126.GA3315@redhat.com> References: <6A3DF150A5B70D4F9B66A25E3F7C888D03DF0AC5@039-SN2MPN1-022.039d.mgd.msft.net> <1344268591.3441.45.camel@ul30vt.home> <6A3DF150A5B70D4F9B66A25E3F7C888D03DF2388@039-SN2MPN1-022.039d.mgd.msft.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6A3DF150A5B70D4F9B66A25E3F7C888D03DF2388@039-SN2MPN1-022.039d.mgd.msft.net> Subject: Re: [Qemu-devel] Running KVM guest on X86 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Bhushan Bharat-R65777 Cc: Alex Williamson , "qemu-devel@nongnu.org" , Avi Kivity On Tue, Aug 07, 2012 at 06:30:05AM +0000, Bhushan Bharat-R65777 wrote: > > > > -----Original Message----- > > From: Alex Williamson [mailto:alex.williamson@redhat.com] > > Sent: Monday, August 06, 2012 9:27 PM > > To: Bhushan Bharat-R65777 > > Cc: qemu-devel@nongnu.org; Avi Kivity > > Subject: Re: Running KVM guest on X86 > > > > 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 vfio > > 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 print 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=ttyS0" > > Now my exact command is like: > "qemu-system-x86_64 -enable-kvm -nographic -nodefconfig -kernel /boot/vmlinuz-3.5.0+ -initrd /boot/initramfs-3.5.0+.img -append "console=ttyS0" -hda fedora.qcow -m 1024" > > Where fedora.qcow is created by "qemu-img create fedora.qcow 5G" > > With this it is falling to Dracut, below are the error prints: > > -------------------- > [ 2.288931] dracut: FATAL: No or empty root= argument > [ 2.291808] dracut: Refusing to continue > > > [ 2.294721] dracut Warning: Signal caught! > dracut Warning: Signal caught! > [ 2.298894] dracut Warning: dracut: FATAL: No or empty root= argument > dracut Warning: dracut: FATAL: No or empty root= argument > [ 2.304713] dracut Warning: dracut: Refusing to continue > dracut Warning: dracut: Refusing to continue > > [ 2.320311] init (1) used greatest stack depth: 2664 bytes left > [ 2.323851] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000100 > [ 2.323851] > [ 2.324551] Pid: 1, comm: init Not tainted 3.5.0+ #7 > [ 2.324551] Call Trace: > [ 2.324551] [] panic+0xc6/0x1e1 > [ 2.324551] [] ? _raw_write_unlock_irq+0x30/0x50 > [ 2.324551] [] do_exit+0xa20/0xb70 > [ 2.324551] [] ? retint_swapgs+0x13/0x1b > [ 2.324551] [] do_group_exit+0x4f/0xc0 > [ 2.324551] [] sys_exit_group+0x17/0x20 > [ 2.324551] [] system_call_fastpath+0x16/0x1b > ----------------- > > Should I mount the root-file-system in disk and pass -append "root=. > Yes, you should. Not , but root device. Something like "root=/dev/sda1" > I had no luck when I tried "qemu-system-x86_64 -device virtio-scsi-pci,id=scsi -enable-kvm -nographic -nodefconfig -nodefaults -chardev stdio,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0 -drive file=fedora.qcow,if=none,id=sda -device scsi-disk,bus=scsi.0,drive=sda -device sga -kernel /boot/vmlinuz-3.5.0+ -initrd /boot/initramfs-3.5.0+.img -append "console=ttyS0" -m 1024" > > > Thanks in Advance > -Bharat > -- Gleb.