1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-09-11 15:08:33 +01:00
Commit graph

214 commits

Author SHA1 Message Date
Eelco Dolstra 08f14b33c1 Merge branch 'master' of github.com:NixOS/nixos into systemd 2012-08-20 11:27:38 -04:00
Eelco Dolstra a025e7e7e2 Provide a common share between VMs to allow easy communication
Every VM now mounts a common SMB share on /tmp/shared.
2012-08-16 10:47:33 -04:00
Eelco Dolstra 5ae6385175 qemu-vm.nix: Use ext4 instead of ext3 2012-08-09 10:00:49 -04:00
Shea Levy 9d8ddd90f9 qemu mounts /nix/store via CIFS 2012-08-07 16:44:15 -04:00
Shea Levy 13d8856a4f qemu requires VIRTIO_NET (and dependencies) for virtio networking 2012-08-07 16:25:11 -04:00
Shea Levy 805d37db48 qemu-vm creates an ext3 filesystem 2012-08-07 07:02:08 -04:00
Shea Levy 11e5207a2d qemu requires VIRTIO_BLK (and dependencies) for virtio drives 2012-08-06 17:10:54 -04:00
Eelco Dolstra 27f496c1ce Make the VirtualBox guest services depend on /dev/vboxguest
Systemd #ftw
2012-08-06 14:59:58 -04:00
Shea Levy e66bcbd58a The kernel needs SERIAL_8250_CONSOLE when using a real serial port as a console 2012-08-06 08:13:06 -04:00
Eelco Dolstra 16da4a14f1 amazon-image.nix: Don't put any old configurations in the GRUB menu 2012-07-25 16:38:05 -04:00
Eelco Dolstra b3b6b8ad60 virtualbox-image.nix: VirtualBox disks are /dev/sda, not /dev/vda 2012-07-24 19:07:03 -04:00
Eelco Dolstra 5a0cf5e7b6 Use ext4 for VirtualBox images 2012-07-23 14:01:10 -04:00
Eelco Dolstra 7613ae950a Fix booting on EC2
The kill command in ash doesn't know the "--" syntax, but doesn't need
it either.
2012-06-24 19:02:34 -04:00
Eelco Dolstra 9692495df0 Use BusyBox in the initrd
Using BusyBox instead of Bash plus a bunch of other tools gives us a
much more feature-full, yet smaller initrd.  In particular, BusyBox
contains networking commands such as ip and a DHCP client, useful for
NFS boots.  It's also much more convenient for rescue situations
because the shell has builtin readline support and there are many more
tools (including vi).
2012-06-22 10:43:06 -04:00
Eelco Dolstra a3118792a5 * Make the ACPI Shutdown command in VirtualBox to do the right thing.
svn path=/nixos/trunk/; revision=34473
2012-06-11 22:37:55 +00:00
Lluís Batlle i Rossell a257bf78cb Making the virtualbox-guest module be evaluated only in i686 and x86_64.
On mips, an assertion in the nixpkgs virtualbox was failing.


svn path=/nixos/trunk/; revision=34464
2012-06-11 17:31:03 +00:00
Eelco Dolstra 9dadfc3541 * Mark QEMU VMs as NixOS machines.
svn path=/nixos/trunk/; revision=34217
2012-05-23 15:40:31 +00:00
Eelco Dolstra 3b314fa40b * Include cryptsetup in EC2 AMIs.
svn path=/nixos/trunk/; revision=34096
2012-05-14 23:43:38 +00:00
Eelco Dolstra 03f2847054 * Set preferLocalBuild on a few trivial top-level derivations. These
tend to cause a lot of unnecessary I/O to the build machines.

svn path=/nixos/trunk/; revision=33936
2012-04-26 15:19:23 +00:00
Eelco Dolstra fa50d105d7 * Pass -cpu kvm64 in NixOS VMs (and add a simple regression test for
GMP).

svn path=/nixos/trunk/; revision=33849
2012-04-19 18:56:35 +00:00
Eelco Dolstra 43f43fd185 * Only stop libvirt-guests automatically on system shutdown.
Saving/restoring VMs is disruptive.

svn path=/nixos/trunk/; revision=33844
2012-04-19 15:12:55 +00:00
Eelco Dolstra 2821289aeb * Ugly hack: force udev to exit to prevent random "Device or resource
busy while trying to open /dev/xvda" errors from fsck.

svn path=/nixos/trunk/; revision=33766
2012-04-12 18:01:19 +00:00
Eelco Dolstra 185e9b69ed * Assume that the ephemeral devices are called /dev/xvda-e. So
in Charon deployments, non-ephemeral devices should be >= /dev/xvdf.

svn path=/nixos/trunk/; revision=33764
2012-04-12 16:48:01 +00:00
Eelco Dolstra 83679c99b1 * Don't put /var and /nix on ephemeral storage if we're booting
from EBS.

svn path=/nixos/trunk/; revision=33716
2012-04-10 11:11:05 +00:00
Eelco Dolstra 852e513638 * Handle booting from /dev/xvda.
svn path=/nixos/trunk/; revision=33645
2012-04-06 12:23:12 +00:00
Eelco Dolstra 040042b8a5 * Blackhole the address 169.254.169.254 after we've obtained the user
data to prevent non-root processes from getting the private host
  key.

