I am using Ubuntu cloud image, version 20.04, in proxmox. But it seems the kernel in this image lack some kernel modules which are needed by the nfs-kernel-server package. To solve it, you can compile the kernel by yourself, or insmod to check, or use this script to download a more recent and more modules-included kernel.
The Ubuntu cloud image contains about 10 kernel modules, and Ubuntu generic kernel image contains about 60 kernel modules. I suppose they might want the cloud server to be minimum and not enabled that many modules but I have enough resources so I don't care that much.
The error messages are like below:
- A dependency job for nfs-server.service failed.
- nfs-mountd.service: Job nfs-mountd.service/start failed with result 'dependency'
- mount: /proc/fs/nfsd: unknown filesystem type 'nfsd'
The kernel modules which are necessary for nfs server should be following:
- nfsd
- nfs_acl
- lockd
- grace
- sunrpc