Commit graph

127 commits

Author SHA1 Message Date
Eelco Dolstra 3e30d87c26 * aufs2 -> aufs.
svn path=/nixos/trunk/; revision=30323
2011-11-08 15:12:11 +00:00
Eelco Dolstra 5e5328cb2e * Get the SSH host key from the user data if available. This allows
the user to create an instance with a known host key, and thus
  permit a secure connection.

svn path=/nixos/trunk/; revision=30242
2011-11-05 01:44:56 +00:00
Eelco Dolstra 3d5f3aa2b4 * Print the host key after sshd has started to prevent a potential race.
svn path=/nixos/trunk/; revision=30236
2011-11-04 20:33:24 +00:00
Eelco Dolstra 8a0a0efb48 * Force getting the hostname from EC2.
svn path=/nixos/trunk/; revision=30235
2011-11-04 20:06:59 +00:00
Eelco Dolstra 4abfacb468 * In the initrd, automatically mount all available ephemeral disks.
This depends on the EC2 instance type, so we have to probe for them.

svn path=/nixos/trunk/; revision=30234
2011-11-04 18:49:59 +00:00
Eelco Dolstra ba1a7188c1 * Don't get the hostname from EC2 if one has been set explicitly.
svn path=/nixos/trunk/; revision=30200
2011-11-03 01:29:40 +00:00
Eelco Dolstra e0573105b7 * Disable stuff like ALSA and the splash screen in headless setups
(like EC2 instances).

svn path=/nixos/trunk/; revision=30192
2011-11-02 16:10:30 +00:00
Peter Simons 20b364f4de Reverting revisions 30103-30106: "always set nixpkgs.config.{state,store}Dir", etc.
After the change from revision 30103, nixos-rebuild suddenly consumed
freaky amounts of memory. I had to abort the process after it had
allocated well in excess of 30GB(!) of RAM. I'm not sure what is causing
this behavior, but undoing that assignment fixes the problem. The other
two commits needed to be revoked, too, because they depend on 30103.

svn path=/nixos/trunk/; revision=30127
2011-10-30 15:19:58 +00:00
Shea Levy 09cf6ce70c find modules | fgrep .nix | fgrep -v .svn | fgrep -v nixpkgs.nix | xargs sed -i -e 's|/nix/var|${config.nixpkgs.config.nix.stateDir}|g' -e 's|/nix/store|${config.nixpkgs.config.nix.storeDir}|g'
Don't assume /nix/store or /nix/var in NixOS modules, this is configurable

svn path=/nixos/trunk/; revision=30104
2011-10-29 21:03:57 +00:00
Eelco Dolstra 3397bc6e09 * Recent kernels need some more modules in the initrd to be able to do
CIFS mounts.

svn path=/nixos/trunk/; revision=30067
2011-10-27 17:46:25 +00:00
Eelco Dolstra 5a03989036 * Fix Amazon image generation (there is no $ORIG_TMPDIR in
runInLinuxVM anymore; use /tmp/xchg instead).

svn path=/nixos/trunk/; revision=29970
2011-10-21 23:39:05 +00:00
Peter Simons eb6e1310b8 strip trailing whitespace; no functional change
svn path=/nixos/trunk/; revision=29285
2011-09-14 18:20:50 +00:00
Lluís Batlle i Rossell 8138feb630 The VM did not want to mount the CIFS without these two modules available in stage1.
svn path=/nixos/trunk/; revision=28947
2011-08-31 21:20:48 +00:00
Eelco Dolstra 74586fd2bb * Fix the permissions on /tmp.
svn path=/nixos/trunk/; revision=28435
2011-08-09 15:32:39 +00:00
Eelco Dolstra d75efe4aa1 * For security, don't mount the entire host filesystem.
svn path=/nixos/trunk/; revision=28429
2011-08-09 14:07:44 +00:00
Eelco Dolstra eba6e0456b * Use the VESA driver. It seems to work better now. In particular,
it doesn't turn blue backgrounds into yellow (see
  e.g. http://hydra.nixos.org/build/1232626/download/1/screen.png).

