Open basvandijk opened 9 years ago
Yes I'm also getting the issue, even on 4b53c3d03b5af73122307383ae1c22146ae302c4
$ nixops deploy -d 894a3787-2ef9-11e5-8f06-56847afe9799
webserver> creating VirtualBox VM...
webserver> Virtual machine 'nixops-894a3787-2ef9-11e5-8f06-56847afe9799-webserver' is created and registered.
webserver> UUID: de026fd2-0f98-4745-b255-57ab19702002
webserver> Settings file: '/home/stewart/VirtualBox VMs/nixops-894a3787-2ef9-11e5-8f06-56847afe9799-webserver/nixops-894a3787-2ef9-11e5-8f06-56847afe9799-webserver.vbox'
webserver> creating disk ‘disk1’...
webserver> 0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
webserver> Clone hard disk created in format 'VDI'. UUID: 827d793b-e185-4200-a875-290670fb1491
webserver> attaching disk ‘disk1’...
webserver> Waiting for VM "nixops-894a3787-2ef9-11e5-8f06-56847afe9799-webserver" to power on...
webserver> VM "nixops-894a3787-2ef9-11e5-8f06-56847afe9799-webserver" has been successfully started.
error: command ‘['VBoxManage', 'startvm', u'nixops-894a3787-2ef9-11e5-8f06-56847afe9799-webserver']’ failed on machine ‘webserver’ (exit code 1)
Anyone know a solution for this?
I'm able to reproduce the same failure as above outside of nixops. The failure mode I'm experiencing is not specific to nixops.
This is the error when run under nixops:
single> Waiting for VM "nixops-9986315c-90a3-11e5-8152-7b4b0cb998fb-single" to power on...
single> VM "nixops-9986315c-90a3-11e5-8152-7b4b0cb998fb-single" has been successfully started.
error: command ‘['VBoxManage', 'startvm', u'nixops-9986315c-90a3-11e5-8152-7b4b0cb998fb-single', '--type', 'headless']’ failed on machine ‘single’ (exit code 1)
Build step 'Execute shell' marked build as failure
same failure when run outside of nixops in the same environment:
+ VBoxManage startvm nixops-7f2d9d02-90aa-11e5-9840-f39eed29cbf9-single --type headless
Waiting for VM "nixops-7f2d9d02-90aa-11e5-9840-f39eed29cbf9-single" to power on...
VM "nixops-7f2d9d02-90aa-11e5-9840-f39eed29cbf9-single" has been successfully started.
Build step 'Execute shell' marked build as failure
The failure only occurs, and occurs 100% of the time, if the command is executed under jenkins continuous integration service. If the command is not executed under the service the command succeeds without error.
I've confirmed all required kernel extensions are installed and usable. The user jenkins executes under, jenkins, is a member of the vboxusers group. The presence or absence of DISPLAY has no effect. The command will succeed when run manually in a shell that is set up as close as possible to the jenkins execution environment. Same user, same environment variables, same shell. The only difference I can determine is one is under a systemd service; the other is via an interactive shell (no DISPLAY in either).
I have no idea what is specific about execution under systemd that would result in this very unhelpful error.
Changing the virtualbox logging has no effect: No logging is attempted prior to the failure.
Weird eh?
is there a known solution for this issue?
I'm facing a similar problem trying to run a "hello world" nixops deploy. But I'm running Nix not on a NixOS system (using archlinux).
I'm trying to deploy a nixops network where
myMachine
should be deployed to a virtualbox VM:deployment.targetEnv = "virtualbox";
However I'm getting the following error:
Note that the -I .. points to a nixpkgs with a recent checkout of nixpkgs master.
Any idea what I'm doing wrong?