From 7b307a21dd723507854ee18e458167d0fb9134fd Mon Sep 17 00:00:00 2001 From: Mathieu Othacehe Date: Mon, 4 Dec 2017 18:04:13 +0100 Subject: vm: Use qemu drive device parameter. * gnu/build/vm.scm (load-in-linux-vm): Use device parameter to define drive device. --- gnu/build/vm.scm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'gnu/build') 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 -- cgit v1.2.3