svn path=/nixos/trunk/; revision=33442
2012-03-27 14:51:08 +00:00
Eelco Dolstra 7c75b046ea * Fix the permissions on /dev/vboxuser in VirtualBox guests.
svn path=/nixos/trunk/; revision=33372
2012-03-23 11:52:06 +00:00
Eelco Dolstra b46e911012 * Fix some references to dhclient.
svn path=/nixos/trunk/; revision=33359
2012-03-22 13:02:42 +00:00
Rob Vermaas a525074f43 increase size of virtualbox image
svn path=/nixos/trunk/; revision=33357
2012-03-22 12:58:45 +00:00
Eelco Dolstra 86d8d62d16 * Allow Upstart jobs to declare that they shouldn't be restarted by
switch-to-configuration.  E.g. the X server shouldn't be restarted
  because that kills all the X clients.

svn path=/nixos/trunk/; revision=33223
2012-03-18 02:10:39 +00:00
Eelco Dolstra 53bd25c7fa * Automatically start VBoxClient-all when the X session starts. This
allows seamless windows, resizing of the desktop, cut and paster,
  etc.

svn path=/nixos/trunk/; revision=33131
2012-03-16 01:29:51 +00:00
Eelco Dolstra 4adc99f9a5 * Enable the VirtualBox X11 display and mouse drivers.
svn path=/nixos/trunk/; revision=33130
2012-03-16 01:03:09 +00:00
Eelco Dolstra 974a74ad49 * enableWLAN -> wireless.enable.
svn path=/nixos/trunk/; revision=32788
2012-03-04 21:15:34 +00:00
Eelco Dolstra f55cf99c7c * Typo.
svn path=/nixos/trunk/; revision=32571
2012-02-26 00:12:04 +00:00
Eelco Dolstra 933ce8e9c8 * Module for building a VirtualBox disk image (.vdi). TODO: merge
this with the Amazon and Nova image builders.

svn path=/nixos/trunk/; revision=32570
2012-02-25 21:36:00 +00:00
Eelco Dolstra d9d6fb58e4 * Prevent the VirtualBox guest additions from being restarted
constantly by Upstart.  Also move the module to a better location.

svn path=/nixos/trunk/; revision=32565
2012-02-25 20:10:53 +00:00
Eelco Dolstra 8f8472d444 * Fix bad default.
svn path=/nixos/trunk/; revision=32525
2012-02-23 21:25:22 +00:00
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
Eelco Dolstra cda2e41c01 * Added a "xendomains" job to automatically start the domains defined
in /etc/xen/auto at boot time, to save all running domains during
  shutdown, and to restore all saved domains at boot time.

svn path=/nixos/trunk/; revision=24121
2010-10-06 16:07:16 +00:00
Eelco Dolstra 8b5fba4942 * Added a module that provides common configuration for DomU
machines.

svn path=/nixos/trunk/; revision=24084
2010-10-05 15:44:40 +00:00
Eelco Dolstra c5b39e70ef * Rename the xen module to xen-dom0.
svn path=/nixos/trunk/; revision=24078
2010-10-05 14:23:12 +00:00
Eelco Dolstra deca72f3cf * Xen (or rather QEMU) needs /dev/net/tun, so load the tap
module.

svn path=/nixos/trunk/; revision=23970
2010-09-27 16:32:42 +00:00
Eelco Dolstra 0442e7e82a * Add Xen's udev rules. This is necessary to get automatically
created block and network devices to work.

svn path=/nixos/trunk/; revision=23823
2010-09-16 15:24:46 +00:00
Eelco Dolstra 071b192c9d * Start dhclient after xend.
svn path=/nixos/trunk/; revision=23782
2010-09-14 11:58:06 +00:00
Eelco Dolstra 72d9235992 * Added an Upstart job for the Xen control daemon (xend).
svn path=/nixos/trunk/; revision=23781
2010-09-14 11:22:50 +00:00
Eelco Dolstra c4f910f550 * Substitute the path of the system derivation directly in the stage 2
init script.  This removes the need for the `systemConfig' boot
  parameter; `init=<stage-2-init>' is enough.  However, the GRUB menu
  builder still needs to add `systemConfig' to the kernel command line
  for compatibility with old configurations.

svn path=/nixos/trunk/; revision=23775
2010-09-13 22:10:25 +00:00
Eelco Dolstra f8f04aa756 * Fix the tests.
svn path=/nixos/trunk/; revision=23764
2010-09-13 16:02:54 +00:00
Eelco Dolstra f729f12e4e Some cleanups in the activation script:
* Moved some scriptlets to the appropriate modules.
* Put the scriptlet that sets the default path at the start, since it
  never makes sense not to have it there.  It no longer needs to be
  declared as a dependency.
* If a scriptlet has no dependencies, it can be denoted as a plain
  string (i.e., `noDepEntry' is not needed anymore).

svn path=/nixos/trunk/; revision=23762
2010-09-13 15:41:38 +00:00
Eelco Dolstra f99e42cfbc * Doh.
svn path=/nixos/trunk/; revision=23748
2010-09-13 13:43:53 +00:00
Eelco Dolstra c1295661c4 * Added a command `nixos-rebuild build-vm-with-bootloader'. This is
like `build-vm', but boots using the regular boot loader (i.e. GRUB
  1 or 2) rather than booting directly from the kernel/initrd.  Thus
  it allows testing of GRUB.

svn path=/nixos/trunk/; revision=23747
2010-09-13 12:34:58 +00:00
Eelco Dolstra e871e84159 * mkOverrideTemplate -> mkOverride.
svn path=/nixos/trunk/; revision=23743
2010-09-13 11:33:05 +00:00