Thursday, November 08, 2007

Install CentOS 5 DomU on CentOS 5 Dom0(64 bit) from NFS share.

Article [1] silently presume that you have at least ADSL Internet connection
700 Kb/sec due to following instruction for virt-install command line utility:-

What is the name of your virtual machine? <-- vm01
How much RAM should be allocated (in megabytes)? <-- 256
What would you like to use as the disk (path)? <-- /vm/vm01.img
How large would you like the disk (/vm/vm01.img) to be (in gigabytes)? <-- 4
Would you like to enable graphics support? (yes or no) <-- no
What is the install location? <--

You might need to install from the Net to your hard drive up to 4 GB of data.
Once you don’t have fast enough internet connection extracting data to your system might take very long time.
However, there is pretty simple way to create CentOS 5 PVM managed by Xen 3.0.3 coming with original distribution DVD. Of course it won’t be perfect, because it’s a bit outdated. Once again, if you'll use in the same way RHEL 5.1 (Beta 2)
RHEL 5.1 PVM will be driven by the most recent Xen version coming along with RHEL 5.1 and everything will become up to date immediately.

Perform CentOS 5 install with "Virtualization"
Insert your CentOS 5 DVD in the drive.
Run "df -h" to find out what mount point is.
Suppose, it is /dev/hde

# dd if=/dev/hde of=/etc/xen/disks/CentOS5.iso
# dd if=/dev/zero of=/etc/xen/images/CentOS5.img bs=1024k count=12000
# mkdir -p /mnt/tmp
# mount -o loop , ro /etc/xen/disks/CentOS5.iso /mnt/tmp

Edit /etc/exports and add the line:-
Restart Service "nfsd"

1.To install your CentOS 5 DomU , at the command prompt type: virt-install.
2.When asked to install a fully virtualized guest, type: no.
3.Type CentOS5pv for your virtual machine name.
4.Type 1000 for your RAM allocation.
5.Type /etc/xen/images/CentOS5.img for your disk (guest image).
6.Type 12000 for the size of your disk (guest image).
7.Type yes to enable graphics support.
8.Type nfs:<IP address of Dom0>:/mnt/tmp for your install location.
The installation begins. Proceed as normal with the installation