Cannot deploy nixops net

With the following deploy.nix:

rec{
  node1=(import ./node.nix)//{
    deplyment.targetEnv="virtualbox";
    deployment.virtualbox.memorySize = 1024; # megabytes
    deployment.virtualbox.vcpu = 2; # number of cpus
  };
  node2=node1;
  node3=node1;
}

I get the following error on nixops deploy ./deploy.nix -d test --debug:


ssh: Could not resolve hostname node2: Name or service not known
node2> could not connect to ‘root@node2’, retrying in 1 seconds...
ssh: Could not resolve hostname node2: Name or service not known
node2> could not connect to ‘root@node2’, retrying in 2 seconds...
ssh: Could not resolve hostname node3: Name or service not known
node3> could not connect to ‘root@node3’, retrying in 1 seconds...
ssh: Could not resolve hostname node1: Name or service not known
node1> could not connect to ‘root@node1’, retrying in 1 seconds...
ssh: Could not resolve hostname node2: Name or service not known
node2> could not connect to ‘root@node2’, retrying in 4 seconds...
ssh: Could not resolve hostname node3: Name or service not known
node3> could not connect to ‘root@node3’, retrying in 2 seconds...
ssh: Could not resolve hostname node1: Name or service not known
node1> could not connect to ‘root@node1’, retrying in 2 seconds...
ssh: Could not resolve hostname node3: Name or service not known
node3> could not connect to ‘root@node3’, retrying in 4 seconds...
ssh: Could not resolve hostname node1: Name or service not known
node1> could not connect to ‘root@node1’, retrying in 4 seconds...
ssh: Could not resolve hostname node2: Name or service not known
node2> could not connect to ‘root@node2’, retrying in 8 seconds...
ssh: Could not resolve hostname node3: Name or service not known
node3> could not connect to ‘root@node3’, retrying in 8 seconds...
ssh: Could not resolve hostname node1: Name or service not known
node1> could not connect to ‘root@node1’, retrying in 8 seconds...
ssh: Could not resolve hostname node2: Name or service not known
ssh: Could not resolve hostname node3: Name or service not known
ssh: Could not resolve hostname node1: Name or service not known
error: Multiple exceptions (3): 
  * node1: unable to start SSH master connection to ‘root@node1’
  * node2: unable to start SSH master connection to ‘root@node2’
  * node3: unable to start SSH master connection to ‘root@node3’

------------------------------
Traceback (most recent call last):
Traceback (most recent call last):
  File "/nix/store/b65k54xzpmhjqappam87k6ha34rvzm9l-nixops-1.7pre2764_932bf43/bin/..nixops-wrapped-wrapped", line 1001, in <module>
    e.print_all_backtraces()
  File "/nix/store/b65k54xzpmhjqappam87k6ha34rvzm9l-nixops-1.7pre2764_932bf43/lib/python2.7/site-packages/nixops/parallel.py", line 20, in print_all_backtraces
    traceback.print_exception(e[0], e[1], e[2])
  File "/nix/store/gk0lrrvqz491xn0mgrshzgvazx4rghl2-python-2.7.17/lib/python2.7/traceback.py", line 125, in print_exception
    print_tb(tb, limit, file)
  File "/nix/store/gk0lrrvqz491xn0mgrshzgvazx4rghl2-python-2.7.17/lib/python2.7/traceback.py", line 61, in print_tb
    f = tb.tb_frame
AttributeError: 'unicode' object has no attribute 'tb_frame'

Doesn’t nixops prepare dns and ssh keys automatically?

I think nixops uses /etc/hosts for this, there is no dns involved.

Don’t know why it is not able to connect to the node. According to the manual you need to set up network configuration for virtualbox properly.

For the details you have to look at nixops manual, but if I remember correctly, I think you can not use bridged network, and also there must be a vnet0 interface or something like that.

virtualbox needs to provide the ip address via it’s dhcp service.