diff options
author | Graham Christensen <graham@grahamc.com> | 2018-02-07 17:43:34 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-07 17:43:34 -0500 |
commit | 7fb90db6960832cf16fa806d6e59fc6ab3cd0456 (patch) | |
tree | 23b5e27936d9303974ead0484cd1a7b0901934ca | |
parent | dc8975215406b255de7926bf41098151192f73ce (diff) | |
parent | 0525e823929dd9116aaba9f194ef629c83f80d81 (diff) | |
download | nixlib-7fb90db6960832cf16fa806d6e59fc6ab3cd0456.tar nixlib-7fb90db6960832cf16fa806d6e59fc6ab3cd0456.tar.gz nixlib-7fb90db6960832cf16fa806d6e59fc6ab3cd0456.tar.bz2 nixlib-7fb90db6960832cf16fa806d6e59fc6ab3cd0456.tar.lz nixlib-7fb90db6960832cf16fa806d6e59fc6ab3cd0456.tar.xz nixlib-7fb90db6960832cf16fa806d6e59fc6ab3cd0456.tar.zst nixlib-7fb90db6960832cf16fa806d6e59fc6ab3cd0456.zip |
Merge pull request #34710 from markus1189/doc-vm-login
docs: Explain how to login into built vm
-rw-r--r-- | nixos/doc/manual/installation/changing-config.xml | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/nixos/doc/manual/installation/changing-config.xml b/nixos/doc/manual/installation/changing-config.xml index 75df307a1b7c..4db9020b9606 100644 --- a/nixos/doc/manual/installation/changing-config.xml +++ b/nixos/doc/manual/installation/changing-config.xml @@ -70,9 +70,21 @@ $ ./result/bin/run-*-vm </screen> 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): +user accounts and home directories will not be available unless you +have set <literal>mutableUsers = false</literal>. Another way is to +temporarily add the following to your configuration: + +<screen> +users.extraUsers.your-user.initialPassword = "test" +</screen> + +<emphasis>Important:</emphasis> delete the $hostname.qcow2 file if you +have started the virtual machine at least once without the right +users, otherwise the changes will not get picked up. + +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 |