qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Running KVM guest on X86


From: Alex Williamson
Subject: Re: [Qemu-devel] Running KVM guest on X86
Date: Thu, 09 Aug 2012 11:54:45 -0600

On Thu, 2012-08-09 at 17:39 +0000, Bhushan Bharat-R65777 wrote:
> 
> > -----Original Message-----
> > From: Stuart Yoder [mailto:address@hidden
> > Sent: Thursday, August 09, 2012 8:28 PM
> > To: Bhushan Bharat-R65777
> > Cc: Alex Williamson; address@hidden; Avi Kivity
> > Subject: Re: [Qemu-devel] Running KVM guest on X86
> > 
> > On Tue, Aug 7, 2012 at 1:30 AM, Bhushan Bharat-R65777 <address@hidden>
> > wrote:
> > >
> > >
> > >> -----Original Message-----
> > >> From: Alex Williamson [mailto:address@hidden
> > >> Sent: Monday, August 06, 2012 9:27 PM
> > >> To: Bhushan Bharat-R65777
> > >> Cc: address@hidden; 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 <image.iso>).  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"
> > 
> > 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 proper 
> 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=ttyS0 root=/dev/sda" -m 1024 
> 
> I get below error :
> [    1.299225] No filesystem could mount root, tried:  ext3 ext2 ext4 iso9660
> [    1.303232] Kernel panic - not syncing: VFS: Unable to mount root fs on 
> unknown-block(8,0)


Chances are your root is a partition on /dev/sda, not the disk itself
(ex. sda1, sda2)... Why exactly are you causing yourself so much pain by
doing these direct boot, no VGA options instead of starting with an ISO
image, installing it, then setting up a serial console if you want
serial access?  This may be the norm for powerpc VMs, but it's not how I
think most people setup x86 VMs.  Thanks,

Alex

> [    1.307683] Pid: 1, comm: swapper/0 Not tainted 3.3.5-2.fc16.x86_64 #1
> [    1.311201] Call Trace:
> [    1.312548]  [<ffffffff815eac62>] panic+0xba/0x1cd
> [    1.315160]  [<ffffffff81cf1075>] mount_block_root+0x258/0x283
> [    1.318275]  [<ffffffff81cf10f3>] mount_root+0x53/0x57
> [    1.321047]  [<ffffffff81cf1234>] prepare_namespace+0x13d/0x176
> [    1.324206]  [<ffffffff81cf0d59>] kernel_init+0x156/0x15b
> [    1.327114]  [<ffffffff81089587>] ? schedule_tail+0x27/0xb0
> [    1.330102]  [<ffffffff815fd6a4>] kernel_thread_helper+0x4/0x10
> [    1.333413]  [<ffffffff81cf0c03>] ? start_kernel+0x3c5/0x3c5
> [    1.336446]  [<ffffffff815fd6a0>] ? gs_change+0x13/0x13
> 
> Thanks
> -Bharat
> 






reply via email to

[Prev in Thread] Current Thread [Next in Thread]