Trying to get virtualbox working, I added to the Vagrantfile:
# https://developer.hashicorp.com/vagrant/docs/synced-folders/nfs#prerequisites
Vagrant.configure("2") do |config|
config.vm.synced_folder ".", "/vagrant", type: "nfs"
end
Vagrant.configure("2") do |config|
config.vm.network "private_network", type: "dhcp"
end
running vagrant destroy && vagrant up
again
Still hanging on Mounting NFS shared folders.
Full system restart.
sudo systemctl stats nfs-server
● nfs-server.service - NFS server and services
Loaded: loaded (/lib/systemd/system/nfs-server.service; enabled; vendor preset: en>
Drop-In: /run/systemd/generator/nfs-server.service.d
└─order-with-mounts.conf
Active: active (exited) since Sat 2023-02-04 11:03:41 MST; 13min ago
Process: 2960 ExecStartPre=/usr/sbin/exportfs -r (code=exited, status=0/SUCCESS)
Process: 3016 ExecStart=/usr/sbin/rpc.nfsd (code=exited, status=0/SUCCESS)
Main PID: 3016 (code=exited, status=0/SUCCESS)
CPU: 6ms
Feb 04 11:03:41 dt systemd[1]: Starting NFS server and services...
Feb 04 11:03:41 dt systemd[1]: Finished NFS server and services.
Still hanging on Mounting NFS shared folders.
I tried vagrant ssh
then /usr/local/etc/init.d/nfs-client start
It returned: -bash: /usr/local/etc/init.d/nfs-client: No such file or directory
I have no clue what any of this means.
I don’t know what I’m doing, but I tried sudo systemctl status nfs-common
on the virtual machine and got:
○ nfs-common.service
Loaded: masked (Reason: Unit nfs-common.service is masked.)
Active: inactive (dead)
Is that a clue?
Then I found this: https://www.reddit.com/r/linux4noobs/comments/kxqmq5/nfs_server_stopped_working_no_idea_how_to_fix/
Tried(on virtual machine): sudo systemctl unmask nfs-common nfs-common.service
Then: sudo systemctl start nfs-common nfs-common.service
Result: Failed to start nfs-common.service: Unit nfs-common.service is masked.
LOL
Found this: https://askubuntu.com/questions/804946/systemctl-how-to-unmask
Tried the highest rated answer. It all worked and x11 installed where it hadn’t been there previously. But, when I try to run the failed command on the virtual machine I still get:
mount.nfs: Connection timed out
I noticed my mistake with the x11 thing and redid all the directions for nfs-common instead (on the client machine).
systemctl status nfs-common
Returns:
○ nfs-common.service
Loaded: masked (Reason: Unit nfs-common.service is masked.)
Active: inactive (dead)
Found this: https://developer.hashicorp.com/vagrant/docs/boxes/base#default-user-settings
Added this to end of config.
vagrant ALL=(ALL) NOPASSWD: ALL
Still ends up at mount.nfs: Connection timed out
Seriously, how the hell does anyone actually use this software for business when it’s so buggy?
I just noticed that every time I try to vagrant up it says this:
default: SSH username: vagrant default: SSH auth method: private key
default: Warning: Connection reset. Retrying...
default: Warning: Remote connection disconnect. Retrying...
default:
default: Vagrant insecure key detected. Vagrant will automatically replace
default: this with a newly generated keypair for better security.
default:
default: Inserting generated public key within guest...
default: Removing insecure key from the guest if it's present...
default: Key inserted! Disconnecting and reconnecting using new SSH key...
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
==> default: Setting hostname...
==> default: Configuring and enabling network interfaces...
==> default: Installing NFS client...
==> default: Exporting NFS shared folders.
==> default: Preparing to edit /etc/exports. Administrator privileges will be required...
==> default: Mounting NFS shared folders...
Two things stand out. The first warning seems to say there’s something wrong with an SSH key.
The second thing is that it says “Administrator privileges will be required…” But then it never asks for a password. It just hangs on Mounting NFS folders.
Is it failing to ask for the password?