svn path=/nixos/trunk/; revision=28395
2011-08-08 15:16:42 +00:00
Eelco Dolstra 8aad8c536f * Make virtualisation.qemu.options a list.
svn path=/nixos/trunk/; revision=28120
2011-08-02 06:52:10 +00:00
Rob Vermaas d0ad799582 bind mount /proc in chroot dureing image creation, to prevent some error
svn path=/nixos/trunk/; revision=28002
2011-07-29 14:55:42 +00:00
Eelco Dolstra a2ad688a63 * Handle the case where networking.hostName is empty.
svn path=/nixos/trunk/; revision=27510
2011-06-21 10:46:21 +00:00
Eelco Dolstra 3cb5ea79bd * Add an option virtualisation.nova.extraConfig.
svn path=/nixos/trunk/; revision=27504
2011-06-20 14:27:06 +00:00
Eelco Dolstra 545431003b * Create some virtual consoles in Nova VMs because it provides VNC
access.

svn path=/nixos/trunk/; revision=27483
2011-06-16 14:15:37 +00:00
Eelco Dolstra e9a567f8d2 * Update the Nova module for the Cactus release.
svn path=/nixos/trunk/; revision=27410
2011-06-09 17:11:56 +00:00
Eelco Dolstra 862fe5ad78 * Generate a nova.conf file.
* Provide a configuration.nix in Nova images.

