Following Section 3.1: Deploying a VirtualBox VM of the NixOps doc, there is an issue with Example 3.1 as evidenced by:
Tail end of running 'nixops deploy -d trivial':
webserver> starting the following units: alsa-store.service, get-vbox-nixops-client-key.service, kmod-static-nodes.service, network-local-commands.service, network-setup.service, nix-daemon.service, nscd.service, ntpd.service, systemd-journald.service, systemd-logind.service, systemd-modules-load.service, systemd-sysctl.service, systemd-tmpfiles-clean.timer, systemd-tmpfiles-setup-dev.service, systemd-udev-settle.service, systemd-udev-trigger.service, systemd-udevd.service, systemd-vconsole-setup.service, virtualbox.service
webserver> A dependency job for get-vbox-nixops-client-key.service failed. See 'journalctl -xe' for details.
webserver> A dependency job for virtualbox.service failed. See 'journalctl -xe' for details.
webserver> the following new units were started: audit.service, dev-disk-by\x2dlabel-nixos.device, httpd.service, init.scope, keys.target
webserver> error: unable to activate new configuration
error: activation of 1 of 1 machines failed (namely on ‘webserver’)
After sshing into the 'webserver' host:
[root@webserver:~]# journalctl -xe
Jan 26 22:31:05 webserver httpd-pre-start[12348]: mkdir: cannot create directory ‘/nix/store/4c8dcjp0c3znivgiij4hj4za2j0bbfmp-valgrind-3.11.0/share/doc’: Read
Jan 26 22:31:05 webserver systemd[1]: httpd.service: Control process exited, code=exited status=1
Jan 26 22:31:05 webserver systemd[1]: Failed to start Apache HTTPD.
Jan 26 22:31:05 webserver systemd[1]: httpd.service: Unit entered failed state.
Jan 26 22:31:05 webserver systemd[1]: httpd.service: Failed with result 'exit-code'.
Jan 26 22:31:10 webserver systemd[1]: httpd.service: Service hold-off time over, scheduling restart.
Jan 26 22:31:10 webserver systemd[1]: nixops-keys.service: Cannot add dependency job, ignoring: Unit nixops-keys.service is masked.
Jan 26 22:31:10 webserver systemd[1]: Stopped Apache HTTPD.
Jan 26 22:31:10 webserver systemd[1]: Starting Apache HTTPD...
Jan 26 22:31:10 webserver httpd-pre-start[12359]: mkdir: cannot create directory ‘/nix/store/4c8dcjp0c3znivgiij4hj4za2j0bbfmp-valgrind-3.11.0/share/doc’: Read
Jan 26 22:31:10 webserver systemd[1]: httpd.service: Control process exited, code=exited status=1
Jan 26 22:31:10 webserver systemd[1]: Failed to start Apache HTTPD.
Jan 26 22:31:10 webserver systemd[1]: httpd.service: Unit entered failed state.
Jan 26 22:31:10 webserver systemd[1]: httpd.service: Failed with result 'exit-code'.
Jan 26 22:31:15 webserver systemd[1]: httpd.service: Service hold-off time over, scheduling restart.
Jan 26 22:31:15 webserver systemd[1]: nixops-keys.service: Cannot add dependency job, ignoring: Unit nixops-keys.service is masked.
Jan 26 22:31:15 webserver systemd[1]: Stopped Apache HTTPD.
Jan 26 22:31:15 webserver systemd[1]: Starting Apache HTTPD...
Jan 26 22:31:15 webserver httpd-pre-start[12370]: mkdir: cannot create directory ‘/nix/store/4c8dcjp0c3znivgiij4hj4za2j0bbfmp-valgrind-3.11.0/share/doc’: Read
Jan 26 22:31:15 webserver systemd[1]: httpd.service: Control process exited, code=exited status=1
Jan 26 22:31:15 webserver systemd[1]: Failed to start Apache HTTPD.
Jan 26 22:31:15 webserver systemd[1]: httpd.service: Unit entered failed state.
Jan 26 22:31:15 webserver systemd[1]: httpd.service: Failed with result 'exit-code'.
Jan 26 22:31:20 webserver systemd[1]: httpd.service: Service hold-off time over, scheduling restart.
Jan 26 22:31:20 webserver systemd[1]: nixops-keys.service: Cannot add dependency job, ignoring: Unit nixops-keys.service is masked.
Jan 26 22:31:20 webserver systemd[1]: Stopped Apache HTTPD.
Jan 26 22:31:20 webserver systemd[1]: Starting Apache HTTPD...
Jan 26 22:31:20 webserver httpd-pre-start[12381]: mkdir: cannot create directory ‘/nix/store/4c8dcjp0c3znivgiij4hj4za2j0bbfmp-valgrind-3.11.0/share/doc’: Read
Jan 26 22:31:20 webserver systemd[1]: httpd.service: Control process exited, code=exited status=1
Jan 26 22:31:20 webserver systemd[1]: Failed to start Apache HTTPD.
Jan 26 22:31:20 webserver systemd[1]: httpd.service: Unit entered failed state.
Jan 26 22:31:20 webserver systemd[1]: httpd.service: Failed with result 'exit-code'.
Jan 26 22:31:26 webserver systemd[1]: httpd.service: Service hold-off time over, scheduling restart.
Jan 26 22:31:26 webserver systemd[1]: nixops-keys.service: Cannot add dependency job, ignoring: Unit nixops-keys.service is masked.
Jan 26 22:31:26 webserver systemd[1]: Stopped Apache HTTPD.
Jan 26 22:31:26 webserver systemd[1]: Starting Apache HTTPD...
Jan 26 22:31:26 webserver httpd-pre-start[12392]: mkdir: cannot create directory ‘/nix/store/4c8dcjp0c3znivgiij4hj4za2j0bbfmp-valgrind-3.11.0/share/doc’: Read
Jan 26 22:31:26 webserver systemd[1]: httpd.service: Control process exited, code=exited status=1
Jan 26 22:31:26 webserver systemd[1]: Failed to start Apache HTTPD.
Jan 26 22:31:26 webserver systemd[1]: httpd.service: Unit entered failed state.
Jan 26 22:31:26 webserver systemd[1]: httpd.service: Failed with result 'exit-code'.
Example 3.1 results in httpd-pre-start attempting to create a directory at a read-only location. Trying this expression with a destination of '/mnt/foobar' works -- but may degrade later steps in the NixOps doc.
Historical reference: https://groups.google.com/forum/#!topic/nixops-users/vDE67k480uM
Thanks!
-Joshua
backends/virtualbox