diff options
author | Ludovic Courtès <ludo@gnu.org> | 2014-11-21 00:02:26 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2014-11-21 00:02:26 +0100 |
commit | 0276f697b3dbab417dcad7ff32dfb4b9fb330ec4 (patch) | |
tree | 8902cdb6da9e43887d5db92ef6424b16bb05b7f0 /doc/guix.texi | |
parent | fcf63cf880cf260601f4bda763e80e5ddd527d62 (diff) | |
download | gnu-guix-0276f697b3dbab417dcad7ff32dfb4b9fb330ec4.tar gnu-guix-0276f697b3dbab417dcad7ff32dfb4b9fb330ec4.tar.gz |
guix system: Add '--share' and '--expose' options for 'vm'.
* guix/scripts/system.scm (system-derivation-for-action): Add #:mappings
parameter. Pass it to 'system-qemu-image/shared-store-script'.
(perform-action): Likewise.
(show-help): Document --share and --expose.
(specification->file-system-mapping): New procedure.
(%options): Add --share and --expose.
(guix-system): Pass #:mapping to 'perform-action'.
* doc/guix.texi (Invoking guix system): Document it.
Diffstat (limited to 'doc/guix.texi')
-rw-r--r-- | doc/guix.texi | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/doc/guix.texi b/doc/guix.texi index 730b6a3770..569790065f 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -4375,12 +4375,27 @@ This command also installs GRUB on the device specified in @item vm @cindex virtual machine +@cindex VM 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. +Additional file systems can be shared between the host and the VM using +the @code{--share} and @code{--expose} command-line options: the former +specifies a directory to be shared with write access, while the latter +provides read-only access to the shared directory. + +The example below creates a VM in which the user's home directory is +accessible read-only, and where the @file{/exchange} directory is a +read-write mapping of the host's @file{$HOME/tmp}: + +@example +guix system vm my-config.scm \ + --expose=$HOME --share=$HOME/tmp=/exchange +@end example + On GNU/Linux, the default is to boot directly to the kernel; this has the advantage of requiring only a very tiny root disk image since the host's store can then be mounted. |