secdev geek
2009-Dec-04 21:19 UTC
[Xen-users] how to get xen with a kernel 2.6.27 or above?
Hi list, I am starting a academic security related project and I was wondering if there is any documentation on compiling xen/dom0 with a recent kernel? I''ve seen a few good intentioned threads, but no real documentation so far. Any helpful pointers will be greatly appreciated! Thanks in advance, - SDG P.S: First mail, not sure if I should post it here...let me know if I am on the wrong list. :-) _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Stefan Kuhne
2009-Dec-04 21:26 UTC
Re: [Xen-users] how to get xen with a kernel 2.6.27 or above?
secdev geek schrieb:> > I am starting a academic security related project and I was wondering if > there is any documentation on compiling xen/dom0 with a recent kernel? > > I''ve seen a few good intentioned threads, but no real documentation so > far. Any helpful pointers will be greatly appreciated! >The best Manual ist here: http://wiki.xensource.com/xenwiki/XenDom0Kernels Stefan Kuhne _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Tapas Mishra
2009-Dec-04 21:30 UTC
Re: [Xen-users] how to get xen with a kernel 2.6.27 or above?
Some one explained me in detail on community so I am forwarding same here This guide will explicate in detail about the procedure for compiling vanilla kernel from source and customize it according to your hardware specifications and then compiling latest XEN from source and patching it with Linux. First install these packages: sudo apt-get install iproute bridge-utils gcc make gettext sudo apt-get install libcurl4-openssl-dev è openssl problem resolved sudo apt-get install python-dev zlib1g-dev bcc libsdl-dev pciutils-dev è zlib problem resolved. First we will compile latest XEN Hypervisor from source. Go to http://www.xen.org/products/xen_source.html and download the latest XEN hypervisor from there. [Version 3.4.1 at the time of writing the guide] Xen 3.4.1 is available WITH and WITHOUT 2.6.18 dom0 kernel. We need the version without dom0 linux because we will compile our own vanilla kernel. I am seting up XEN 3.4.1 on amd64 hardware and running debian distribution on it with upgraded kernel. My hardware specifications: unme -a Linux -04 2.6.31.4-user-kvm-vanilla #1 SMP Wed Oct 21 16:35:11 BST 2009 x86_64 GNU/Linux Build / Install Xen 1. mkdir /home/tapas/xen 2. cd /home/tapas/xen 3. tar -xzf xen-3.4.1 4. cd xen-3.4.1 5. make xen 6. make install-xen 7. make tools 8. make install-tools Build Vanilla kernel Now we will build th PV_Ops Kernel. The Vanilla kernel source will be downloaded from Jeremy''s tree. Jeremy''s git tree on kernel.org contains the pv_ops dom0 patches. If we use Jeremy''s tree then we do not any extra patches to bind XEN with kernel source. 1. mkdir /home/tapas/linux 2. cd /home/tapas/linux 3. git clone git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen.git 4. linux-2.6-xen 5. cd linux-2.6-xen 6. git checkout origin/xen/master -b xen/master 7. make menuconfig [see Note below] 8. make-kpkg clean 9. CONCURRENCY_LEVEL=N fakeroot make-kpkg --initrd --append-to-version=-custom kernel_image kernel_headers 10. This will make the debian packages in the parent directory which you can install Note: Please choose the following xen specific optiions in kernel configuration. Processor type and features ---> Subarchitecture Type (PC-compatible) ---> (X) Enable Xen compatible kernel Bus options (PCI etc.) ---> [*] PCI support [*] Xen PCI Frontend [ ] Xen PCI Frontend Debugging (NEW) Device Drivers ---> XEN ---> [*] Privileged Guest (domain 0) <*> Backend driver support (NEW) <*> Block-device backend driver (NEW) <*> Block-device tap backend driver (NEW) <*> Network-device backend driver (NEW) (8) Maximum simultaneous transmit requests (as a power of 2) (NEW) [ ] Pipelined transmitter (DANGEROUS) (NEW) < > Network-device loopback driver (NEW) <*> PCI-device backend driver (NEW) PCI Backend Mode (Virtual PCI) ---> [ ] PCI Backend Debugging (NEW) < > TPM-device backend driver (NEW) <M> SCSI backend driver (NEW) < > TPM-device backend driver (NEW) <M> SCSI backend driver (NEW) <M> Block-device frontend driver <M> Network-device frontend driver <M> Network-device frontend driver acceleration for Solarflare NICs (NEW) <M> SCSI frontend driver (NEW) <*> User-space granted page access driver (NEW) <*> Framebuffer-device frontend driver (NEW) <*> Keyboard-device frontend driver (NEW) [*] Disable serial port drivers (NEW) <*> Export Xen attributes in sysfs (NEW) (256) Number of guest devices (NEW) Xen version compatibility (3.0.4 and later) ---> After xen confiuration, please make sure that .config has the following parameter configuration: * CONFIG_XEN=y * CONFIG_XEN_MAX_DOMAIN_MEMORY=32 * CONFIG_XEN_SAVE_RESTORE=y * CONFIG_XEN_DOM0=y * CONFIG_XEN_PRIVILEGED_GUEST=y * CONFIG_XEN_PCI=y * CONFIG_PCI_XEN=y * CONFIG_XEN_BLKDEV_FRONTEND=m * CONFIG_NETXEN_NIC=m * CONFIG_XEN_NETDEV_FRONTEND=m * CONFIG_XEN_KBDDEV_FRONTEND=m * CONFIG_HVC_XEN=y * CONFIG_XEN_FBDEV_FRONTEND=m * CONFIG_XEN_BALLOON=y * CONFIG_XEN_SCRUB_PAGES=y * CONFIG_XEN_DEV_EVTCHN=y * CONFIG_XEN_BACKEND=y * CONFIG_XEN_BLKDEV_BACKEND=y * CONFIG_XEN_NETDEV_BACKEND=y * CONFIG_XENFS=y * CONFIG_XEN_NETDEV_BACKEND=y * CONFIG_XENFS=y * CONFIG_XEN_COMPAT_XENFS=y * CONFIG_XEN_XENBUS_FRONTEND=m Install these debian packages using sudo dpkg -i <name> Add the following line to /etc/fstab none /proc/xen xenfs defaults 0 0 and reboot the machine. After installing the debian packages, the Grub Entry will look like the following: title Xen 3.4.1 / Debian GNU/Linux, kernel 2.6.31.4-tapas-xen-4 root (hd0,0) kernel /boot/xen-3.4.1.gz module /boot/vmlinuz-2.6.31.4-tapas-xen-4 root=/dev/sda1 ro console=tty0 module /boot/initrd.img-2.6.31.4-tapas-xen-4 Hope that will help. On Sat, Dec 5, 2009 at 2:49 AM, secdev geek <secdevgeek@gmail.com> wrote:> Hi list, > > I am starting a academic security related project and I was wondering if > there is any documentation on compiling xen/dom0 with a recent kernel? > > I''ve seen a few good intentioned threads, but no real documentation so far. > Any helpful pointers will be greatly appreciated! > > Thanks in advance, > - SDG > > P.S: First mail, not sure if I should post it here...let me know if I am on > the wrong list. :-) > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users >-- http://www.abhitech.com _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
secdev geek
2009-Dec-04 21:38 UTC
Re: [Xen-users] how to get xen with a kernel 2.6.27 or above?
On Fri, Dec 4, 2009 at 9:30 PM, Tapas Mishra <tapas@abhitech.com> wrote:> Some one explained me in detail on community so I am forwarding same here > This guide will explicate in detail about the procedure for compiling > vanilla kernel from source and customize it according to your hardware > specifications and then compiling latest XEN from source and patching > it with Linux. > First install these packages: >Thank you for the very detailed instructions and for the links. I''ll follow it up and see if I can get it working successfully. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Pasi Kärkkäinen
2009-Dec-05 11:44 UTC
Re: [Xen-users] how to get xen with a kernel 2.6.27 or above?
On Fri, Dec 04, 2009 at 09:38:47PM +0000, secdev geek wrote:> On Fri, Dec 4, 2009 at 9:30 PM, Tapas Mishra <[1]tapas@abhitech.com> > wrote: > > Some one explained me in detail on community so I am forwarding same > here > This guide will explicate in detail about the procedure for compiling > vanilla kernel from source and customize it according to your hardware > specifications and then compiling latest XEN from source and patching > it with Linux. > First install these packages: > > Thank you for the very detailed instructions and for the links. I''ll > follow it up and see if I can get it working successfully. >Also note Xen 3.4.2 is the latest stable version now! -- Pasi _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Tapas Mishra
2009-Dec-05 18:09 UTC
Re: [Xen-users] how to get xen with a kernel 2.6.27 or above?
What about Xen 4 I read about it some where isn''t it released ? On Sat, Dec 5, 2009 at 5:14 PM, Pasi Kärkkäinen <pasik@iki.fi> wrote:> On Fri, Dec 04, 2009 at 09:38:47PM +0000, secdev geek wrote: >> On Fri, Dec 4, 2009 at 9:30 PM, Tapas Mishra <[1]tapas@abhitech.com> >> wrote: >> >> Some one explained me in detail on community so I am forwarding same >> here >> This guide will explicate in detail about the procedure for compiling >> vanilla kernel from source and customize it according to your hardware >> specifications and then compiling latest XEN from source and patching >> it with Linux. >> First install these packages: >> >> Thank you for the very detailed instructions and for the links. I''ll >> follow it up and see if I can get it working successfully. >> > > Also note Xen 3.4.2 is the latest stable version now! > > -- Pasi > >-- http://www.abhitech.com _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
secdev geek
2009-Dec-05 18:13 UTC
Re: [Xen-users] how to get xen with a kernel 2.6.27 or above?
On Sat, Dec 5, 2009 at 6:09 PM, Tapas Mishra <tapas@abhitech.com> wrote:> What about Xen 4 I read about it some where isn''t it released ? > > On Sat, Dec 5, 2009 at 5:14 PM, Pasi Kärkkäinen <pasik@iki.fi> wrote: > > Also note Xen 3.4.2 is the latest stable version now! > > > > -- Pasi > > > > >I just finished watching the video from Keir Fraser that Stephen published on the website from the recent Xen Summit in Asia, and he says that 4.0 will be released in January. I am not yet aware if there is already an "unstable" tree that will possibly translate into 4.0 at some point in the future, but I also seem to understand that before we go into 4.0, a 4.3 stable release will exist, so I suppose 4.0 is scheduled to late January. - sdg _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
secdev geek
2009-Dec-05 18:18 UTC
Re: [Xen-users] how to get xen with a kernel 2.6.27 or above?
On Fri, Dec 4, 2009 at 9:38 PM, secdev geek <secdevgeek@gmail.com> wrote:> On Fri, Dec 4, 2009 at 9:30 PM, Tapas Mishra <tapas@abhitech.com> wrote: > >> Some one explained me in detail on community so I am forwarding same here >> This guide will explicate in detail about the procedure for compiling >> vanilla kernel from source and customize it according to your hardware >> specifications and then compiling latest XEN from source and patching >> it with Linux. >> First install these packages: >> > > Thank you for the very detailed instructions and for the links. I''ll follow > it up and see if I can get it working successfully. >It worked well to the point of compiling and installing. Unfortunately, I haven''t had enough time to experiment any further (create VMs, configure them, etc). I noticed the xenU kernels weren''t built though. Do I need to build one, if I want to create a VM with Red Hat or SuSE enterprise? - SDG _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Tapas Mishra
2009-Dec-05 18:27 UTC
Re: [Xen-users] how to get xen with a kernel 2.6.27 or above?
On Sat, Dec 5, 2009 at 11:48 PM, secdev geek <secdevgeek@gmail.com> wrote:>> On Fri, Dec 4, 2009 at 9:30 PM, Tapas Mishra <tapas@abhitech.com> wrote:> It worked well to the point of compiling and installing. Unfortunately, I > haven''t had enough time to experiment any further (create VMs, configure > them, etc). I noticed the xenU kernels weren''t built though. Do I need to > build one, if I want to create a VM with Red Hat or SuSE enterprise?I am not clear on this part I think since when I created Virtual Machines from the available DVD ISO which were available to me at some point that failed some where I read that we need to compile DomU kernel also but then some more experts can be able to help both of us better. -- http://www.abhitech.com _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Pasi Kärkkäinen
2009-Dec-06 00:32 UTC
Re: [Xen-users] how to get xen with a kernel 2.6.27 or above?
On Sat, Dec 05, 2009 at 06:13:53PM +0000, secdev geek wrote:> On Sat, Dec 5, 2009 at 6:09 PM, Tapas Mishra <[1]tapas@abhitech.com> > wrote: > > What about Xen 4 I read about it some where isn''t it released ? > On Sat, Dec 5, 2009 at 5:14 PM, Pasi KÀrkkÀinen <[2]pasik@iki.fi> > wrote: > > Also note Xen 3.4.2 is the latest stable version now! > > > > -- Pasi > > > > > > I just finished watching the video from Keir Fraser that Stephen published > on the website from the recent Xen Summit in Asia, and he says that 4.0 > will be released in January. I am not yet aware if there is already an > "unstable" tree that will possibly translate into 4.0 at some point in the > future, but I also seem to understand that before we go into 4.0, a 4.3 > stable release will exist, so I suppose 4.0 is scheduled to late January. >http://xenbits.xen.org/xen-unstable.hg is the development repository.. xen 4.0 will be branched from it in the beginning of 2010. There''s no definite release date for Xen 4.0. It''ll be released when it''s ready, I assume :) -- Pasi _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Pasi Kärkkäinen
2009-Dec-06 00:37 UTC
Re: [Xen-users] how to get xen with a kernel 2.6.27 or above?
On Sat, Dec 05, 2009 at 06:18:18PM +0000, secdev geek wrote:> On Fri, Dec 4, 2009 at 9:38 PM, secdev geek <[1]secdevgeek@gmail.com> > wrote: > > On Fri, Dec 4, 2009 at 9:30 PM, Tapas Mishra <[2]tapas@abhitech.com> > wrote: > > Some one explained me in detail on community so I am forwarding same > here > This guide will explicate in detail about the procedure for compiling > vanilla kernel from source and customize it according to your hardware > specifications and then compiling latest XEN from source and patching > it with Linux. > First install these packages: > > Thank you for the very detailed instructions and for the links. I''ll > follow it up and see if I can get it working successfully. > > It worked well to the point of compiling and installing. Unfortunately, I > haven''t had enough time to experiment any further (create VMs, configure > them, etc). I noticed the xenU kernels weren''t built though. Do I need to > build one, if I want to create a VM with Red Hat or SuSE enterprise? >RHEL and SLES ship with Xen PV domU kernels included in the distribution. So you can and should use them. No need to build custom domU kernels for these distros. -- Pasi _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Fajar A. Nugraha
2009-Dec-07 04:46 UTC
Re: [Xen-users] how to get xen with a kernel 2.6.27 or above?
On Sun, Dec 6, 2009 at 7:37 AM, Pasi Kärkkäinen <pasik@iki.fi> wrote:>> It worked well to the point of compiling and installing. Unfortunately, I >> haven''t had enough time to experiment any further (create VMs, configure >> them, etc). I noticed the xenU kernels weren''t built though. Do I need to >> build one, if I want to create a VM with Red Hat or SuSE enterprise? >> > > RHEL and SLES ship with Xen PV domU kernels included in the > distribution. So you can and should use them. > > No need to build custom domU kernels for these distros. >Also if you build support for the frontends (block device, network, etc.), you can use dom0 kernel for domU as well. This is what Redhat does, providing only one kernel for both dom0 and PV domU. -- Fajar _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Tapas Mishra
2009-Dec-07 05:57 UTC
Re: [Xen-users] how to get xen with a kernel 2.6.27 or above?
> Also if you build support for the frontends (block device, network, > etc.), you can use dom0 kernel for domU as well. This is what Redhat > does, providing only one kernel for both dom0 and PV domU. > > -- > FajarThanks a lot for clearing this. --- http://www.abhitech.com _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users