Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

virtualbox__intnet option in Vagrantfile smashes vagrant-network.nix #45

Open
TheTesla opened this issue Jul 31, 2019 · 1 comment
Open

Comments

@TheTesla
Copy link

Having this in Vagrantfile:

subconfig.vm.network "private_network", ip: "192.168.80.10", virtualbox__intnet: "mynetwork"
subconfig.vm.network "private_network", ip: "192.168.90.4"

makes a vagrant-network.nix:

{ config, pkgs, ... }:
{
  networking.interfaces = [
    { 
      name         = "enp0s8";
      prefixLength = 24;
    }
    { 
      name         = "enp0s9";
      ipAddress    = "192.168.90.4";
      prefixLength = 24;
    }
  ];
}

You see: The ip address is missing for enp0s8

@cdituri
Copy link
Contributor

cdituri commented Jun 6, 2020

@TheTesla looks like the vagrant/templates/guests/nixos/network template is expecting a network ip of explicit type static.

As to why the other entry works, unsure. I would wager it has to do with how vagrant is handling virtualbox__intnet in its implementation. If you add virtualbox__intnet: "mynetwork" to both statements do they both fail to inline an ip? That would be my expectation based on above hypothesis.

As for a workaround, give the following a try in your Vagrantfile:

subconfig.vm.network "private_network", type: "static", ip: "192.168.80.10", virtualbox__intnet: "mynetwork"
subconfig.vm.network "private_network", ip: "192.168.90.4"

If this works and you'd like to be fully explicit simply add another type: "static" to your second, non virtualbox__intnet, interface.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants