2.13.3. Setting Up NFS Server in Containers

To set up an NFS server in a container, do the following:

  1. Make sure the rpcbind, nfsd, and nfslock services are installed in the container.
  2. 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.

  3. Start the rpcbind service in the container.

    # service rpcbind start
    Starting rpcbind:                                          [  OK  ]
  4. Start the nfs and nfslock 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.