Commit graph

100 commits

Author SHA1 Message Date
Eelco Dolstra 6620a0f679 Fix the installer tests
E.g. http://hydra.nixos.org/build/5561399
2013-07-17 13:01:12 +02:00
Mathijs Kwik 769b74c463 nixos-vm: switch to qemu for disk images too :) 2013-07-07 22:25:45 +02:00
Eelco Dolstra c8fca8c8fc NixOS VM tests: Use 9p instead of CIFS 2013-07-05 17:24:49 +02:00
Eelco Dolstra 84bb988256 Fix VM test booting with kernels <= 3.9 2013-07-02 17:10:22 +02:00
aszlig aba54edf48
qemu-vm: Add option to create empty disk images.
This allows to add additional raw disk images to the VM, which therein are
available as /dev/vdb, /dev/vdc, /dev/vde and so on. Especially when testing
partitioning, this could be useful.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2013-06-28 04:24:23 +02:00
Eelco Dolstra 202340e3f6 nixos-rebuild build-vm: Override filesystems defined in the normal config 2013-02-18 15:39:47 +01:00
Eelco Dolstra 7a382679e4 Revert 434260c772
There is a bug in unionfs, but it only manifested itself because of
our accidental use of stage-1 libraries in stage-2.
2013-01-23 14:46:54 +01:00
Eelco Dolstra ef5108f560 Fix registering valid paths in VM tests
Commit 37b56574e2 revealed that the code
to get regInfo from /proc/cmdline was broken.  It only happened to
work because the kernel passes the command line to stage 1 through the
environment, so $regInfo was set anyway.
2013-01-23 14:35:52 +01:00
Eelco Dolstra 434260c772 Work around a bug in unionfs
Unionfs cannot delete directories that contain open deleted files.
This broke a Nix test.

http://hydra.nixos.org/build/3843354
2013-01-22 18:18:05 +01:00
Eelco Dolstra fc14a31f2c unionfs: Increase the open file limit
The default (1024) is way too low, e.g. to start KDE on the
installation CD.
2013-01-22 13:31:08 +01:00
Shea Levy 75ec5c609e Merge remote-tracking branch 'upstream/master' into systemd
Conflicts:
	maintainers/scripts/ec2/create-ebs-amis.py
2012-12-17 13:03:56 -05:00
Shea Levy d19c223ba6 Simplify unionfs-chroot bind-mounting 2012-12-16 13:07:42 -05:00
Shea Levy e34024d998 Refactor common unionfs-fuse initrd prep into a separate module 2012-12-16 12:33:36 -05:00
Lluís Batlle i Rossell 3e734ba695 Qemu says 'boot=on' is deprecated, so I try a half-fix here
I change the 'build-vm' to use '-boot menu=on', so a menu displays and allows
choosing the 2nd hd. Otherwise, I don't know how to boot from a 2nd hd.
2012-12-16 18:07:13 +01:00
Shea Levy 3eb0faf317 qemu-vm: Use unionfs-fuse instead of aufs for writableStore 2012-12-16 11:56:49 -05:00
Eelco Dolstra 458f36f5f1 Turn fileSystems into an attribute set
So now you can write

  fileSystems =
    [ { mountPoint = "/";
        device = "/dev/sda1";
      }
    ];

as

  fileSystems."/".device = "/dev/sda1";
2012-11-02 18:02:12 +01:00
Eelco Dolstra 4764848314 Remove some obsolete options 2012-10-29 21:10:00 +01:00
Eelco Dolstra 1c53b2e299 Don't flush addresses unless necessary
Flushing is bad if the Nix store is on a remote filesystem accessed
over that interface.

http://hydra.nixos.org/build/3184162

Also added a interface option ‘prefixLength’ as a better alternative
to ‘subnetMask’.
2012-10-11 15:36:52 -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
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 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 9dadfc3541 * Mark QEMU VMs as NixOS machines.
svn path=/nixos/trunk/; revision=34217
2012-05-23 15:40:31 +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 974a74ad49 * enableWLAN -> wireless.enable.
svn path=/nixos/trunk/; revision=32788
2012-03-04 21:15:34 +00:00
Eelco Dolstra 3e30d87c26 * aufs2 -> aufs.
svn path=/nixos/trunk/; revision=30323
2011-11-08 15:12:11 +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
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
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 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 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 e0fef9c333 * Drop the unnecessary boot=on flag.
svn path=/nixos/trunk/; revision=26103
2011-02-24 21:47:56 +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
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