qmcnetwork
Enthusiast
Enthusiast

Use ESX as NFS Server?

Is it possible to install/setup NFS Server services on ESX in the SC?

If so, then could someone export an NFS share from an ESX with lots of local disk to be used as shared volumes?

This is for a temporary test environment and we are scraping the bottom of the proverbial barrel.

0 Kudos
13 Replies
Paul_Lalonde
Commander
Commander

Obviously ONLY for home use or test/dev in non-production environment.

cp /boot/vmlinuz-2.4.21-37.0.2.ELvmnix /boot/vmlinuz-2.4.21-37.0.2.ELvmnix.BAK

cd /usr/src/linux-2.4

make mrproper

vi configs/kernel-2.4.21-i686-vmnix.config

Change: # CONFIG_NFSD_TCP is not set

to: CONFIG_NFSD_TCP=y

vi Makefile

....change the string ELcustom to ELvmnix in the "EXTRAVERSION" part

make oldconfig

make dep

make clean

make bzImage

make modules

make modules_install

cp arch/i386/boot/bzImage /boot/vmlinuz-2.4.21-37.0.2.ELvmnix

and reboot!

Sample etc/exports file

/VM_Folder *(rw,sync,no_root_squash)

You'll need to configure the firewall to permit TCP port 2049 to the service console, and you'll have to enable the NFS server and portmap daemons as well.

Enjoy.

Paul

qmcnetwork
Enthusiast
Enthusiast

Need to recompile the kernel, eh? It doesn't look too hard by the steps you list. I'll probably give it a try tomorrow and let you know how it goes.

Thanks,

Jonathan

0 Kudos
qmcnetwork
Enthusiast
Enthusiast

Given the option of recompiling the kernel, we are going to scrape up a hand-me-down server to act as a NFS server instead.

But thank you very much, I may want to try that in the future.

0 Kudos
zatara
Enthusiast
Enthusiast

Brilliant. Thank you Paul. This is exactly what I was looking for. I posted messages all over the place trying to figure this out.

Thanks again!

0 Kudos
utkinpol
Contributor
Contributor

Was anyone here able to perform kernel rebuild on 3.0.1 pathed to 42829 ESX server?

I get numerous failures from lots of modules after restart and ESX is simply not functional after that. There is either some trick in the configuration or some src is not included. I just do not know what else can be possibly wrong with such simple process.

Message was edited by:

utkinpol

0 Kudos
Mad_HADR
Contributor
Contributor

Ok so I tried this, call me desparate. After the recompile etc, I do not see nfs in /proc/filesystems.

nodev rootfs

nodev bdev

nodev proc

nodev sockfs

nodev tmpfs

nodev shm

nodev pipefs

ext3

ext2

nodev ramfs

iso9660

nodev devpts

nodev vmfs

nodev usbdevfs

nodev usbfs

nodev autofs

I assume something went wrong with the compile?

0 Kudos
dsanders
Expert
Expert

I'm curious - why don't you just setup a small Linux VM to be your NFS server?

0 Kudos
Mad_HADR
Contributor
Contributor

That would be too easy. No, honestly, this is no where near recommended or supported. I have a USB drive, no support for VMFS, that I wanted to give to the ESX host as a VMFS datastore. So I read that you can give the COS NFS server capabilites and then feed the USB partition back to the ESX host via NFS. I wanted to get rid of the overhead of having a running NFS VM. I have done the same with iSCSI in a VM and its just another VM that has to run, and I only have 2GB of RAM.

0 Kudos
Mad_HADR
Contributor
Contributor

I am getting somewhere but not there yet. I now see nfs in /proc/filesystem after running insmod nfs. I also started portmap and the nfs and nfsd service.

The problem I have now is that no hosts can see my NFS mount. Windows hosts or the ESX host. Here is my /etc/exports file

/root/export 192.168.0.0/24(rw,no_root_squash,sync)

Any NFS gurus out there?

0 Kudos
Rumple
Virtuoso
Virtuoso

personally, I would setup a desktop, throw in a 750GB drive whatever you have laying around and then use either

http://www.openfiler.com/

http://www.freenas.org/

0 Kudos
Mad_HADR
Contributor
Contributor

I may do that, just wanted to avoid another (powered on) machine in my house.

0 Kudos
Rumple
Virtuoso
Virtuoso

heh I hear you there...I have about 5 of them including my ESX test box...

What i did was go out and buy a dell 2610sa controller off ebay. SATA controller that esx sees as scsi. Nto fast, but I am currently running about 20 vm's on a 2 socket/dual core box without much trouble.

0 Kudos
bobmacks
Contributor
Contributor

"Obviously ONLY for home use or test/dev in non-production environment."

Now i know why... recompiling my kernel somehow broke the vmxnet_console module on my ESX 3.0.1 server...

\# esxcfg-vswif -l

...

...

insmod: vmxnet_console: no module by that name found

ERROR: Unable to retrieve information about vswif0

Any suggestions on how I get this module back? Or if all else fails I might have the rebuild the ESX server...

0 Kudos