summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorLeo Famulari <leo@famulari.name>2016-10-29 21:44:39 -0400
committerLeo Famulari <leo@famulari.name>2016-10-29 21:44:44 -0400
commit062c7e43ed306c66f1107ee3bd52357aa8daf11a (patch)
treef620ea2436a9809d7e4113fa3c9704c5f7892c8e /doc
parentf4fe6c991cbac609be327ad8ed793c5b1b91aac8 (diff)
parent269d9172ff037bd41bee3777166b3bc14d93f745 (diff)
downloadpatches-062c7e43ed306c66f1107ee3bd52357aa8daf11a.tar
patches-062c7e43ed306c66f1107ee3bd52357aa8daf11a.tar.gz
Merge branch 'master' into core-updates
Diffstat (limited to 'doc')
-rw-r--r--doc/guix.texi56
1 files changed, 55 insertions, 1 deletions
diff --git a/doc/guix.texi b/doc/guix.texi
index 35ab66c005..9df49185ad 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -4791,7 +4791,9 @@ The general syntax is:
guix hash @var{option} @var{file}
@end example
-@command{guix hash} has the following options:
+When @var{file} is @code{-} (a hyphen), @command{guix hash} computes the
+hash of data read from standard input. @command{guix hash} has the
+following options:
@table @code
@@ -12240,6 +12242,58 @@ which may be insufficient for some operations.
The file name of the qcow2 image.
@end table
+The default @command{run-vm.sh} script that is returned by an invokation of
+@command{guix system vm} does not add a @command{-net user} flag by default.
+To get network access from within the vm add the @code{(dhcp-client-service)}
+to your system definition and start the VM using
+@command{`guix system vm config.scm` -net user}. An important caveat of using
+@command{-net user} for networking is that @command{ping} will not work, because
+it uses the ICMP protocol. You'll have to use a different command to check for
+network connectivity, like for example @command{curl}.
+
+@subsubsection Connecting Through SSH
+
+To enable SSH inside a VM you need to add a SSH server like @code{(dropbear-service)}
+or @code{(lsh-service)} to your VM. The @code{(lsh-service}) doesn't currently
+boot unsupervised. It requires you to type some characters to initialize the
+randomness generator. In addition you need to forward the SSH port, 22 by
+default, to the host. You can do this with
+
+@example
+`guix system vm config.scm` -net user,hostfwd=tcp::10022-:22
+@end example
+
+To connect to the VM you can run
+
+@example
+ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 10022
+@end example
+
+The @command{-p} tells @command{ssh} the port you want to connect to.
+@command{-o UserKnownHostsFile=/dev/null} prevents @command{ssh} from complaining
+every time you modify your @command{config.scm} file and the
+@command{-o StrictHostKeyChecking=no} prevents you from having to allow a
+connection to an unknown host every time you connect.
+
+@subsubsection Using @command{virt-viewer} with Spice
+
+As an alternative to the default @command{qemu} graphical client you can
+use the @command{remote-viewer} from the @command{virt-viewer} package. To
+connect pass the @command{-spice port=5930,disable-ticketing} flag to
+@command{qemu}. See previous section for further information on how to do this.
+
+Spice also allows you to do some nice stuff like share your clipboard with your
+VM. To enable that you'll also have to pass the following flags to @command{qemu}:
+
+@example
+-device virtio-serial-pci,id=virtio-serial0,max_ports=16,bus=pci.0,addr=0x5
+-chardev spicevmc,name=vdagent,id=vdagent
+-device virtserialport,nr=1,bus=virtio-serial0.0,chardev=vdagent,
+name=com.redhat.spice.0
+@end example
+
+You'll also need to add the @pxref{Miscellaneous Services, Spice service}.
+
@node Defining Services
@subsection Defining Services