Closed bbigras closed 4 years ago
yeah, running into the same error on my end.
Running provisioner: nixos
fails for the example config in the repo.
@zimbatm any pointer where to look to fix that issue?
Update:
Using the vagrant box on vagrantcloud "nixos/nixos-16.09-x86_64" instead of the one created by nixbox packer solved the issue. Hence I think it's a issue with nixbox and not this plugin. Any idea what could be the reason?
Is it possible that /etc/nixos
doesn't exist in the new image? The plugin assumes that it's there:
/etc/nixos
does exist if I check with vagrant ssh
just after getting the error message:
What about /tmp/vagrant-provision.nix
, is it still there?
Typically what I would do is edit the ruby code to add some puts
debugging. It looks like line 103 succeeded and the file got uploaded. Then for some reason the mv command failed. It could be a number of issues.
You could change line 107 to add -v
flag for more verbosity from the tool: comm.sudo("mv -v #{source} #{target}")
What about /tmp/vagrant-provision.nix, is it still there?
Yes.
Can the script handle the sudo password? comm.sudo("echo test")
doesn't work either.
I seem able to run vagrant provision
if I set NOPASSWD in the sudoer file.
that smells like a regression in the image. The vagrant user is supposed to have password-less sudo access.
the vagrant user is supposed to belong to the wheel
group and that group is supposed to have NOPASSWD in the sudoers:
This PR should fix the issue: https://github.com/nix-community/nixbox/pull/53
nice, thanks for debugging this!
I use virtualbox and I disabled the shared folders with
config.vm.synced_folder '.', '/vagrant', disabled: true
since the box wouldn't start otherwise.