diff options
author | Marius Bakke <mbakke@fastmail.com> | 2016-11-30 18:24:32 +0100 |
---|---|---|
committer | Marius Bakke <mbakke@fastmail.com> | 2016-11-30 18:24:32 +0100 |
commit | 8a7cbc882a75d7f9f1fe960552dea47acf347b0a (patch) | |
tree | ded8c9116d357b38fd23b8c0cc312863fe68c9b5 /gnu/build/vm.scm | |
parent | 3084a9908434e4e7123d2fd3881c798977abedb9 (diff) | |
parent | 72f0c5ea3c0272a93436ad3c04a281d1237a9593 (diff) | |
download | guix-8a7cbc882a75d7f9f1fe960552dea47acf347b0a.tar.gz |
Merge branch 'master' into staging
Diffstat (limited to 'gnu/build/vm.scm')
-rw-r--r-- | gnu/build/vm.scm | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/gnu/build/vm.scm b/gnu/build/vm.scm index cc5cf45362..60ee18ebe0 100644 --- a/gnu/build/vm.scm +++ b/gnu/build/vm.scm @@ -79,12 +79,9 @@ it via /dev/hda. REFERENCES-GRAPHS can specify a list of reference-graph files as produced by the #:references-graphs parameter of 'derivation'." - (define image-file - (string-append "image." disk-image-format)) - (when make-disk-image? (unless (zero? (system* "qemu-img" "create" "-f" disk-image-format - image-file + output (number->string disk-image-size))) (error "qemu-img failed"))) @@ -115,7 +112,7 @@ the #:references-graphs parameter of 'derivation'." builder) (append (if make-disk-image? - `("-drive" ,(string-append "file=" image-file + `("-drive" ,(string-append "file=" output ",if=virtio")) '()) ;; Only enable kvm if we see /dev/kvm exists. @@ -126,11 +123,10 @@ the #:references-graphs parameter of 'derivation'." '())))) (error "qemu failed" qemu)) - (if make-disk-image? - (copy-file image-file output) - (begin - (mkdir output) - (copy-recursively "xchg" output)))) + ;; When MAKE-DISK-IMAGE? is true, the image is in OUTPUT already. + (unless make-disk-image? + (mkdir output) + (copy-recursively "xchg" output))) ;;; |