This is a quick note, mostly to help remind me and hopefully help someone else out.
You can use standard Linux commands to connect an ESX host to a NAS (Network Attached Storage) device. You can use a NAS to store things like ISO’s and backups. I have many gig’s of ISO’s and I really don’t like them taking up valuable storage on my ESX host. In production, they’d be taking up SAN space, so I offload them to a Buffalo Terastation, and use Linux commands to mount the Terastation so that ESX can utilize it.
After logging into the ESX console using the root account or a root privileged account, you can make a directory under vmimages.
ISO2 is the directory that you are creating. For me, ISO already points to a local directory on my server where I keep one or two ISO’s that I am continually using. Then you can run the command:
mount –t smbfs //[nas]/[folder] /vmimages/ISO2
[nas] refers to the IP address or netbios name of your NAS server and [folder] refers to the folder that you want to mount. Make sure you have permissions, i.e. anonymous, or know the admin/root password on the NAS, or have a specific username and password that you can use. My final command looked like:
mount –t smbfs //nas01/Applications /vmimages/ISO2
I was then asked for my password. I used the account password on the Terastation that matched my login account on the console and it let me right in.
If you need to use a custom username and password and the user name doesn’t match the name that you are logged into the console as, try the following format:
mount –t smbfs //[nas]/[folder] /vmimages/ISO2 –o username=[uname],password=[pwd]
Don’t forget to replace the items that are between the [brackets] with your implementation specific information. Also, make sure that you remember that like Linux, everything is case sensitive!
After connecting to the NAS, you should be able to browse it with the vSphere Client and mount ISO’s while editing your VM settings. Hope this saves someone some time besides me. 😉