mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-24 21:38:07 -05:00
guix system: Reduce size of image produced for 'vm' action.
This reduces the size of the image produced by 'guix system vm' from 26 MiB to 9 MiB. * gnu/system/vm.scm (system-qemu-image/shared-store): (system-qemu-image/shared-store-script): Change the default value of #:disk-image-size to 30 MiB when not FULL-BOOT?. * guix/scripts/system.scm (system-derivation-for-action): Likewise for the 'vm' action.
This commit is contained in:
parent
99a0044614
commit
4c0416ae17
2 changed files with 6 additions and 3 deletions
|
@ -425,7 +425,7 @@ (define* (system-qemu-image/shared-store
|
||||||
os
|
os
|
||||||
#:key
|
#:key
|
||||||
full-boot?
|
full-boot?
|
||||||
(disk-image-size (* (if full-boot? 500 15) (expt 2 20))))
|
(disk-image-size (* (if full-boot? 500 30) (expt 2 20))))
|
||||||
"Return a derivation that builds a QEMU image of OS that shares its store
|
"Return a derivation that builds a QEMU image of OS that shares its store
|
||||||
with the host.
|
with the host.
|
||||||
|
|
||||||
|
@ -480,7 +480,7 @@ (define* (system-qemu-image/shared-store-script os
|
||||||
(mappings '())
|
(mappings '())
|
||||||
full-boot?
|
full-boot?
|
||||||
(disk-image-size
|
(disk-image-size
|
||||||
(* (if full-boot? 500 15)
|
(* (if full-boot? 500 30)
|
||||||
(expt 2 20))))
|
(expt 2 20))))
|
||||||
"Return a derivation that builds a script to run a virtual machine image of
|
"Return a derivation that builds a script to run a virtual machine image of
|
||||||
OS that shares its store with the host.
|
OS that shares its store with the host.
|
||||||
|
|
|
@ -477,7 +477,10 @@ (define* (system-derivation-for-action os action
|
||||||
((vm)
|
((vm)
|
||||||
(system-qemu-image/shared-store-script os
|
(system-qemu-image/shared-store-script os
|
||||||
#:full-boot? full-boot?
|
#:full-boot? full-boot?
|
||||||
#:disk-image-size image-size
|
#:disk-image-size
|
||||||
|
(if full-boot?
|
||||||
|
image-size
|
||||||
|
(* 30 (expt 2 20)))
|
||||||
#:mappings mappings))
|
#:mappings mappings))
|
||||||
((disk-image)
|
((disk-image)
|
||||||
(system-disk-image os #:disk-image-size image-size))))
|
(system-disk-image os #:disk-image-size image-size))))
|
||||||
|
|
Loading…
Reference in a new issue