0

I am running VMware Workstation 16 Pro on my W11 PC. I have several VMs, including a Ubuntu 22.04.4 LTS VM, and a Solaris 10 VM (sadly still needed for legacy projects). I need to allow the Solaris VM access (full RW permissions) to my "/" partition (ext4, /dev/sda3) in the Ubuntu VM. First, is this even possible? If so, what are the steps necessary for this to happen?

On the Ubuntu VM, I went to Settings -> Sharing, enabled Sharing, and then went into Media Sharing, and shared the folder /, and enabled Wired connection 1. In the Solaris VM created the folder /etc/nfs/ub22 (as root), I su'd to root and entered

mount -F nfs 192.168.18.107:/ /etc/nfs/ub22

(1921.68.18.107 is the IP of the Ubuntu VM) but I get the error

nfs mount: 192.168.18.107: : RPC: Rpcbind failure - RPC: Unable to receive
1
  • I think the Ubuntu sharing is CIFS/SMB or DAV. Those are different protocols compared to NFS. Commented Jul 18 at 15:29

1 Answer 1

1

Ok, did some more sleuthing and came up with an answer!

On Ubuntu:

  • sudo apt update
  • sudo apt install nfs-kernel-server
  • Create shared directory (if DNE): mkdir -p /path/to/desired/shared/dir
  • Edit /etc/exports file: sudo nano /etc/exports
  • Add mount line: /path/to/shared/dir <client_ip_address>(rw,sync,no_subtree_check,all_squash,anonuid=<your UID>,anongid=<your GID>)

N.B.:

  • You can (likely) lookup your UID/GID in /etc/passwd
  • There cannot be any whitespace between the IP address and the opening paren
  • The above line sets the share as RW, ensures data is written to disk before acknowledgement, disables subtree checking for performance, and sets all file ownership to your Ubuntu UID/GID
  • This is fundamentally insecure, and assumes you have total control over your network environment

Back to commands:

  • sudo exportfs -a
  • sudo systemctl restart nfs-kernel-server

On Solaris:

  • su to root: su -
  • Create a memorable mount point dir, or use an existing one. I did: mkdir /mnt/ub22
  • mount -F nfs <server IP>:/path/to/share/as/in/etc/exports /dir/created/above

And now you can create/delete/edit files in your Solaris VM, which reside in your Ubuntu VM!

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.