@@ -171,6 +171,7 @@ let
172 makeInstallerTest = name:
172 makeInstallerTest = name:
173 { createPartitions, preBootCommands ? "", extraConfig ? ""
173 { createPartitions, preBootCommands ? "", extraConfig ? ""
174+ , extraInstallerConfig ? {}
174 , bootLoader ? "grub" # either "grub" or "systemd-boot"
175 , bootLoader ? "grub" # either "grub" or "systemd-boot"
175 , grubVersion ? 2, grubDevice ? "/dev/vda", grubIdentifier ? "uuid"
176 , grubVersion ? 2, grubDevice ? "/dev/vda", grubIdentifier ? "uuid"
176 , enableOCR ? false, meta ? {}
177 , enableOCR ? false, meta ? {}
@@ -192,6 +193,7 @@ let
192 { imports =
193 { imports =
193 [ ../modules/profiles/installation-device.nix
194 [ ../modules/profiles/installation-device.nix
194 ../modules/profiles/base.nix
195 ../modules/profiles/base.nix
196+ extraInstallerConfig
197 virtualisation.diskSize = 8 * 1024;
199 virtualisation.diskSize = 8 * 1024;
@@ -332,6 +334,43 @@ in {
337+ # zfs on / with swap
338+ zfsroot = makeInstallerTest "zfs-root"
340+ extraInstallerConfig = {
341+ boot.supportedFilesystems = [ "zfs" ];
345+ boot.supportedFilesystems = [ "zfs" ];
347+ # Using by-uuid overrides the default of by-id, and is unique
348+ # to the qemu disks, as they don't produce by-id paths for
350+ boot.zfs.devNodes = "/dev/disk/by-uuid/";
351+ networking.hostId = "00000000";
357+ "parted /dev/vda mklabel msdos",
358+ "parted /dev/vda -- mkpart primary linux-swap 1M 1024M",
359+ "parted /dev/vda -- mkpart primary 1024M -1s",
362+ "mkswap /dev/vda1 -L swap",
365+ "zpool create rpool /dev/vda2",
366+ "zfs create -o mountpoint=legacy rpool/root",
367+ "mount -t zfs rpool/root /mnt",
335 # Create two physical LVM partitions combined into one volume group
374 # Create two physical LVM partitions combined into one volume group
336 # that contains the logical swap and root partitions.
375 # that contains the logical swap and root partitions.
337 lvm = makeInstallerTest "lvm"
376 lvm = makeInstallerTest "lvm"