diff options
| author | Ludovic Courtès <ludo@gnu.org> | 2014-04-09 13:47:57 +0200 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2014-04-09 14:01:31 +0200 |
| commit | defa1b9bee7038a9fa3517f608589c991169a77c (patch) | |
| tree | c7de6ee30fde4064a0842aad91a8934624ab8736 | |
| parent | 4d9a80ba759cc69bba6806e0417ded4068628751 (diff) | |
vm: Add #:memory-size parameter for 'expression->derivation-in-linux-vm'.
* gnu/system/vm.scm (expression->derivation-in-linux-vm): Add
#:memory-size parameter, defaulting to 256 (QEMU defaults to 128.)
| -rw-r--r-- | gnu/system/vm.scm | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gnu/system/vm.scm b/gnu/system/vm.scm index 6ed183634f6..ba4c7607c91 100644 --- a/gnu/system/vm.scm +++ b/gnu/system/vm.scm | |||
| @@ -78,12 +78,14 @@ | |||
| 78 | 78 | ||
| 79 | (make-disk-image? #f) | 79 | (make-disk-image? #f) |
| 80 | (references-graphs #f) | 80 | (references-graphs #f) |
| 81 | (memory-size 256) | ||
| 81 | (disk-image-size | 82 | (disk-image-size |
| 82 | (* 100 (expt 2 20)))) | 83 | (* 100 (expt 2 20)))) |
| 83 | "Evaluate EXP in a QEMU virtual machine running LINUX with INITRD (a | 84 | "Evaluate EXP in a QEMU virtual machine running LINUX with INITRD (a |
| 84 | derivation). In the virtual machine, EXP has access to all of INPUTS from the | 85 | derivation). In the virtual machine, EXP has access to all of INPUTS from the |
| 85 | store; it should put its output files in the `/xchg' directory, which is | 86 | store; it should put its output files in the `/xchg' directory, which is |
| 86 | copied to the derivation's output when the VM terminates. | 87 | copied to the derivation's output when the VM terminates. The virtual machine |
| 88 | runs with MEMORY-SIZE MiB of memory. | ||
| 87 | 89 | ||
| 88 | When MAKE-DISK-IMAGE? is true, then create a QEMU disk image of | 90 | When MAKE-DISK-IMAGE? is true, then create a QEMU disk image of |
| 89 | DISK-IMAGE-SIZE bytes and return it. | 91 | DISK-IMAGE-SIZE bytes and return it. |
| @@ -157,6 +159,7 @@ made available under the /xchg CIFS share." | |||
| 157 | 159 | ||
| 158 | (and (zero? | 160 | (and (zero? |
| 159 | (system* qemu "-enable-kvm" "-nographic" "-no-reboot" | 161 | (system* qemu "-enable-kvm" "-nographic" "-no-reboot" |
| 162 | "-m" ,(number->string memory-size) | ||
| 160 | "-net" "nic,model=virtio" | 163 | "-net" "nic,model=virtio" |
| 161 | "-virtfs" | 164 | "-virtfs" |
| 162 | ,(string-append "local,id=store_dev,path=" (%store-prefix) | 165 | ,(string-append "local,id=store_dev,path=" (%store-prefix) |
