From 72d9235992deb21169a1001f823c93627adc2f96 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 14 Sep 2010 11:22:50 +0000 Subject: [PATCH] * Added an Upstart job for the Xen control daemon (xend). svn path=/nixos/trunk/; revision=23781 --- modules/virtualisation/xen.nix | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/modules/virtualisation/xen.nix b/modules/virtualisation/xen.nix index f0ac5944e42a..b4e6a07e6ed5 100644 --- a/modules/virtualisation/xen.nix +++ b/modules/virtualisation/xen.nix @@ -57,6 +57,8 @@ let cfg = config.virtualisation.xen; in # Domain 0 requires a pvops-enabled kernel. boot.kernelPackages = pkgs.linuxPackages_2_6_32_xen; + boot.kernelModules = [ "xen_evtchn" "xen_gntdev" ]; + # The radeonfb kernel module causes the screen to go black as soon # as it's loaded, so don't load it. boot.blacklistedKernelModules = [ "radeonfb" ]; @@ -80,6 +82,21 @@ let cfg = config.virtualisation.xen; in fi ''; + jobs.xend = + { description = "Xen control daemon"; + + startOn = "stopped udevtrigger"; + + path = + [ pkgs.bridge_utils pkgs.gawk pkgs.iproute pkgs.nettools + pkgs.utillinux pkgs.bash pkgs.xen pkgs.pciutils pkgs.procps + ]; + + preStart = "${pkgs.xen}/sbin/xend start"; + + postStop = "${pkgs.xen}/sbin/xend stop"; + }; + }; }