资源说明:Script to generate entire setup - include logical volumes - for a Centos Xen VM
h1. Introduction
p. *xen_create_appliance* is a script to create Xen appliances.
p. It has only been tested on Centos 5 64-bit build with the standard Xen kernel found in the distribution.
h1. Prerequisites
h2. Dropbox account and setup
p. The dropbox account is used to hold generated configuration files so that they are accessible during initialization of a VM. Any other mechanism that provides a read/write store could be equally well used. The write side is visible in the local file system (~/Dropbox). The read side of the store should be visible at an HTTP URL.
p. Install "Dropbox for Linux":http://www.dropbox.com/downloading?os=lnx. Probably connect it to a non-VM instance (this is the only combination tested).
p. This script will create a directory tree in ~/Dropbox/Public/xen with VM-specific subdirectories containing Centos kickstart configuration files. Change this by changing the contents of the file 'dropbox_base_url'.
h2. LVM Setup
p. An LVM setup is assumed. See the separate 'readme_lvm.html'.
h1. Configuration
p. There are several files which are not part of the distribution (deliberately). These are:
* dropbox_base_url - A file containing a public URL to a dropbox account
h2. File: dropbox_base_url
DROPBOX_BASE_URL=http://dl.dropbox.com/u/9999999/Public/xen
h2. File: xen_create_appliance.config
p. If this file is absent, the defaults noted in the sample below will be used.
#
# Logical volume settings for disks to be used for VMs
#
# Logical volume group name - logical volumes for all VMs belong to this group
LOGICAL_VOLUME_GROUP_NAME='vm_lvs'
# Prefix for logical volume for a given VM
LOGICAL_VOLUME_PREFIX="lvol_"
# Number of stripes to use in VM logical volume allocation
LOGICAL_VOLUME_TOTAL_STRIPES=5
# Base mount point in host system for VM disk images
BASE_VM_MOUNT_POINT=/xenvms
#
# General settings
#
BACKUP_FILE_EXTENSION=bak
# Local Centos Repository
#
# Default
# CENTOS_KICKSTART_REPO=http://mirror.centos.org/centos/5.5/os/x86_64/
# Local
CENTOS_KICKSTART_REPO=http://10.0.1.18/centos/5.5/os/x86_64/
h3. Local Centos mirror
p. Installing from a local Centos mirror is *much* faster than accessing the standard Centos mirrors over the network.
p. The VM Centos kickstart configuration system uses a portion of the standard Centos repository. That portion of the repository is available on the Centos installation DVDs or CDs. See 'readme_local_centos_mirror.html' for setup instructions.
h2. Useful tools
h3. VM Mount and startup commands
p. The file './data/mount_all_vms' contains a command to mount the logical volume containing the VM for each distinctly named VM created.
p. The file './data/start_all_vms' contains a command to start the VM for each distinctly name VM created.
h3. Prebuilt configurations
p. If the following VMs are prebuilt - 'baseos', 'baseos10' and 'baseos20' - then they will be copied whenever requests for a VM with 5GB, 10GB and 20GB is received. This is easy to extend.
本源码包内暂不包含可直接显示的源代码文件,请下载源码包。
English
