From: Mats Petersson Subject: Re: Hvm Guest Image Date: Tue, 17 Jul 2007 11:41:05 +0100 Message-ID: <469c9cee.393c420a.3043.04d9@mx.google.com> References: <11aecccc0707162208j2e99c758teeecb3357611057e@mail.gmail.com> <469c708d.2134440a.3b27.ffffca57@mx.google.com> <11aecccc0707170056o52dda91cv44a98c07e33d4397@mail.gmail.com> <469c7db9.2234440a.7f6e.ffff90cf@mx.google.com> <11aecccc0707170134n57ed89frf03ed6d2fb783f41@mail.gmail.com> <11aecccc0707170134n57ed89frf03ed6d2fb783f41@mail.gmail.com > Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Return-path: In-Reply-To: <11aecccc0707170134n57ed89frf03ed6d2fb783f41@mail.gmail.com > References: <11aecccc0707162208j2e99c758teeecb3357611057e@mail.gmail.com> <469c708d.2134440a.3b27.ffffca57@mx.google.com> <11aecccc0707170056o52dda91cv44a98c07e33d4397@mail.gmail.com> <469c7db9.2234440a.7f6e.ffff90cf@mx.google.com> <11aecccc0707170134n57ed89frf03ed6d2fb783f41@mail.gmail.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Xen Xen , xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org At 09:34 17/07/2007, Xen Xen wrote: >Well the problem is that i want to insert modules compiled from the >unmodified drivers into the hvm guest. >But there is a problem with the module version of both the hvm >guests kernel and the dom0 kernel where i am compiling them. So i >would need the same kernel running as dom0 to run as hvm guest. Any >way i can do it?? If you want to run the same kernel, then you shouldn't be using HVM-mode [there's no advantage in doing that if your goal isn't to run a "standard distro as it comes on the media"]. If you still want to run HVM, you need to have two different kernels + related modules, as the modules in Dom0 are compiled with the modified header files (and some have the source modified too) to allow them to behave nicely in a para-virtual environment (e.g. calling hypercalls to the Xen kernel when a standard kernel "just gets on with it"). There is work on coming up with a "para-virt-ops" kernel, which will "know" whether it's running on a hypervisor or not, and "adjust" it's internal functionality to suit the environment it's run in, but that's not ready for use yet [There was a 44-patch-set sent in today to this mailing list for possible inclusion in the Linux-mainstream kernel]. By the way, the best way to build unmodified drivers is to add the source-code to your installed guest-kernel, and build them. It should work reasonably well even with earlier versions of the kernel - as long as it's 2.6 and reasonably resent - 2.6.9 may not be new enough, but something a few steppings newer should be fine. Alternatively, take the linux-2.6.18.tar.bz2 that is downloaded during the build, untar it outside the xen-tree, add the unmodified drivers and build that. -- Mats >On 7/17/07, Mats Petersson ><mats@planetcatfish.com> wrote: >At 08:56 17/07/2007, Xen Xen wrote: > >the xen source directory that i downloaded has a ref-linux-2.6.18 directory. > >Is that the unmodified linux that i can use to install a hvm guest?? > >I don't know if the ref-linux-2.6.18 is suitable to build - it's >there as a "base" for the modifications for para-virtual Linux that >you need at least for Dom0. > >Well, the general way to use HVM is to install from a CDROM/DVD (or >ISO-file image instead of a CD/DVD) with a complete distro of Linux >(RedHat, SuSE, Debian, etc). > >Where do you get the rest of your Linux distro from? Doesn't that >come with a kernel that you can use? That would be my suggestion. > >-- >Mats > > > >On 7/17/07, Mats Petersson > ><mats > @planetcatfish.com> wrote: > >At 06:08 17/07/2007, you wrote: > > > > >I downloaded the xen source from the xen site did a make world and > > >make install to get the 2.6.16.33-xen kernel. > > >I made a initrd for the same and booted into it. > > >I want to now set up a hvm guest with the same image( 2.6.16.33-xen) > > >but grub gives me a unsupported executable format error 13? > > >Cant i use the same image for a hvm guest ? > > > > > >For HVM guests, you need an unmodified OS, so you can't use the same > >kernel as with a PV guest. [Unless you load Xen in the guest that is > >- but for most people that adds extra overhead for no extra gain, so > >that's probably not such a good suggestion] > > > >--- > >Mats > > > > > > >Thanks > > >_______________________________________________ > > >Xen-devel mailing list > > > Xen-devel@lists.xensource.com>Xen-devel@lists.xensource.com > > > http://lists.xensource.com/xen-devel > > > > > >_______________________________________________ > >Xen-devel mailing list > >Xen-devel@lists.xensource.com > >http://lists.xensource.com/xen-devel >