~ruther/guix-local

810568b35f7e5a15f3c4420eee1163fe5274cf2c — Ludovic Courtès 11 years ago ccdca0a
vm: The 'run-vm' scripts now passes its arguments to QEMU.

* gnu/system/vm.scm (system-qemu-image/shared-store-script): Add "$@" at
  the end of the script.
  (common-qemu-options): Remove trailing newline.
* doc/guix.texi (Invoking guix system): Document it.
2 files changed, 4 insertions(+), 2 deletions(-)

M doc/guix.texi
M gnu/system/vm.scm
M doc/guix.texi => doc/guix.texi +1 -0
@@ 4148,6 4148,7 @@ This command also installs GRUB on the device specified in
@cindex virtual machine
Build a virtual machine that contain the operating system declared in
@var{file}, and return a script to run that virtual machine (VM).
Arguments given to the script are passed as is to QEMU.

The VM shares its store with the host system.


M gnu/system/vm.scm => gnu/system/vm.scm +3 -2
@@ 411,7 411,7 @@ bootloader refers to: OS kernel, initrd, bootloader data, etc."
  -serial stdio \
  -drive file=" #$image
  ",if=virtio,cache=writeback,werror=report,readonly \
  -m 256\n"))
  -m 256"))

(define* (system-qemu-image/shared-store-script os
                                                #:key


@@ 447,7 447,8 @@ exec " #$qemu "/bin/" #$(qemu-command (%current-system))
            -initrd " #$os-drv "/initrd \
            -append \"" #$(if graphic? "" "console=ttyS0 ")
            "--system=" #$os-drv " --load=" #$os-drv "/boot --root=/dev/vda1\" "))
#$(common-qemu-options image))
#$(common-qemu-options image)
" \"$@\"\n")
             port)
            (chmod port #o555))))