Manual: Port forwarding to VMs
This commit is contained in:
parent
f92a5cbfc6
commit
1e89c720e2
@ -369,9 +369,23 @@ $ nixos-rebuild build-vm
|
|||||||
$ ./result/bin/run-*-vm
|
$ ./result/bin/run-*-vm
|
||||||
</screen>
|
</screen>
|
||||||
|
|
||||||
The VM does not have use any data from your host system, so your
|
The VM does not have any data from your host system, so your existing
|
||||||
existing user accounts and home directories will not be
|
user accounts and home directories will not be available. You can
|
||||||
available.</para>
|
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>
|
</section>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user