vm: allow overriding QEMU_OPTS / memSize for images.
It's nice to be able to create disk images with -smp 4 in qemu.
This commit is contained in:
parent
36aa19b105
commit
635c99ce87
|
@ -414,12 +414,12 @@ rec {
|
||||||
fillDiskWithRPMs =
|
fillDiskWithRPMs =
|
||||||
{ size ? 4096, rpms, name, fullName, preInstall ? "", postInstall ? ""
|
{ size ? 4096, rpms, name, fullName, preInstall ? "", postInstall ? ""
|
||||||
, runScripts ? true, createRootFS ? defaultCreateRootFS
|
, runScripts ? true, createRootFS ? defaultCreateRootFS
|
||||||
|
, QEMU_OPTS ? "", memSize ? 512
|
||||||
, unifiedSystemDir ? false
|
, unifiedSystemDir ? false
|
||||||
}:
|
}:
|
||||||
|
|
||||||
runInLinuxVM (stdenv.mkDerivation {
|
runInLinuxVM (stdenv.mkDerivation {
|
||||||
inherit name preInstall postInstall rpms;
|
inherit name preInstall postInstall rpms QEMU_OPTS memSize;
|
||||||
memSize = 512;
|
|
||||||
preVM = createEmptyImage {inherit size fullName;};
|
preVM = createEmptyImage {inherit size fullName;};
|
||||||
|
|
||||||
buildCommand = ''
|
buildCommand = ''
|
||||||
|
@ -685,10 +685,11 @@ rec {
|
||||||
, packages, extraPackages ? []
|
, packages, extraPackages ? []
|
||||||
, preInstall ? "", postInstall ? "", archs ? ["noarch" "i386"]
|
, preInstall ? "", postInstall ? "", archs ? ["noarch" "i386"]
|
||||||
, runScripts ? true, createRootFS ? defaultCreateRootFS
|
, runScripts ? true, createRootFS ? defaultCreateRootFS
|
||||||
|
, QEMU_OPTS ? "", memSize ? 512
|
||||||
, unifiedSystemDir ? false }:
|
, unifiedSystemDir ? false }:
|
||||||
|
|
||||||
fillDiskWithRPMs {
|
fillDiskWithRPMs {
|
||||||
inherit name fullName size preInstall postInstall runScripts createRootFS unifiedSystemDir;
|
inherit name fullName size preInstall postInstall runScripts createRootFS unifiedSystemDir QEMU_OPTS memSize;
|
||||||
rpms = import (rpmClosureGenerator {
|
rpms = import (rpmClosureGenerator {
|
||||||
inherit name packagesLists urlPrefixes archs;
|
inherit name packagesLists urlPrefixes archs;
|
||||||
packages = packages ++ extraPackages;
|
packages = packages ++ extraPackages;
|
||||||
|
|
Loading…
Reference in New Issue