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 -The VM does not have use any data from your host system, so your -existing user accounts and home directories will not be -available. +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): + + +$ QEMU_NET_OPTS="hostfwd=tcp::2222-:22" ./result/bin/run-*-vm + + +allowing you to log in via SSH (assuming you have set the appropriate +passwords or SSH authorized keys): + + +$ ssh -p 2222 localhost + + +