mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-23 19:19:20 -05:00
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:
parent
118b6dbb46
commit
8ac318068b
1 changed files with 8 additions and 7 deletions
|
@ -937,13 +937,14 @@ (define (hurd-vm-shepherd-service config)
|
||||||
(provisions '(hurd-vm childhurd)))
|
(provisions '(hurd-vm childhurd)))
|
||||||
|
|
||||||
(define vm-command
|
(define vm-command
|
||||||
#~(list
|
#~(append (list #$(file-append qemu "/bin/qemu-system-i386")
|
||||||
(string-append #$qemu "/bin/qemu-system-i386")
|
"-m" (number->string #$memory-size)
|
||||||
#$@(if (file-exists? "/dev/kvm") '("--enable-kvm") '())
|
#$@net-options
|
||||||
"-m" (number->string #$memory-size)
|
#$@options
|
||||||
#$@net-options
|
"--hda" #+image)
|
||||||
#$@options
|
(if (file-exists? "/dev/kvm")
|
||||||
"--hda" #+image))
|
'("--enable-kvm")
|
||||||
|
'())))
|
||||||
|
|
||||||
(list
|
(list
|
||||||
(shepherd-service
|
(shepherd-service
|
||||||
|
|
Loading…
Reference in a new issue