vm: Use qemu drive device parameter.

* gnu/build/vm.scm (load-in-linux-vm): Use device parameter to define drive
  device.
This commit is contained in:
Mathieu Othacehe 2017-12-04 18:04:13 +01:00
parent 91b21ba9f7
commit 7b307a21dd
No known key found for this signature in database
GPG Key ID: 8354763531769CA6
1 changed files with 4 additions and 2 deletions

View File

@ -127,8 +127,10 @@ the #:references-graphs parameter of 'derivation'."
builder) builder)
(append (append
(if make-disk-image? (if make-disk-image?
`("-drive" ,(string-append "file=" output `("-device" "virtio-blk,drive=myhd"
",if=virtio")) "-drive" ,(string-append "if=none,file=" output
",format=" disk-image-format
",id=myhd"))
'()) '())
;; Only enable kvm if we see /dev/kvm exists. ;; Only enable kvm if we see /dev/kvm exists.
;; This allows users without hardware virtualization to still ;; This allows users without hardware virtualization to still