For simplicity, first setup your VM with bridged networking. Then, execute this as root on your vm:
aptitude install nfs-common nfs-kernel-server portmap
echo "/var *(rw,no_subtree_check,all_squash,anonuid=0,anongid=0)" >> /etc/exports
echo "/etc *(rw,no_subtree_check,all_squash,anonuid=0,anongid=0)" >> /etc/exports
invoke-rc.d nfs-kernel-server restart || true
Obviously edit the echo statements above to export different directories.
Enter the IP address of your VM / mountpoint (nfs://10.0.0.1/etc) and the mount location on your local Mac. Given the example above that mounts /etc and /var, you'd probably want something like /Volumes/var and /Volumes/etc
You also need to pass -P for the Advanced Mount parameters.
That's it! Now you have root write access on your VM from your Mac.
No comments:
Post a Comment