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>.
This commit is contained in:
parent
0c75a4de49
commit
eb152070f1
|
@ -709,6 +709,8 @@ it is mostly useful when FULL-BOOT? is true."
|
||||||
(default #f))
|
(default #f))
|
||||||
(memory-size virtual-machine-memory-size ;integer (MiB)
|
(memory-size virtual-machine-memory-size ;integer (MiB)
|
||||||
(default 256))
|
(default 256))
|
||||||
|
(disk-image-size virtual-machine-disk-image-size ;integer (bytes)
|
||||||
|
(default 'guess))
|
||||||
(port-forwardings virtual-machine-port-forwardings ;list of integer pairs
|
(port-forwardings virtual-machine-port-forwardings ;list of integer pairs
|
||||||
(default '())))
|
(default '())))
|
||||||
|
|
||||||
|
@ -737,12 +739,15 @@ FORWARDINGS is a list of host-port/guest-port pairs."
|
||||||
system target)
|
system target)
|
||||||
;; XXX: SYSTEM and TARGET are ignored.
|
;; XXX: SYSTEM and TARGET are ignored.
|
||||||
(match vm
|
(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
|
(system-qemu-image/shared-store-script os
|
||||||
#:qemu qemu
|
#:qemu qemu
|
||||||
#:graphic? graphic?
|
#:graphic? graphic?
|
||||||
#:memory-size memory-size))
|
#:memory-size memory-size
|
||||||
(($ <virtual-machine> os qemu graphic? memory-size forwardings)
|
#:disk-image-size
|
||||||
|
disk-image-size))
|
||||||
|
(($ <virtual-machine> os qemu graphic? memory-size disk-image-size
|
||||||
|
forwardings)
|
||||||
(let ((options
|
(let ((options
|
||||||
`("-net" ,(string-append
|
`("-net" ,(string-append
|
||||||
"user,"
|
"user,"
|
||||||
|
@ -751,6 +756,8 @@ FORWARDINGS is a list of host-port/guest-port pairs."
|
||||||
#:qemu qemu
|
#:qemu qemu
|
||||||
#:graphic? graphic?
|
#:graphic? graphic?
|
||||||
#:memory-size memory-size
|
#:memory-size memory-size
|
||||||
|
#:disk-image-size
|
||||||
|
disk-image-size
|
||||||
#:options options)))))
|
#:options options)))))
|
||||||
|
|
||||||
;;; vm.scm ends here
|
;;; vm.scm ends here
|
||||||
|
|
Loading…
Reference in New Issue