guix-commits
[Top][All Lists]
Advanced

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

06/14: services: hurd-vm: Check whether /dev/kvm exists at run time.


From: guix-commits
Subject: 06/14: services: hurd-vm: Check whether /dev/kvm exists at run time.
Date: Tue, 29 Sep 2020 06:03:43 -0400 (EDT)

civodul pushed a commit to branch wip-childhurd
in repository guix.

commit 31ae336b548bbe46f6f98accf8e9a390934a617b
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Sat Sep 26 22:45:01 2020 +0200

    services: hurd-vm: Check whether /dev/kvm exists at run time.
    
    This change allows a childhurd to run within Guix System in a VM.
    
    * gnu/services/virtualization.scm (hurd-vm-shepherd-service)[vm-command]:
    Stage the 'file-exists?' call.
---
 gnu/services/virtualization.scm | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/gnu/services/virtualization.scm b/gnu/services/virtualization.scm
index d184eea..b84203a 100644
--- a/gnu/services/virtualization.scm
+++ b/gnu/services/virtualization.scm
@@ -937,13 +937,14 @@ is added to the OS specified in CONFIG."
         (provisions  '(hurd-vm childhurd)))
 
     (define vm-command
-      #~(list
-         (string-append #$qemu "/bin/qemu-system-i386")
-         #$@(if (file-exists? "/dev/kvm") '("--enable-kvm") '())
-         "-m" (number->string #$memory-size)
-         #$@net-options
-         #$@options
-         "--hda" #+image))
+      #~(append (list #$(file-append qemu "/bin/qemu-system-i386")
+                      "-m" (number->string #$memory-size)
+                      #$@net-options
+                      #$@options
+                      "--hda" #+image)
+                (if (file-exists? "/dev/kvm")
+                    '("--enable-kvm")
+                    '())))
 
     (list
      (shepherd-service



reply via email to

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