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.
This commit is contained in:
Ludovic Courtès 2014-05-22 22:32:53 +02:00
parent c4a74364b9
commit f19c6e5fe7
2 changed files with 3 additions and 2 deletions

View file

@ -236,7 +236,7 @@ (define* (qemu-image #:key
(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?

View file

@ -96,7 +96,8 @@ (define image-file
"-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))