From: Pasi =?iso-8859-1?Q?K=E4rkk=E4inen?= Subject: Re: Documetation - The Phantom Menace Date: Fri, 15 Oct 2004 13:40:08 +0300 Sender: xen-devel-admin@lists.sourceforge.net Message-ID: <20041015104008.GB842@edu.joroinen.fi> References: <200410121455.41954.mark.williamson@cl.cam.ac.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: Content-Disposition: inline In-Reply-To: <200410121455.41954.mark.williamson@cl.cam.ac.uk> Errors-To: xen-devel-admin@lists.sourceforge.net List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , List-Archive: To: "Mark A. Williamson" Cc: xen-devel@lists.sourceforge.net List-Id: xen-devel@lists.xenproject.org On Tue, Oct 12, 2004 at 02:55:41PM +0000, Mark A. Williamson wrote: > Guys, >=20 > Documentation is one of the main hurdles we'd like to get out of the wa= y=20 > before releasing 2.0. Stephan and I are at this very minute grokking t= he=20 > docs to start bringing things up to date. >=20 > We'd still like all the help we can get: > * If you've written any howtos, we'd like to incorporate them into the = main=20 > user manual. > * If there's anything you'd really like to see in the docs then please = tell us=20 > (if you can contribute the start of some text, that'd be even better!). > * If you find any mistakes, please report them. > * If you found there were any special steps involved in getting Xen wor= king on=20 > your distro, beyond what the docs describe, please let us know. We'd l= ike to=20 > cover any distro-specific quirks... >=20 Here's some info how to install Debian 3.1 (sarge) for xen: 1) Set up Xen 2 and test it's working OK and you can run domains with it. You can find help for this from the Xen Documentation. 2) Create disk images for root-fs and swap =09 dd if=3D/dev/zero of=3D/path/diskimage bs=3D1024k count=3Dsize_in_megaby= tes dd if=3D/dev/zero of=3D/path/swapimage bs=3D1024k count=3Dsize_in_megaby= tes If you're going to use this filesystem/diskimage only as a "template" fo= r other vm diskimages, something like 300 MB should be enough.. (of course= it=20 depends what kind of packages you are planning to install to the templat= e) 3) Create filesystem and swap to the images mkfs.ext3 /path/diskimage mkswap /path/swapimage 4) Mount the diskimage for installation mount -o loop /path/diskimage /mnt/disk 5) Install Debian using debootstrap Make sure you have debootstrap installed on the host. If you are running Debian sarge (3.1 / testing) or unstable you can install it by running apt-get install debootstrap. Install debian base to the diskimage: debootstrap --arch i386 sarge /mnt/disk http://ftp..debian.= org/debian Or you can of course use any other Debian http/ftp mirror you want. 6) When debootstrap finishes (successfully) modify settings chroot /mnt/disk /bin/bash Edit the following files using vi or nano and make needed settings: /etc/hostname /etc/hosts =09 /etc/resolv.conf /etc/network/interfaces /etc/networks Set up access to the services /etc/hosts.deny /etc/hosts.allow /etc/inetd.conf Add Debian mirror to:=09 /etc/apt/sources.list And create fstab like this: /dev/sda1 / ext3 errors=3Dremount-ro 0 1 /dev/sda2 none swap sw 0 0 proc /proc proc defaults 0 0 logout 7) Umount the diskimage umount /mnt/disk 8) Create Xen 2 configuration file for the new domain. You can use the example-configurations coming with xen as a template. Make sure you have the following set up: disk =3D [ 'file:/path/diskimage,sda1,w', 'file:/path/swapimage,sda2,w' = ] =09 root =3D "/dev/sda1 ro" I used the default Xen Linux-2.4.27-XenU kernel for the domain. 9) Start the new domain xm create -f domain_config_file Check that the new domain is running: xm list 10) Attach to the console of the new domain. You should see something like this when starting the new domain: "Started domain testdomain2, console on port 9626" =09 There you can see the ID of the console: 26. You can also list the consoles with "xm consoles". (ID is the last two digits of the portnumber.) Attach to the console: xm console 26 or by telnetting to the port 9626 of localhost. 11) Log in and run base-config As a default there's no password for the root. Check that everything looks OK, and the system started without errors. Check that the swap is active, and the network settings are correct. Run /usr/sbin/base-config to set up the Debian settings. Set up the password for root using passwd. 12) Done. You can exit the console by pressing ctrl + ] If you need to create new domains, you can just copy the contents of the "template"-image to the new disk images simply by mounting the templa= te and the new image, and using cp -a or tar and then modify the image-speci= fic settings (hostname, network settings, etc). Hope this helps somebody. There might be errors in the text.. please feel free to correct :) Someone on the xen-devel list was also doing automatic debian-installatio= n script based on configuration templates.. Check that also. -- Pasi K=E4rkk=E4inen =20 ^ . . Linux / - \ Choice.of.the .Next.Generation. ------------------------------------------------------- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl