Merge pull request #263658 from siriobalmelli-foss/sb/zfs-image
openstack-image-zfs and make-single-disk-zfs-image: optionally specify qemu instance memory
This commit is contained in:
commit
f520eb3f0c
2 changed files with 11 additions and 2 deletions
|
@ -21,6 +21,9 @@
|
|||
, # size of the FAT partition, in megabytes.
|
||||
bootSize ? 1024
|
||||
|
||||
, # memory allocated for virtualized build instance
|
||||
memSize ? 1024
|
||||
|
||||
, # The size of the root partition, in megabytes.
|
||||
rootSize ? 2048
|
||||
|
||||
|
@ -230,7 +233,7 @@ let
|
|||
).runInLinuxVM (
|
||||
pkgs.runCommand name
|
||||
{
|
||||
memSize = 1024;
|
||||
inherit memSize;
|
||||
QEMU_OPTS = "-drive file=$rootDiskImage,if=virtio,cache=unsafe,werror=report";
|
||||
preVM = ''
|
||||
PATH=$PATH:${pkgs.qemu_kvm}/bin
|
||||
|
|
|
@ -20,6 +20,12 @@ in
|
|||
default = "nixos-openstack-image-${config.system.nixos.label}-${pkgs.stdenv.hostPlatform.system}";
|
||||
};
|
||||
|
||||
ramMB = mkOption {
|
||||
type = types.int;
|
||||
default = 1024;
|
||||
description = lib.mdDoc "RAM allocation for build VM";
|
||||
};
|
||||
|
||||
sizeMB = mkOption {
|
||||
type = types.int;
|
||||
default = 8192;
|
||||
|
@ -64,7 +70,7 @@ in
|
|||
includeChannel = copyChannel;
|
||||
|
||||
bootSize = 1000;
|
||||
|
||||
memSize = cfg.ramMB;
|
||||
rootSize = cfg.sizeMB;
|
||||
rootPoolProperties = {
|
||||
ashift = 12;
|
||||
|
|
Loading…
Reference in a new issue