public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Sasha Levin <levinsasha928@gmail.com>
To: Pekka Enberg <penberg@kernel.org>
Cc: Avi Kivity <avi@redhat.com>,
	kvm@vger.kernel.org,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Asias He <asias.hejun@gmail.com>,
	Cyrill Gorcunov <gorcunov@gmail.com>, Ingo Molnar <mingo@elte.hu>,
	Prasad Joshi <prasadjoshi124@gmail.com>
Subject: Re: [PATCH] kvm tools: Boot to host /bin/sh via 9p by default
Date: Tue, 09 Aug 2011 23:30:25 +0300	[thread overview]
Message-ID: <1312921825.3619.3.camel@lappy> (raw)
In-Reply-To: <CAOJsxLFJj=KfrY9QmEGBOqWV1Li=G8V5=uP0AM8N7JkiTjvdPg@mail.gmail.com>

On Tue, 2011-08-09 at 23:15 +0300, Pekka Enberg wrote:
> On Tue, Aug 9, 2011 at 11:06 PM, Sasha Levin <levinsasha928@gmail.com> wrote:
> > On Tue, 2011-08-09 at 19:59 +0300, Avi Kivity wrote:
> >> On 08/09/2011 06:33 PM, Pekka Enberg wrote:
> >> > This patch updates 'kvm run' to boot to host filesystem via 9p '/bin/sh' by
> >> > default:
> >> >
> >> >    $ ./kvm run
> >> >      # kvm run -k ../../arch/x86/boot/bzImage -m 320 -c 2 --name guest-3462
> >> >    [    0.000000] Linux version 3.1.0-rc1+ (penberg@tiger) (gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5) ) #7 SMP PREEMPT Tue Aug 9 16:39:20 EEST 2011
> >> >    [    0.000000] Command line: notsc noapic noacpi pci=conf1 reboot=k panic=1 console=ttyS0 earlyprintk=serial  init=/bin/sh  root=/dev/vda rw  root=/dev/root rootflags=rw,trans=virtio,version=9p2000.u rootfstype=9p
> >> >
> >> >    [snip]
> >> >
> >> >    [    1.803261] VFS: Mounted root (9p filesystem) on device 0:13.
> >> >    [    1.805153] devtmpfs: mounted
> >> >    [    1.808353] Freeing unused kernel memory: 924k freed
> >> >    [    1.810592] Write protecting the kernel read-only data: 12288k
> >> >    [    1.816268] Freeing unused kernel memory: 632k freed
> >> >    [    1.826030] Freeing unused kernel memory: 1448k freed
> >> >    sh: cannot set terminal process group (-1): Inappropriate ioctl for device
> >> >    sh: no job control in this shell
> >> >    sh-4.1#
> >> >
> >>
> >> Most kernels won't have 9p built-in, so how about building a tiny initrd
> >> to load the needed modules?
> >>
> >> btw, I get
> >>
> >> # ./kvm run
> >>    # kvm run -k ../../arch/x86/boot/bzImage -m 1728 -c 24 --name guest-10193
> >> <hang>
> >>
> >
> > This is usually the case of missing serial console support in the guest
> > kernel.
> >
> > You can either enable these:
> >        CONFIG_SERIAL_8250=y
> >        CONFIG_SERIAL_8250_CONSOLE=y
> >
> > Switch to virtio console using '--console virtio', or boot into a
> > graphical console using '--sdl' or '--vnc'.
> 
> Can we somehow sanely detect that the kernel doesn't support serial
> console and switch to virtio console?

Probably, will look into it tomorrow.

-- 

Sasha.


      reply	other threads:[~2011-08-09 20:31 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-09 15:33 [PATCH] kvm tools: Boot to host /bin/sh via 9p by default Pekka Enberg
2011-08-09 15:36 ` Pekka Enberg
2011-08-09 15:37   ` Ingo Molnar
2011-08-09 16:59 ` Avi Kivity
2011-08-09 17:33   ` Pekka Enberg
2011-08-09 20:06   ` Sasha Levin
2011-08-09 20:15     ` Pekka Enberg
2011-08-09 20:30       ` Sasha Levin [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1312921825.3619.3.camel@lappy \
    --to=levinsasha928@gmail.com \
    --cc=asias.hejun@gmail.com \
    --cc=avi@redhat.com \
    --cc=gorcunov@gmail.com \
    --cc=kvm@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=penberg@kernel.org \
    --cc=prasadjoshi124@gmail.com \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox