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.
This commit is contained in:
Ludovic Courtès 2020-09-26 22:45:01 +02:00
parent 118b6dbb46
commit 8ac318068b
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5

View File

@ -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