Vagrant: Difference between revisions

imported>GeFrIt42
No edit summary
Adding notes about networking firewall blocking DHCP requests
 
(One intermediate revision by one other user not shown)
Line 38: Line 38:


{{note|Home directories are set not to be world-searchable by default on NixOS. This may lead to a "permission denied" error when trying to mount directories within your home into the VM. You can change this by running <code>chmod a+x ~</code>, but note that this will allow all users on the system to read world-readable files within your home given the paths.}}
{{note|Home directories are set not to be world-searchable by default on NixOS. This may lead to a "permission denied" error when trying to mount directories within your home into the VM. You can change this by running <code>chmod a+x ~</code>, but note that this will allow all users on the system to read world-readable files within your home given the paths.}}
{{Warning|Since '''Vagrant 2.3.4 a bug is preventing the mounting of the nfs folders'''. The issue is vagrant try to call System V instead of Systemd in order to get the status of nfs service. For details and '''workaround''' : [https://github.com/hashicorp/vagrant/issues/13296]}}


== Plugins ==
== Plugins ==
Line 86: Line 88:


More information in this [https://github.com/NixOS/nixpkgs/issues/36880 issue]
More information in this [https://github.com/NixOS/nixpkgs/issues/36880 issue]
== Troubleshooting: VM failing to receive IP address ==
If you run <code>vagrant up</code> and your VM is stalling with the message <code>Waiting for domain to get an IP address</code>, your networking firewall may be blocking vagrants DHCP requests. You can allow the requests with the following changes to your configuration.nix file:
<syntaxhighlight lang=nix>
# Trust libvirt bridge interfaces for VM networking (required for Vagrant DHCP)
networking.firewall.trustedInterfaces = [ "virbr0" "virbr1" "virbr2" ];
# Don't let NetworkManager manage libvirt bridges (prevents conflicts)
networking.networkmanager.unmanaged = [ "virbr0" "virbr1" "virbr2" ];
</syntaxhighlight>