How to Setup an NFS Data Store for VMWare ESX: I've got four ESX servers in my lab, running various versions of VMWare (ESX 3.0, 3.5 and ESXi 4.1). When I first got started, I found myself copying ISO images of various operating systems to each ESX server so that I could install the OS on the virtual machines. Not only was it time consuming, but it used up valuable space on the ESX servers, that I'd rather use to host VMs.
Now, one thing you can do, if you have SAN storage, is to attach the same SAN LUN to all of your ESX servers, and put your ISO images there. What a waste of expensive SAN storage though. Instead, you can create an NFS server using a Windows or Linux server with cheap local storage.
![]() | Recommended Reading: VMware vSphere 5 Clustering Technical Deepdive [Paperback] $21.56 |
Network Connections
Hosting your ISO images on an NFS server means that you're going to be mounting ISO images, booting from them, and installing the OS, all over the network. That means that it's important that you maximize the throughout, and minimize the impact on the NICs in your VMWare servers that carry the traffic between your users and the VMs. So ideally, it would be a good idea to connect your NFS server to the same network switch as your ESX servers, hopefully at 1Gb/sec.
Figure 1 - Dedicated NICs for VMKernel Networking |
As you can see in the figure, I've got two NICs servicing the VMKernel and the Service Console, and two more NICs servicing the virtual machines. This configuration will keep the NFS traffic off of your virtual machine NICs.
Installing Services for NFS on Windows Server 2008 R2
OK, we've got our 2008 R2 server on the same switch as the ESX hosts' VMKernel NICs, and now we can install Services for NFS:
- Launch Server Manager, click Roles, and click Add Roles.
- Select the File Server role, and click Next.
- On the Role Services screen, select Services for Network File System
- Click Next, then Install.
Next we can create a folder to hold our ISO images, and share it via NFS:
-
- Create the folder on the 2008 server
- Right-click the folder, and click properties.
- On the NFS Sharing tab, click Manage NFS Sharing
- Check the Share This Folder box and give it a share name
- Click the Permissions button, and set the permissions.
Figure 2 - Adding an NFS Share |
Mounting the NFS Share as a Data Store in ESX
Figure 3 - Adding an NFS Data Store to ESX |
- In the VMWare client, click the configuration tab
- Under the Hardware section, click Storage
- Click the Add Storage link.
- Select NFS, and click Next
- Enter the IP Address of the 2008 server and the name of the NFS share
- Enter a name for your new data store, and click Next, and Finish
You can even host a VM on an NFS data store. I've tried it, and performance isn't all that terrible for light loads, as long as you have a RAID set with enough spindles to provide adequate performance. But if you copy any big files, performance kind of tanks. And of course you need read-write access for that.
An NFS data store might also provide options for backups of your VMs. You can copy VM files to the NFS server, when you can use Windows backup tools to back them up. Not to say that this is a solution for enterprise backup, but it gives some examples of how flexible and handy NFS data stores can be.
1 comments:
thank you thank you thank you.
Post a Comment