From 0525e823929dd9116aaba9f194ef629c83f80d81 Mon Sep 17 00:00:00 2001 From: Markus Hauck Date: Wed, 7 Feb 2018 20:01:13 +0100 Subject: docs: Explain how to login into built vm --- nixos/doc/manual/installation/changing-config.xml | 18 +++++++++++++++--- 1 file 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 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 mutableUsers = false. Another way is to +temporarily add the following to your configuration: + + +users.extraUsers.your-user.initialPassword = "test" + + +Important: 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): $ QEMU_NET_OPTS="hostfwd=tcp::2222-:22" ./result/bin/run-*-vm -- cgit 1.4.1