diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2013-11-07 12:26:38 +0100 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2013-11-07 12:28:45 +0100 |
commit | 1e89c720e26a9443ce78cde227901da0e3a09598 (patch) | |
tree | 41a2dc1181caccc8e374c53242cfd55a62ebed2d /nixos | |
parent | f92a5cbfc61fe0778af7137afa6ae3cd79470180 (diff) | |
download | nixlib-1e89c720e26a9443ce78cde227901da0e3a09598.tar nixlib-1e89c720e26a9443ce78cde227901da0e3a09598.tar.gz nixlib-1e89c720e26a9443ce78cde227901da0e3a09598.tar.bz2 nixlib-1e89c720e26a9443ce78cde227901da0e3a09598.tar.lz nixlib-1e89c720e26a9443ce78cde227901da0e3a09598.tar.xz nixlib-1e89c720e26a9443ce78cde227901da0e3a09598.tar.zst nixlib-1e89c720e26a9443ce78cde227901da0e3a09598.zip |
Manual: Port forwarding to VMs
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/doc/manual/installation.xml | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/nixos/doc/manual/installation.xml b/nixos/doc/manual/installation.xml index 88ef589dd06a..70001577692e 100644 --- a/nixos/doc/manual/installation.xml +++ b/nixos/doc/manual/installation.xml @@ -369,9 +369,23 @@ $ nixos-rebuild build-vm $ ./result/bin/run-*-vm </screen> -The VM does not have use any data from your host system, so your -existing user accounts and home directories will not be -available.</para> +The VM does not have any data from your host system, so your existing +user accounts and home directories will not be available. You can +forward ports on the host to the guest. For instance, the following +will forward host port 2222 to guest port 22 (SSH): + +<screen> +$ QEMU_NET_OPTS="hostfwd=tcp::2222-:22" ./result/bin/run-*-vm +</screen> + +allowing you to log in via SSH (assuming you have set the appropriate +passwords or SSH authorized keys): + +<screen> +$ ssh -p 2222 localhost +</screen> + +</para> </section> |