summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2014-05-22 22:32:53 +0200
committerLudovic Courtès <ludo@gnu.org>2014-05-22 23:24:13 +0200
commitf19c6e5fe79c8bbd3c9ea25cd0380681bd99ce13 (patch)
tree39fd8a06221d3e86a8105bac61f71b2cdaaac9cf
parentc4a74364b9ddb5c34bce788d453f93aa307731dd (diff)
downloadpatches-f19c6e5fe79c8bbd3c9ea25cd0380681bd99ce13.tar
patches-f19c6e5fe79c8bbd3c9ea25cd0380681bd99ce13.tar.gz
vm: Use a para-virtualized disk when creating an image.
* guix/build/vm.scm (load-in-linux-vm): When MAKE-DISK-IMAGE?, use '-drive ...,if=virtio' for better performance. * gnu/system/vm.scm (qemu-image): Use /dev/vda instead of /dev/sda.
-rw-r--r--gnu/system/vm.scm2
-rw-r--r--guix/build/vm.scm3
2 files changed, 3 insertions, 2 deletions
diff --git a/gnu/system/vm.scm b/gnu/system/vm.scm
index 39ce5bb6ef..7d0ffd971e 100644
--- a/gnu/system/vm.scm
+++ b/gnu/system/vm.scm
@@ -236,7 +236,7 @@ the image."
(let ((graphs '#$(match inputs
(((names . _) ...)
names))))
- (initialize-hard-disk "/dev/sda"
+ (initialize-hard-disk "/dev/vda"
#:grub.cfg #$grub-configuration
#:closures graphs
#:copy-closures? #$copy-inputs?
diff --git a/guix/build/vm.scm b/guix/build/vm.scm
index 4de536abb4..e559542f0a 100644
--- a/guix/build/vm.scm
+++ b/guix/build/vm.scm
@@ -96,7 +96,8 @@ the #:references-graphs parameter of 'derivation'."
"-append" (string-append "console=ttyS0 --load="
builder)
(if make-disk-image?
- `("-hda" ,image-file)
+ `("-drive" ,(string-append "file=" image-file
+ ",if=virtio"))
'())))
(error "qemu failed" qemu))