From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sasha Levin Subject: Re: [PATCH 2/2] kvm tools: Add virtio-9p Date: Wed, 18 May 2011 15:01:30 +0300 Message-ID: <1305720090.12150.106.camel@sasha> References: <1305657337-2584-1-git-send-email-levinsasha928@gmail.com> <1305657337-2584-2-git-send-email-levinsasha928@gmail.com> <20110517184023.GC16689@elte.hu> <1305659307.12150.37.camel@sasha> <1305664052.12150.43.camel@sasha> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: penberg@kernel.org, asias.hejun@gmail.com, prasadjoshi124@gmail.com, gorcunov@gmail.com, kvm@vger.kernel.org, Eric Van Hensbergen To: Ingo Molnar Return-path: Received: from mail-ew0-f46.google.com ([209.85.215.46]:39277 "EHLO mail-ew0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932964Ab1ERMBf (ORCPT ); Wed, 18 May 2011 08:01:35 -0400 Received: by ewy4 with SMTP id 4so413180ewy.19 for ; Wed, 18 May 2011 05:01:34 -0700 (PDT) In-Reply-To: <1305664052.12150.43.camel@sasha> Sender: kvm-owner@vger.kernel.org List-ID: On Tue, 2011-05-17 at 23:27 +0300, Sasha Levin wrote: > On Tue, 2011-05-17 at 22:08 +0300, Sasha Levin wrote: > > 'kvm_9p' isn't created as a device under /dev, it's just a name used > > internally by 9pnet_virtio (and located under sysfs). > > > > I couldn't figure out which params the kernel would expect to boot using > > 9p over virtio (theres no device name to begin with). > > > > I've also couldn't find anything that suggested it's possible to boot > > using virtio-9p as rootfs. > > Ignore that. > > Naming the virtio transport "/dev/root" and passing proper params to the > kernel makes it work: > > [ 1.844983] VFS: Mounted root (9p filesystem) on device 0:11. > > I'll make some changes to the virtio-9p patch to make it easier for the > user to do that. > Just to sum the '9p bootability' discussion, It is possible to boot from virtio-9p devices. The sample disk image provided by qemu (the one we link in our README) boots just fine. I've had to use a 2.6.39 kernel when booting, using the 2.6.37 kernel which we have in kvm tools tree doesn't work. I haven't investigated why yet. Transport name must be called "/dev/root". Both when defining it for the virtio transport and in the kernel root= parameter. Changing either of them leads to: '9p: no channels available'. Here is the command line I've used (rootfs/ is a mount of 'linux-0.2.img'): ./kvm run -m 256 --virtio-9p rootfs/ --params "root=/dev/root rootflags=rw,trans=virtio,version=9p2000,debug=0x00 rootfstype=9p rw" -k /boot/bzImage When trying to boot a distribution rootfs we get a lot of symbolic link and file locking errors, since neither of those is supported by legacy 9p2000 - thats understandable. It just prevents from almost anything more complicated than simple command line from working properly. -- Sasha.