Create a NFS Share for XENServer on Windows Server 2003 R2

Create a NFS Share for XENServer on Windows Server 2003 R2

15

 

 

Spiciness

Steps

This How-To will demonstrate how to successfully create a Virtual Disk Storage Repository usable by XENServer on a Windows Server 2003 R2 File Server.

For those who are interested in trying XENServer for virtualization and do not have a SAN or NAS, this is the best solution that I have found for storage repositories. If you do not utilize SRs in XENServer, then you cannot use XENMotion. XENMotion (for those who are unaware) allows you to migrate any virtual server to another box while remaining live. It has no down time with the exception of the proclaimed 115ms. I have done this while in an RDP session to the migrating server and did not even get disconnected. This enables the VHD to remain on “network attach storage” and load up to the next server within about 5 minutes. Reducing downtime and promoting redundancy.

1.

Create a folder on the file server

When creating your share, keep in mind that it will be hosting 1 or more virtual hard drives, so it must have ample space for your application.

Space_big
2.

Create your destination folder for the repository.

When creating the folder, keep the naming simple. In this example, I have named mine “xenserv1”.

Folder_big
3.

Now you can setup the NFS share needed.

XENServer requires that you use a NFS share if its held on a Windows box. So, you need to right click the folder and select properties. Then go to the tab named “NFS Sharing”.

Nfs_tab_big
4.

Set Access Credentials

In my example, I have named the NFS share “NFS” for simplicity. You can name it what you like. Make sure that you check the box “Allow anonymous access” and that the UID and GID are both “-2” as seen in the above picture. Next, click on permissions. Set it for:
1. “ALL MACHINES”
2. Type of access should be “Read-Write” so that XEN can write the virtual disks to the share.
3. Encoding should be “ANSI”
4. Ensure that “Allow root access” is unchecked.
5. Click “OK”

Nfs_permissions_1_big
5.

More access credentials.

Now we have to allow “ANONYMOUS LOGON” full control of the folder so that XEN can communicate with the server.
1. If it is not in the list already, then click “Add…”.
2. Type “ANONYM” and click on “Check Names”. Click “OK” and ANONYMOUS LOGON should now be visible.
3. Select “ANONYMOUS LOGON” from “Group or user names:” above and set it to allow “Full Control”. Click “OK”.
4. Click “OK” again and your folder should show the sharing “hand” icon as well as 2 green arrows.

Anonymous_logon_big
6.

Now we have to add the SR to the XENServer.

I am using XENServer 5 build 13192 for mine. At the top of XENCenter, select the button labeled “New Storage”.

New_storage_big
7.

Select NFS and click on “Next”

Since we are making a NFS share specifically for the virtual disks, we are going to use the top “NFS” choice. The one on the bottom is for placing installation .ISO files. Keep the top selected for this exercise and click “Next”.

Sr_screen_1_big
8.

Input the “common” name of the repository and point XEN to it as shown in the picture. Click “Next”

On this screen, we will name the NFS share for its use in XENServer, and we will input the path to the share. Note: For me, it would only accept the IP of the server where the NFS share was located, it would not accept NetBIOS names.

Sr_screen_2_big
9.

After scanning, you will click “Finish” and the SR will be added. Congratulations!

Once you have input the correct path to the NFS share into the wizard, you can click on “Finish” and you will see it show up under the “common” name in XENServer. Congratulations on a job well done!

Closing notes: If you are used to accessing shares with “servershare”, and you are worried that it is a security hole, note that you cannot use this method with the NFS share unless it is ALSO shared as a normal share. Otherwise, when attempted this method to access an NFS share, it will return an error stating it does not exist. So, if you are worried about the security, then do not make it a regular network share on top of being a NFS share.

Sr_screen_3_big
10.

View XENServer to see the new SR.

Finale_big

Conclusion

This concludes my first How-To. Thanks for checking it out guys!

Simple

One thought on “Create a NFS Share for XENServer on Windows Server 2003 R2

  1. Hi Joe,about this article,why don’t suggest some of those fancy "linux-NAS" distribution with iSCSI features?Is it possible to use one of them, i.e. FreeNAS.Not only, for high availability, you may setup two boxes "mirrored" with DRBD.What is your opinion about this?Thank youRobert

Leave a Reply

Your email address will not be published. Required fields are marked *