mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-12 04:35:41 +03:00
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.
|
, # size of the FAT partition, in megabytes.
|
||||||
bootSize ? 1024
|
bootSize ? 1024
|
||||||
|
|
||||||
|
, # memory allocated for virtualized build instance
|
||||||
|
memSize ? 1024
|
||||||
|
|
||||||
, # The size of the root partition, in megabytes.
|
, # The size of the root partition, in megabytes.
|
||||||
rootSize ? 2048
|
rootSize ? 2048
|
||||||
|
|
||||||
|
@ -230,7 +233,7 @@ let
|
||||||
).runInLinuxVM (
|
).runInLinuxVM (
|
||||||
pkgs.runCommand name
|
pkgs.runCommand name
|
||||||
{
|
{
|
||||||
memSize = 1024;
|
inherit memSize;
|
||||||
QEMU_OPTS = "-drive file=$rootDiskImage,if=virtio,cache=unsafe,werror=report";
|
QEMU_OPTS = "-drive file=$rootDiskImage,if=virtio,cache=unsafe,werror=report";
|
||||||
preVM = ''
|
preVM = ''
|
||||||
PATH=$PATH:${pkgs.qemu_kvm}/bin
|
PATH=$PATH:${pkgs.qemu_kvm}/bin
|
||||||
|
|
|
@ -20,6 +20,12 @@ in
|
||||||
default = "nixos-openstack-image-${config.system.nixos.label}-${pkgs.stdenv.hostPlatform.system}";
|
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 {
|
sizeMB = mkOption {
|
||||||
type = types.int;
|
type = types.int;
|
||||||
default = 8192;
|
default = 8192;
|
||||||
|
@ -64,7 +70,7 @@ in
|
||||||
includeChannel = copyChannel;
|
includeChannel = copyChannel;
|
||||||
|
|
||||||
bootSize = 1000;
|
bootSize = 1000;
|
||||||
|
memSize = cfg.ramMB;
|
||||||
rootSize = cfg.sizeMB;
|
rootSize = cfg.sizeMB;
|
||||||
rootPoolProperties = {
|
rootPoolProperties = {
|
||||||
ashift = 12;
|
ashift = 12;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue