获取XEN guestOS的images文件
我们可以从http://stacklet.com/其实就是原来http://jailtime.org/站点找我们需要的xen image文件
在2009年的时候,jailtime.org发布了一个新闻
######May 4th, 2009###### The jailtime project has been relaunched with a new name and site: Stacklet As part of the relaunch all of the distributions currently on jailtime have been upgraded to their latest versions. Also, all of the code for creating the images is now publically available – see http://stacklet.com/ for further details…. Jailtime will remain online but downloads will probably be turned off eventually as the transition to stacklet proceeds.
所以现在就访问http://stacklet.com/就可以了。
包括如下系统
下面是一个站点提供的img文件的简单说明 All files on this site are provided without guarantee or warranty. Use at your own risk. Each download is a bzipped tarball containing an image and cfg files:
- a xen guest filesystem
- sample xen configuration files to be used with xm create
- centos.5-3.x86.img
- centos.5-3.x86.xen3.cfg
- centos.5-3.x86.xen3.pygrub.cfg(这个文件比较重要,如果用的是CentOS 5.3的虚拟化,就需要这个文件才可以启动guestOS。因为CentOS 5.3没有提供Xen-U的内核。)
Prerequisites
- Working installation of Xen version 3
- The xen daemon (xend) must be running
- Enough filesystem space to accomodate the uncompressed tarball (generally 1GB)
- Enough unallocated RAM to run the xen guest (generally 128MB)
Default Configuration and Networking
Each filesystem is configured to use dhcp. The *.xen.cfg also is also configured for dhcp. It is recommended that you first test the filesystem using dhcp if possible before attempting other networking parameters. Each download page has additional notes on networking that is appropriate for a particular distribution. The root login is root/password. It is highly recommened that you change the root password immediately.Installation
You will need to uncompress the tarball to a local directory and edit the *.xen.cfg file to point to the uncompressed image and swap file. If all is well you will see the guest’s boot messages scrolling by. 一些HOWTO文档HOWTO: Filesystems
In the following howto’s,How do I mount an image without booting it?
- mkdir -p /mnt/loop
- mount -o loop
/mnt/loop/
How do I resize an image file?
First, make sure that the image file is not already mounted and is not already running as a xen guest. The following commands increase an image file to 2.5GB. Backup the image before attempting this.- dd if=/dev/zero of=
bs=1M conv=notrunc count=1 seek=2500 - losetup /dev/loop0
- e2fsck -f /dev/loop0
- resize2fs /dev/loop0
- e2fsck -f /dev/loop0
- losetup -d /dev/loop0
How do I move the contents of an img file to a regular partition?
Mount the img file using the above howto. Assuming the destination partition is mounted at /mnt/dest, execute the following:- cp -a /mnt/loop/* /mnt/dest/