me
/
guix
Archived
1
0
Fork 0

vm: Use qemu drive device parameter.

* gnu/build/vm.scm (load-in-linux-vm): Use device parameter to define drive
  device.
master
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)
(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