To set up an NFS server in a container, do the following:
-
Make sure the
rpcbind
,nfsd
, andnfslock
services are installed in the container. -
Enable the NFS server feature for the container by running the
prlctl set --features nfsd:on
command on the hardware node. For example:# prlctl set MyCT --features nfsd:on
Note
Note: If the container is running, restart it for the changes to take effect.
-
Start the
rpcbind
service in the container.# service rpcbind start Starting rpcbind: [ OK ]
-
Start the
nfs
andnfslock
services 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.