[Nix-dev] Nixops on headless server

Marco Maggesi maggesi at math.unifi.it
Mon Dec 23 12:43:21 CET 2013


Hi,

would you post a minimal working example?
I made several attempts but no one worked so far.
Here is my present configuration:

# logical.nix
{
  network.description = "Web server";

  webserver =
    { config, pkgs, ... }:
    {
      #require = [ <nixos/modules/programs/virtualbox.nix> ];
      services.openssh.enable = true;
      #services.virtualbox.enable = true;
      #services.httpd.enable = true;
      #services.httpd.adminAddr = "alice at example.org";
      #services.httpd.documentRoot = "${pkgs.valgrind}/share/doc/valgrind/html";
    };
}

# physical.nix
{
  webserver =
    { config, pkgs, ... }:
    {
      deployment.targetEnv = "virtualbox";
      deployment.virtualbox.memorySize = 1024; # megabytes
      deployment.virtualbox.headless = true;
    };
}

And I get the following error:

webserver> VBoxManage: error: The virtual machine
'nixops-9a9af89c-6bc6-11e3-9d50-23ed2c71331d-webserver' has terminated
unexpectedly during startup with exit code 1
webserver> VBoxManage: error: Details: code NS_ERROR_FAILURE
(0x80004005), component Machine, interface IMachine


2013/12/23 Patrick Wheeler <patrick.john.wheeler at gmail.com>:
> I found my problem.
>
> I remembered I needed to include something like:
>
> require = [ <nixos/modules/programs/virtualbox.nix> ];
>
> in the configuration.nix, or in my nixops expression.
>
> Patrick
>
>
> On Sun, Dec 22, 2013 at 2:04 PM, Patrick Wheeler
> <patrick.john.wheeler at gmail.com> wrote:
>>
>> I am having the same problem currently if anyone has any insight.
>>
>> Patrick
>>
>>
>> On Fri, Nov 1, 2013 at 3:01 PM, Marco Maggesi <maggesi at math.unifi.it>
>> wrote:
>>>
>>> Hello,
>>>
>>> I'm trying to install nixops on a headless server and I get the following
>>> error which seems to be related to the lack of X environment.
>>> I set the option
>>> deployment.virtualbox.headless = true;
>>> and completely destroyed and recreated the cloud but it doesn't seem to
>>> have affect.
>>> Any idea?
>>>
>>> Thanks,
>>> Marco
>>>
>>> [...]
>>> webserver> VBoxManage: error: The virtual machine
>>> 'nixops-f289aeae-432e-11e3-9e21-5f0f061205c9-webserver' has terminated
>>> unexpectedly during startup with exit code 1
>>> webserver> VBoxManage: error: Details: code NS_ERROR_FAILURE
>>> (0x80004005), component Machine, interface IMachine
>>> webserver> Waiting for VM
>>> "nixops-f289aeae-432e-11e3-9e21-5f0f061205c9-webserver" to power on...
>>> webserver> waiting for IP
>>> address...............................................
>>>
>>> _______________________________________________
>>> nix-dev mailing list
>>> nix-dev at lists.science.uu.nl
>>> http://lists.science.uu.nl/mailman/listinfo/nix-dev
>>>
>>
>>
>>
>> --
>> Patrick Wheeler
>> Patrick.John.Wheeler at gmail.com
>> Patrick.J.Wheeler at rice.edu
>> Patrick.Wheeler at colorado.edu
>
>
>
>
> --
> Patrick Wheeler
> Patrick.John.Wheeler at gmail.com
> Patrick.J.Wheeler at rice.edu
> Patrick.Wheeler at colorado.edu
>
> _______________________________________________
> nix-dev mailing list
> nix-dev at lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/nix-dev
>


More information about the nix-dev mailing list