svn path=/nixos/trunk/; revision=27224
2011-05-11 13:52:49 +00:00
Eelco Dolstra 05ff7baf48 * /var/lib/nova/networks should be readable by the `nobody' user,
because dnsmasq runs as nobody and reads its host list from there.

svn path=/nixos/trunk/; revision=26740
2011-04-07 12:47:20 +00:00
Eelco Dolstra 3836e8eb02 * Properly initialise Nova's state.
svn path=/nixos/trunk/; revision=26735
2011-04-07 09:59:11 +00:00
Eelco Dolstra 4c2a0dc531 * Add multipath-tools (specifically, kpartx) to nova-compute's $PATH
so that it can inject SSH keys into disk images.
* Use the injected key if available.

svn path=/nixos/trunk/; revision=26724
2011-04-06 15:53:03 +00:00
Eelco Dolstra 2e2282bd5e * Added a module to create a disk image for Nova.
svn path=/nixos/trunk/; revision=26721
2011-04-06 15:09:34 +00:00
Eelco Dolstra fcaec58d27 * Add a module for setting up a basic (single-node) OpenStack Compute
(Nova) cloud.

svn path=/nixos/trunk/; revision=26664
2011-04-01 18:09:57 +00:00
Eelco Dolstra 2c1084b21b * libvirtd job: wait until libvirtd is accepting connections.
svn path=/nixos/trunk/; revision=26663
2011-04-01 18:08:53 +00:00
Eelco Dolstra 1e2c0d6284 * Try to hack around libvirt's stateful use of /etc/libvirt. (Routine
operations such as creating VMs modify the contents of
  /etc/libvirt.)

svn path=/nixos/trunk/; revision=26644
2011-03-31 22:10:26 +00:00
Eelco Dolstra e174562ee1 * Put ebtables in libvirtd's PATH.
svn path=/nixos/trunk/; revision=26629
2011-03-31 15:24:13 +00:00
Eelco Dolstra be0fca5781 * Use QEMU/KVM's paravirtualised console device for the backdoor.
This has the advantage that it doesn't depend on networking being
  up.
* Move common QEMU/KVM guest configuration to profiles/qemu-guest.nix.

svn path=/nixos/trunk/; revision=26421
2011-03-18 12:38:22 +00:00
Eelco Dolstra a19849914a * libvirtd: Remove the pid on startup. If it exists, libvirtd
tends to segfault.

svn path=/nixos/trunk/; revision=26365
2011-03-16 13:52:52 +00:00
Eelco Dolstra 8add655028 * Add qemu_kvm to the system path.
svn path=/nixos/trunk/; revision=26359
2011-03-16 12:31:06 +00:00
Eelco Dolstra f45866d0e7 * The NAT networking in libvirt requires the "tun" module.
svn path=/nixos/trunk/; revision=26314
2011-03-15 10:52:44 +00:00
Eelco Dolstra f833492c68 * Add dnsmasq to libvirtd's PATH. This is required for networking.
svn path=/nixos/trunk/; revision=26313
2011-03-15 09:42:49 +00:00
Eelco Dolstra cd30b40da7 * Replace ifconfig by ip in the initrd of VM tests.
svn path=/nixos/trunk/; revision=26280
2011-03-11 14:59:36 +00:00
Eelco Dolstra e2e7b689b4 * Fix `nixos-rebuild build-vm-with-bootloader': QEMU now requires the
`readonly' flag if the disk image is not writable.

svn path=/nixos/trunk/; revision=26245
2011-03-10 11:39:37 +00:00
Eelco Dolstra 08426fb717 * Add an Upstart job for libvirt-guests.
svn path=/nixos/trunk/; revision=26121
2011-02-25 15:56:49 +00:00
Eelco Dolstra 6fd7f8e0e6 * Add an Upstart job for libvirtd.
svn path=/nixos/trunk/; revision=26114
2011-02-25 15:07:52 +00:00
Eelco Dolstra e0fef9c333 * Drop the unnecessary boot=on flag.
svn path=/nixos/trunk/; revision=26103
2011-02-24 21:47:56 +00:00
Eelco Dolstra 163769ace5 * Write hypervisor log messages to /var/log/xen/console.
svn path=/nixos/trunk/; revision=25882
2011-02-10 12:27:12 +00:00
Sander van der Burg 96b769c979 Removed the backdoor, because it does not work anymore and it has also become obsolete (Disnix uses something else now)
svn path=/nixos/trunk/; revision=25601
2011-01-17 16:15:59 +00:00
Eelco Dolstra 04b43f1e3f * Remove tabs because this causes the shell script to be misindented.
svn path=/nixos/trunk/; revision=25522
2011-01-12 15:40:46 +00:00
Eelco Dolstra ecaf1d9f08 * Using hpet no longer seems necessary. Maybe upstream fixed it.
svn path=/nixos/trunk/; revision=25489
2011-01-10 13:32:09 +00:00
Eelco Dolstra 796b48c367 * Run smbd in its own session / process group (setsid) because smbd
now kills its process group when it exits.  Without setsid, this
  ends up killing the parent (i.e., the builder).
* Use port 445 instead of 139 because the CIFS kernel module tries
  port 445 first.  If there is an actual Samba running on the host, it
  would end up connecting to that one instead of our own and fail.

svn path=/nixos/trunk/; revision=25016
2010-12-06 19:02:24 +00:00
Eelco Dolstra 8e168edebc * Increase the number of loopback devices from the default (8),
which is way too small because every VM virtual disk requires
  a loopback device.

svn path=/nixos/trunk/; revision=24988
2010-12-06 09:54:08 +00:00
Sander van der Burg 9c722e474d - Added nixos-build-vms command, which builds a virtual network from a network.nix expression (also used by nixos-deploy-network)
- Added a backdoor option to the interactive run-vms script. This allows me to intergrate the virtual network approach with Disnix
- Small documentation fixes

Some explanation:

The nixos-build-vms command line tool can be used to build a virtual network of a network.nix specification.
For example, a network configuration (network.nix) could look like this:

{
  test1 = 
    {pkgs, config, ...}:
 
    {
      services.openssh.enable = true;
      ...
    };

  test2 =
    {pkgs, config, ...}:
    
    {
      services.openssh.enable = true;
      services.xserver.enable = true;
    }

    ;
}

By typing the following instruction:

$ nixos-build-vms -n network.nix

a virtual network is built, which can be started by typing:

$ ./result/bin/run-vms

It is also possible to enable a backdoor. In this case *.socket files are stored in the current directory
which can be used by the end-user to invoke remote instruction on a VM in the network through a Unix
domain socket.

For example by building the network with the following instructions:

$ nixos-build-vms -n network.nix --use-backdoor

and launching the virtual network:

$ ./result/bin/run-vms

You can find two socket files in your current directory, namely: test1.socket and test2.socket.
These Unix domain sockets can be used to remotely administer the test1 and test2 machine
in the virtual network.

For example by running:

$ socat ./test1.socket stdio
ls /root

You can retrieve the contents of the /root directory of the virtual machine with identifier test1


svn path=/nixos/trunk/; revision=24410
2010-10-21 22:50:12 +00:00
Eelco Dolstra fa04ae9738 * It's "tun", not "tap".
svn path=/nixos/trunk/; revision=24217
2010-10-11 17:06:49 +00:00
Eelco Dolstra 81dbac4af3 * Don't run ntpd in DomU.
svn path=/nixos/trunk/; revision=24125
2010-10-06 20:22:36 +00:00