To set up an NFS server in a container, do the following:
-
Make sure the
rpcbind,nfsd, andnfslockservices are installed in the container. -
Enable the NFS server feature for the container by running the
prlctl set --features nfsd:oncommand on the hardware node. For example:# prlctl set MyCT --features nfsd:onNote
Note: If the container is running, restart it for the changes to take effect.
-
Start the
rpcbindservice in the container.# service rpcbind start Starting rpcbind: [ OK ] -
Start the
nfsandnfslockservices in the container.# service nfs start Starting NFS services: [ OK ] Starting NFS quotas: [ OK ] Starting NFS mountd: [ OK ] Starting NFS daemon: [ OK ] # service nfslock start Starting NFS statd: [ OK ]
You can now set up NFS shares in the configured container.