Mac Air OS X Mountain Lion - mounting NFS "dscl" freezes system permanently I set out to execute the following steps on OS X Mountain Lion to mount an NFS share- 

create

sudo dscl . -create /Mounts/foo
sudo dscl . -create /Mounts/foo VFSLinkDir /Volumes/share
sudo dscl . -create /Mounts/foo VFSOpts resvport ro nosuid
sudo dscl . -create /Mounts/foo VFSType nfs
sudo dscl . -create /Mounts/foo RecordName nfs.example.com:/srv/share


verify

sudo dscl . -list /Mounts
sudo dscl . -read /Mounts/nfs.example.com:/srv/share


After creating, when I tried to list the mounts, my mac air stopped responding. On restart, when I log on to my account, it freezes on a finder window without loading anything else. I can't seem to kill it or start task manager or do anything else. 

I can log on to the guest account but not with my own account.
When you ask to mount an NFS volume this way, "hard"(the default), the computer will try to mount the volume and keep trying (to the exclusion of all else) because it thinks that this volume is critical for system operation.  You need to tell the computer that this volume is not needed to run the system.  The way you do this is to tell it to mount "soft".  While you at it, it helps to include the "intr" option (Allow signals to interrupt an NFS call. Useful for aborting when the server doesn't respond).

So in your command above you need to add soft and intr, like this:

sudo dscl . -create /Mounts/foo VFSOpts resvport intr soft ro nosuid 


You may want to explore these options too, depending on your application they may be useful:

nolocks locallocks wsize=32768 rsize=32768 timeo=900 retrans=3 proto=tcp nfc


Finally, you may be missing a RecordType declaration.  I'm not sure if this is created automatically for you, if it is not already there add it by:

sudo dscl . -create /Mounts/foo RecordType dsRecTypeStandard:Mounts


Good luck.