From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ingo Molnar Subject: Re: [RFT/PATCH v2] kvm tools: Add read-only support for block devices Date: Fri, 15 Apr 2011 12:31:39 +0200 Message-ID: <20110415103139.GD28007@elte.hu> References: <1302804125-14281-1-git-send-email-penberg@kernel.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: kvm@vger.kernel.org, Asias He , Cyrill Gorcunov , Prasad Joshi , Sasha Levin To: Pekka Enberg Return-path: Received: from mx2.mail.elte.hu ([157.181.151.9]:47364 "EHLO mx2.mail.elte.hu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755595Ab1DOKbs (ORCPT ); Fri, 15 Apr 2011 06:31:48 -0400 Content-Disposition: inline In-Reply-To: <1302804125-14281-1-git-send-email-penberg@kernel.org> Sender: kvm-owner@vger.kernel.org List-ID: * Pekka Enberg wrote: > Add support for booting guests to host block devices in read-only mode. > > Cc: Asias He > Cc: Cyrill Gorcunov > Cc: Prasad Joshi > Cc: Sasha Levin > Cc: Ingo Molnar > Signed-off-by: Pekka Enberg > --- > tools/kvm/disk-image.c | 39 +++++++++++++++++++++++++++++++-------- > 1 files changed, 31 insertions(+), 8 deletions(-) Nice patch - booting into the host's userspace works out of box now. The following disk-image-less command: ./kvm run ../../arch/x86/boot/bzImage --readonly --image=/dev/sda --params="root=/dev/vda1" has booted all the way into the host's Fedora Rawhide userspace: =================================== Welcome to Fedora release 16 (Rawhide)! [...] Fedora release 16 (Rawhide) Kernel 2.6.39-rc3-tip+ on an x86_64 (ttyS0) aldebaran login: =================================== I ran this as unprivileged user (who had read access to the partitions in question). This is a very useful feature for testing kernels - i can test any random Linux box's userspace via KVM, without having to copy an image there! :-) Tested-by: Ingo Molnar Thanks, Ingo