Here's how I installed xen on Centos. Requirement - installed xen enabled kernel and reboot.
Then run virt-install
virt-install
What is the name of your virtual machine? s20
How much RAM should be allocated (in megabytes)? 1000
What would you like to use as the disk (file path)? /usr/local/vdisk/s20
How large would you like the disk (/usr/local/vdisk/s20) to be (in gigabytes)? 30
Would you like to enable graphics support? (yes or no) no
What is the install location? http://mirror.oscc.org.my/centos/5.2/os/x86_64
Welcome to CentOS
+---------+ Choose a Language +---------+
| |
| What language would you like to use |
| during the installation process? |
| |
| Catalan ^ |
| Chinese(Simplified) : |
| Chinese(Traditional) # |
| Croatian : |
| Czech : |
| Danish : |
| Dutch : |
| English v |
| |
| +----+ |
| | OK | |
| +----+ |
| |
| |
+---------------------------------------+
<Tab>/<Alt-Tab> between elements | <Space> selects | <F12> next screen
+----------------+ Configure TCP/IP +----------------+
| |
| [*] Enable IPv4 support |
| ( ) Dynamic IP configuration (DHCP) |
| (*) Manual configuration |
| |
| [ ] Enable IPv6 support |
| (*) Automatic neighbor discovery (RFC 2461) |
| ( ) Dynamic IP configuration (DHCP) |
| ( ) Manual configuration |
| |
| +----+ +------+ |
| | OK | | Back | |
| +----+ +------+ |
| |
| |
+----------------------------------------------------+
<Tab>/<Alt-Tab> between elements | <Space> selects | <F12> next screen
+--------------+ Manual TCP/IP Configuration +---------------+
| |
| Enter the IPv4 and/or the IPv6 address and prefix |
| (address / prefix). For IPv4, the dotted-quad netmask |
| or the CIDR-style prefix are acceptable. The gateway and |
| name server fields must be valid IPv4 or IPv6 addresses. |
| |
| IPv4 address: 192.168.x.x____ / 255.255.255.0___ |
| Gateway: 192.168.x.x____________________________ |
| Name Server: 192.228.128.20___________________________ |
| |
| +----+ +------+ |
| | OK | | Back | |
| +----+ +------+ |
| |
| |
+------------------------------------------------------------+
<Tab>/<Alt-Tab> between elements | <Space> selects | <F12> next screen
+----------------------------+ Retrieving +----------------------------+
| |
| Retrieving images/stage2.img... |
| |
+----------------------------------------------------------------------+
<Tab>/<Alt-Tab> between elements | <Space> selects | <F12> next screen
+-----------------+ Warning +-----------------+
| |
| The partition table on device xvda was |
| unreadable. To create new partitions it |
| must be initialized, causing the loss of |
| ALL DATA on this drive. |
| |
| This operation will override any previous |
| installation choices about which drives |
| to ignore. |
| |
| Would you like to initialize this drive, |
| erasing ALL DATA? |
| |
| +-----+ +----+ |
| | Yes | | No | |
| +-----+ +----+ |
| |
| |
+---------------------------------------------+
<Tab>/<Alt-Tab> between elements | <Space> selects | <F12> next screen
+-------------------------+ Partitioning Type +-------------------------+
| |
| Installation requires partitioning of your hard drive. The |
| default layout is reasonable for most users. You can either |
| choose to use this or create your own. |
| |
| Remove all partitions on selected drives and create default layout. |
| Remove linux partitions on selected drives and create default layout. |
| Use free space on selected drives and create default layout. |
| Create custom layout. |
| |
| Which drive(s) do you want to use for this installation? |
| [*] xvda 30718 MB (Xen Virtual Block Device) ^ |
| # |
| |
| +----+ +------+ |
| | OK | | Back | |
| +----+ +------+ |
| |
| |
+-----------------------------------------------------------------------+
<Space>,<+>,<-> selection | <F2> Add drive | <F12> next screen
+-------------+ Warning +-------------+
| |
| You have chosen to remove all |
| Linux partitions (and ALL DATA on |
| them) on the following drives: |
| |
| /dev/xvda |
| |
| Are you sure you want to do this? |
| |
| +----+ +-----+ |
| | No | | Yes | |
| +----+ +-----+ |
| |
| |
+-------------------------------------+
<Tab>/<Alt-Tab> between elements | <Space> selects | <F12> next screen
+----------+ Boot Loader Configuration +-----------+
| |
| Which boot loader would you like to use? |
| |
| (*) Use GRUB Boot Loader |
| ( ) No Boot Loader |
| |
| +----+ +------+ |
| | OK | | Back | |
| +----+ +------+ |
| |
| |
+--------------------------------------------------+
+------------------+ Boot Loader Configuration +------------------+
| |
| A few systems will need to pass special options to the kernel |
| at boot time for the system to function properly. If you need |
| to pass boot options to the kernel, enter them now. If you |
| don't need any or aren't sure, leave this blank. |
| |
| console=xvc0____________________________________ |
| |
| [ ] Force use of LBA32 (not normally required) |
| |
| +----+ +------+ |
| | OK | | Back | |
| +----+ +------+ |
| |
| |
+-----------------------------------------------------------------+
++ Network Configuration for eth0 ++
| |
| Xen Virtual Ethernet |
| 00:16:3E:54:FB:1D |
| |
| [*] Activate on boot |
| [*] Enable IPv4 support |
| [ ] Enable IPv6 support |
| |
| +----+ +------+ |
| | OK | | Back | |
| +----+ +------+ |
| |
| |
+----------------------------------+
+----------------+ Installation Progress +----------------+
| |
| Retrieving installation information... |
| |
| 40% |
| |
+---------------------------------------------------------+
+----------------------+ Package selection +----------------------+
| |
| The default installation of CentOS includes a set of software |
| applicable for general internet usage. What additional tasks |
| would you like your system to include support for? |
| |
| [ ] Server ^ |
| [ ] Server - GUI : |
| [ ] Clustering # |
| [ ] Storage Clustering v |
| |
| [*] Customize software selection |
| |
| +----+ +------+ |
| | OK | | Back | |
| +----+ +------+ |
| |
| |
+-----------------------------------------------------------------+
+------------------+ Package Installation +------------------+
| |
| Name : filesystem-2.4.0-1.el5.centos-x86_64 |
| Size : 0k |
| Summary: The basic directory layout for a Linux system. |
| |
| |
| Status: |
| |
| 0% |
| |
| Packages Bytes Time |
| Total : 766 1736M 42:28:07 |
| Completed: 3 0M 0:00:44 |
| Remaining: 763 1736M 42:27:22 |
| |
| 0% |
| |
+------------------------------------------------------------+
+----------------------+ Complete +-----------------------+
| |
| Congratulations, your CentOS installation is complete. |
| |
| Remove any media used during the installation process |
| and press <Enter> to reboot your system. |
| |
| |
| +--------+ |
| | Reboot | |
| +--------+ |
| |
| |
+---------------------------------------------------------+
One hitch, xen only works with the first NIC by default. Adding new ones after installation is easy enough
Important xm commnds:
- xm list
- xm create [virtserver]
- xm console [virtserver]
- xm help
And ^] to go to host OS in linux and ^5 in putty.
Trackback is http://myzope.kedai.com.my/blogs/kedai/205/tbping
