Important Note:
Since these were Rackspace servers – the default repository that they connect to does not have the xen kernel packages and xen software on them. We had to call and have Rackspace add the capability of using certain commands like “yum install xen”
Step 1.1:Install the xen kernel and xen.
# yum --disableexcludes=all install kernel-xen xen
Step 1.2: Reboot
# reboot
Step 1.3:Ensure the new kernel loaded. You should see xen after the kernel version:
# uname –a
Linux web1.myhostname.com 2.6.18-238.9.1.el5xen #1 SMP Fri Mar 18 12:53:42 EDT 2011 x86_64 x86_64 x86_64 GNU/Linux
Step 1.4:Ensure xen is running on boot.
# xm list Name ID Mem(MiB) VCPUs State Time(s) Domain-0 0 7989 8 r----- 6268.9
Congrats the host machine is setup!
Step 2: Let’s setup a CentOS virtual machine. Virt-install:
# virt-install -–prompt
What is the name of your virtual machine? mnode1 How much RAM should be allocated (in megabytes)? 8024 What would you like to use as the disk (file path)? /home/xen/mnode1 How large would you like the disk (/home/xen/mnode1) to be (in gigabytes)? 100 What is the install URL? http://mirror.cogentco.com/pub/linux/centos/5.6/os/x86_64/ <code>Starting install...</code> Retrieving file .treeinfo... | 417 B 00:00 Retrieving file vmlinuz... | 2.1 MB 00:01 Retrieving file initrd.img... | 7.9 MB 00:03 Creating storage file... | 100 GB 00:00 Creating domain... | 0 B 00:05 error: Failed to get local hostname
Domain installation still in progress. You can reconnect to the console to complete the installation process.
Step 4:At this point you need to connect to the virtual machines “console” to continue.
# xm console <hostname>
Step 5:Go through the centos install…..I’ll omit this process. But in short you WILL need to know the ip address, subnet, and gateway of your server.