From 1d971b7a9f75333ace1f0e9c792a3f3c23221e8c Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Giraudeau Date: Tue, 17 Apr 2018 16:04:04 +0200 Subject: [PATCH 1/2] azure-agent: add option to control auto mount of resource disk. --- nixos/modules/virtualisation/azure-agent.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/nixos/modules/virtualisation/azure-agent.nix b/nixos/modules/virtualisation/azure-agent.nix index 201d5f71ba34..e300f78241b7 100644 --- a/nixos/modules/virtualisation/azure-agent.nix +++ b/nixos/modules/virtualisation/azure-agent.nix @@ -66,6 +66,10 @@ in default = false; description = "Whether to enable verbose logging."; }; + mountResourceDisk = mkOption { + default = true; + description = "Whether the agent should format (ext4) and mount the resource disk to /mnt/resource."; + }; }; ###### implementation @@ -112,7 +116,7 @@ in Provisioning.ExecuteCustomData=n # Format if unformatted. If 'n', resource disk will not be mounted. - ResourceDisk.Format=y + ResourceDisk.Format=${if cfg.mountResourceDisk then "y" else "n"} # File system on the resource disk # Typically ext3 or ext4. FreeBSD images should use 'ufs2' here. From 28e352cff827f24d662de14c9c820d7746941689 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Giraudeau Date: Tue, 17 Apr 2018 16:26:04 +0200 Subject: [PATCH 2/2] azure-agent: add bash to service path. as is often required by linux extensions. --- nixos/modules/virtualisation/azure-agent.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/virtualisation/azure-agent.nix b/nixos/modules/virtualisation/azure-agent.nix index e300f78241b7..b7ab54aab7ec 100644 --- a/nixos/modules/virtualisation/azure-agent.nix +++ b/nixos/modules/virtualisation/azure-agent.nix @@ -185,7 +185,7 @@ in after = [ "network-online.target" "sshd.service" ]; wants = [ "network-online.target" ]; - path = [ pkgs.e2fsprogs ]; + path = [ pkgs.e2fsprogs pkgs.bash ]; description = "Windows Azure Agent Service"; unitConfig.ConditionPathExists = "/etc/waagent.conf"; serviceConfig = {