aboutsummaryrefslogtreecommitdiff
path: root/gnu/build
diff options
context:
space:
mode:
authorMathieu Othacehe <m.othacehe@gmail.com>2017-12-04 18:04:13 +0100
committerMathieu Othacehe <m.othacehe@gmail.com>2017-12-13 11:30:04 +0100
commit7b307a21dd723507854ee18e458167d0fb9134fd (patch)
tree1e8bb851400b7faf0dad4963cd7cd37112363245 /gnu/build
parent91b21ba9f712bce033b717422c3d2022ffe8a70a (diff)
downloadpatches-7b307a21dd723507854ee18e458167d0fb9134fd.tar
patches-7b307a21dd723507854ee18e458167d0fb9134fd.tar.gz
vm: Use qemu drive device parameter.
* gnu/build/vm.scm (load-in-linux-vm): Use device parameter to define drive device.
Diffstat (limited to 'gnu/build')
-rw-r--r--gnu/build/vm.scm6
1 files changed, 4 insertions, 2 deletions
diff --git a/gnu/build/vm.scm b/gnu/build/vm.scm
index 20ee12709b..ed84463677 100644
--- a/gnu/build/vm.scm
+++ b/gnu/build/vm.scm
@@ -127,8 +127,10 @@ the #:references-graphs parameter of 'derivation'."
builder)
(append
(if make-disk-image?
- `("-drive" ,(string-append "file=" output
- ",if=virtio"))
+ `("-device" "virtio-blk,drive=myhd"
+ "-drive" ,(string-append "if=none,file=" output
+ ",format=" disk-image-format
+ ",id=myhd"))
'())
;; Only enable kvm if we see /dev/kvm exists.
;; This allows users without hardware virtualization to still