diff options
author | Christopher Baines <mail@cbaines.net> | 2017-09-28 18:57:18 +0100 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2017-10-04 07:16:43 +0100 |
commit | eb152070f1598769390a294e6d33f902b2d7be2b (patch) | |
tree | 717cdb8a191d10d6f73ef13291794478960b5941 /gnu/system | |
parent | 0c75a4de497991912af0e4d252b90c283e162e5d (diff) | |
download | guix-eb152070f1598769390a294e6d33f902b2d7be2b.tar guix-eb152070f1598769390a294e6d33f902b2d7be2b.tar.gz |
vm: Add disk-image-size to <virtual-machine>.
* gnu/system/vm.scm (<virtual-machine>): Add disk-image-size.
(port-forwardings->qemu-options): Use disk-image-size from
<virtual-machine>.
Diffstat (limited to 'gnu/system')
-rw-r--r-- | gnu/system/vm.scm | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/gnu/system/vm.scm b/gnu/system/vm.scm index d340a8563f..273a895bef 100644 --- a/gnu/system/vm.scm +++ b/gnu/system/vm.scm @@ -709,6 +709,8 @@ it is mostly useful when FULL-BOOT? is true." (default #f)) (memory-size virtual-machine-memory-size ;integer (MiB) (default 256)) + (disk-image-size virtual-machine-disk-image-size ;integer (bytes) + (default 'guess)) (port-forwardings virtual-machine-port-forwardings ;list of integer pairs (default '()))) @@ -737,12 +739,15 @@ FORWARDINGS is a list of host-port/guest-port pairs." system target) ;; XXX: SYSTEM and TARGET are ignored. (match vm - (($ <virtual-machine> os qemu graphic? memory-size ()) + (($ <virtual-machine> os qemu graphic? memory-size disk-image-size ()) (system-qemu-image/shared-store-script os #:qemu qemu #:graphic? graphic? - #:memory-size memory-size)) - (($ <virtual-machine> os qemu graphic? memory-size forwardings) + #:memory-size memory-size + #:disk-image-size + disk-image-size)) + (($ <virtual-machine> os qemu graphic? memory-size disk-image-size + forwardings) (let ((options `("-net" ,(string-append "user," @@ -751,6 +756,8 @@ FORWARDINGS is a list of host-port/guest-port pairs." #:qemu qemu #:graphic? graphic? #:memory-size memory-size + #:disk-image-size + disk-image-size #:options options))))) ;;; vm.scm ends here |