guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/01: vm: Use qemu drive device parameter.


From: Mathieu Othacehe
Subject: 01/01: vm: Use qemu drive device parameter.
Date: Wed, 13 Dec 2017 05:30:47 -0500 (EST)

mothacehe pushed a commit to branch master
in repository guix.

commit 7b307a21dd723507854ee18e458167d0fb9134fd
Author: Mathieu Othacehe <address@hidden>
Date:   Mon Dec 4 18:04:13 2017 +0100

    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(-)

diff --git a/gnu/build/vm.scm b/gnu/build/vm.scm
index 20ee127..ed84463 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]