Commit graph

132 commits

Author SHA1 Message Date
Eelco Dolstra cb728f833f svn path=/nixos/trunk/; revision=19624 2010-01-22 21:07:06 +00:00
Eelco Dolstra 9094ecb546 * Some hacks to get the image to work with newer EC2 kernels/initrds.
svn path=/nixos/trunk/; revision=19622
2010-01-22 20:22:40 +00:00
Eelco Dolstra 12a0a68749 * Initialise the Nix database in the VM.
* Set the hostname at startup.
* Mount the ephemeral data disk (/dev/sda2).


svn path=/nixos/trunk/; revision=19619
2010-01-22 17:31:23 +00:00
Eelco Dolstra 3e3448a7df * Added an Upstart job to fetch the SSH key for logging into the root
account of the VM.  However, it doesn't work yet (the machine
  doesn't boot properly and there is no console output).  So use a
  hard-coded password for now (very dangerous!).

svn path=/nixos/trunk/; revision=19589
2010-01-21 08:03:58 +00:00
Eelco Dolstra 590acc193c * A module for generating a disk image suitable for use with Amazon's
Elastic Compute Cloud (EC2).  TODO: run ec2-bundle-image here.

svn path=/nixos/trunk/; revision=19580
2010-01-20 18:10:02 +00:00
Eelco Dolstra 79add5ecbc * Make the Nix store in the guest writable.
svn path=/nixos/trunk/; revision=19326
2010-01-10 01:20:30 +00:00
Eelco Dolstra 13878cb78d * Panic on out-of-memory.
svn path=/nixos/trunk/; revision=19200
2010-01-04 09:51:57 +00:00
Lluís Batlle i Rossell 79073c7b3d Adding a virtualisation option: run qemu without graphics.
svn path=/nixos/trunk/; revision=18978
2009-12-15 18:49:34 +00:00
Eelco Dolstra 6c9059e717 * Added an option `boot.initrd.availableKernelModules' that specifies
modules that should be added to the initrd, but should only be
  loaded on demand (e.g. by the kernel or by udev).  This is
  especially useful in the installation CD, where we now only load the
  modules needed by the hardware.
* Enable automatic modprobing by udev in the initrd.

svn path=/nixos/trunk/; revision=18975
2009-12-15 16:38:20 +00:00
Eelco Dolstra a612fd0d5e * Obsoleted boot.initrd.extraKernelModules (use
boot.initrd.kernelModules instead).

svn path=/nixos/trunk/; revision=18969
2009-12-15 14:05:01 +00:00
Rob Vermaas 1dfab1d7ea * virtualisation.memorySize option to set memory size of virtual machine
svn path=/nixos/trunk/; revision=18933
2009-12-14 11:15:37 +00:00
Eelco Dolstra d545d08461 * In the network-interfaces task, emit an ip-up event if there is a
statically configured interface (i.e. we're not running dhclient).
  Otherwise the ntpd job won't be triggered.
* Use the "-n" flag of "initctl emit" to send the event
  asynchronously.

svn path=/nixos/branches/upstart-0.6/; revision=18227
2009-11-06 21:38:40 +00:00
Eelco Dolstra 3fcb7c2cb5 * Set the nameserver.
svn path=/nixos/branches/upstart-0.6/; revision=18218
2009-11-06 19:19:46 +00:00
Eelco Dolstra 3e9665dd96 * X server autoconfiguration. Rather than specifying a fixed video
driver (in services.xserver.videoDriver), the X server is now given
  a set of drivers, and will use PCI ids to find the right one.

  The only problem is that the choice of OpenGL driver (the
  /var/run/opengl-driver symlink) depends on what driver is selected
  at runtime (i.e. the NVIDIA implementation for "nvidia", and Mesa
  for all other drivers).  However this isn't a big problem right now
  since "nvidia" isn't included in the default set of drivers anyway
  for legal reasons.
  
* `services.xserver.resolutions' now defaults to [], meaning that the
  X server should figure out the desired resolution(s) itself.
  Likewise, `services.xserver.defaultDepth' defaults to 0 to let the X
  server figure it out.

* Removed some options from xorg.conf that no longer appear needed
  ("Composite" and the DRI "Mode").

svn path=/nixos/trunk/; revision=18176
2009-11-06 00:59:03 +00:00
Eelco Dolstra 22693ae44e * Disable wireless in a VM to prevent wpa_supplicant from flooding the
log.

svn path=/nixos/trunk/; revision=17010
2009-09-10 14:43:11 +00:00
Eelco Dolstra 685335df2f * system.build.system -> system.build.toplevel, since the former name
is just too weird.

svn path=/nixos/trunk/; revision=16954
2009-09-04 09:29:18 +00:00
Eelco Dolstra 6723473421 * Give some more memory to the VMs.
svn path=/nixos/trunk/; revision=16939
2009-09-02 18:33:38 +00:00
Eelco Dolstra 7f8272dd70 * Make the host filesystem writable for non-root. This is a temporary
hack to enable non-root processes to write coverage data.

svn path=/nixos/trunk/; revision=16891
2009-08-29 14:14:42 +00:00
Eelco Dolstra ff146aee08 svn path=/nixos/trunk/; revision=16843 2009-08-24 22:09:19 +00:00
Eelco Dolstra 44fb2e4ecd * Allow adding additional kernel parameters.
svn path=/nixos/trunk/; revision=16792
2009-08-20 23:20:19 +00:00
Eelco Dolstra fe329f96ef * Mount the host's /nix/var/nix/db in the guest.
svn path=/nixos/trunk/; revision=16674
2009-08-11 14:28:25 +00:00
Eelco Dolstra f666aa7479 * With "nixos-rebuild build-vm", override the video driver of
the host (since e.g. "nvidia" won't work in the VM).

svn path=/nixos/trunk/; revision=16663
2009-08-11 02:02:01 +00:00
Eelco Dolstra 89ef5c979b * New nixos-rebuild action: "nixos-rebuild build-vm" builds a virtual
machine containing a replica (minus the state) of the system
  configuration.  This is mostly useful for testing configuration
  changes prior to doing an actual "nixos-rebuild switch" (or even
  "nixos-rebuild test").  The VM can be started as follows:

  $ nixos-rebuild build-vm
  $ ./result/bin/run-*-vm

  which starts a KVM/QEMU instance.  Additional QEMU options can be
  passed through the QEMU_OPTS environment variable
  (e.g. QEMU_OPTS="-redir tcp:8080::80" to forward a host port to the
  guest).  The fileSystem attribute of the regular system
  configuration is ignored (using mkOverride), because obviously we
  can't allow the VM to access the host's block devices.  Instead, at
  startup the VM creates an empty disk image in ./<hostname>.qcow2 to
  store the VM's root filesystem.

  Building a VM in this way is efficient because the VM shares its Nix
  store with the host (through a CIFS mount).  However, because the
  Nix store of the host is mounted read-only in the guest, you cannot
  run Nix build actions inside the VM.  Therefore the VM can only be
  reconfigured by re-running "nixos-rebuild build-vm" on the host and
  restarting the VM.

svn path=/nixos/trunk/; revision=16662
2009-08-11 01:35:56 +00:00
Eelco Dolstra 02c119a104 * Workaround for hangs on x86_64.
svn path=/nixos/branches/modular-nixos/; revision=16590
2009-08-05 11:43:51 +00:00
Eelco Dolstra 7d3e2b15ef svn path=/nixos/branches/modular-nixos/; revision=16585 2009-08-04 16:09:07 +00:00
Eelco Dolstra f53c9d70ec * The lack of a newline at the end of "EnableSendFile Off" caused a
broken httpd.conf to be generated.  We should really have a merge
  function that appends newlines to every value of options like
  services.httpd.extraConfig.

svn path=/nixos/branches/modular-nixos/; revision=16404
2009-07-16 16:13:35 +00:00
Eelco Dolstra aa075f089e * Set the default gateway.
svn path=/nixos/branches/modular-nixos/; revision=16034
2009-06-24 12:16:06 +00:00
Eelco Dolstra 64d8af9677 svn path=/nixos/branches/modular-nixos/; revision=16024 2009-06-22 14:45:28 +00:00
Eelco Dolstra da77a6437f * qemu-vm.nix: automatically create and initialise the disk image if
it doesn't already exist.  Also set up some ad hoc port forwarding
  from the host to the guest.

svn path=/nixos/branches/modular-nixos/; revision=16012
2009-06-19 15:19:56 +00:00
Eelco Dolstra aa60f3e9a7 * sendfile() is broken over CIFS.
svn path=/nixos/branches/modular-nixos/; revision=16011
2009-06-19 14:30:56 +00:00
Eelco Dolstra 9460a30851 * Use the fileSystems option to mount the host filesystem. Also, it
seems that mount.cifs isn't actually needed (anymore?).

svn path=/nixos/branches/modular-nixos/; revision=16000
2009-06-18 16:47:00 +00:00
Eelco Dolstra 8179e5213f * A module for building KVM/QEMU virtual machines from a NixOS
configuration.  No virtual disk image is generated; the VM shares a
  Nix store with the host.  This makes it very fast to build new VMs.

svn path=/nixos/branches/modular-nixos/; revision=15999
2009-06-18 16:16:12 +00:00