diff options
author | Ludovic Courtès <ludo@gnu.org> | 2020-09-26 22:45:01 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2020-09-29 21:56:26 +0200 |
commit | 8ac318068b22b34fbee9980e607020f45a5b549e (patch) | |
tree | 05c0b3ff9377b05f6b5fae26b914ec596f761e7b /gnu | |
parent | 118b6dbb46ff3376db7467301fe59673c042d220 (diff) | |
download | guix-8ac318068b22b34fbee9980e607020f45a5b549e.tar.gz |
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.
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/services/virtualization.scm | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/gnu/services/virtualization.scm b/gnu/services/virtualization.scm index d184eea746..b84203ad18 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 |