Changes

Jump to: navigation, search
Creating the Xen Configuration File for the NFS Root Filesystem
Now that we have a populated root filesystem for our Xen domainU system and have the filesystem exported on the NFS server it is now time to move to the remote system and set up the environment for the Xen guest system.
 
Once we are on the remote system we need to copy the custom kernel with root NFS support enabled to the local system so that it can be referenced in our Xen configuration file. Let's assume the kernel is named vmlinuz-2.6.18-53.1.14.el5.myxen and we have copied it to /boot on the local system.
 
For the purposes of this tutorial we will also assume that the NFS server hosting our domainU root filesystem has an IP address of 192.168.2.12. You will also recall that the the root filesystem is mounted as /xen on our NFS server. With this information we can create our Xen configuration file which we will name xen_nfs.cfg:
 
<pre>
kernel = "/boot/vmlinuz-2.6.18-53.1.14.el5.myxen"
memory = 256
name = "centos5"
dhcp = "dhcp"
vif = ['']
nfs_root = "/xen"
nfs_server = "192.168.2.12"
root = "/dev/nfs"
</pre>
 
One final change we need to make is to modify /etc/fstab file of our domainU root filesystem so that the root partition is referenced as /dev/nfs. For example:
 
<pre>
/dev/nfs / ext3 defaults 1 1
#/dev/sdb2 none swap sw 0 0
none /dev/pts devpts gid=5,mode=620 0 0
none /dev/shm tmpfs defaults 0 0
none /proc proc defaults 0 0
none /sys sysfs defaults 0 0
</pre>
 
All being well, it should now be possible to boot the domainU system using an NFS mounted root filesystem.
 
== Booting the Xen domainU ==
 
The domainU with the NFS mounted root filesystem is created in the same way that any other domainU would be started, using the ''xm create'' command:
 
<pre>
xm create xen_nfs.cfg
</pre>
 
Xen should now create the guest domain, mount the root filesystem over NFS and boot up the system.
1,798
edits

Navigation menu