Update documentation about SSH debugging for ferrochrome
Bug: 349966953
Test: Preview custom_vm.md
Change-Id: I394394fd6802610576b33016db9827e2ac7a62c5
diff --git a/docs/custom_vm.md b/docs/custom_vm.md
index d99452c..13ee620 100644
--- a/docs/custom_vm.md
+++ b/docs/custom_vm.md
@@ -232,18 +232,6 @@
$ adb shell pm clear com.google.android.virtualization.vmlauncher
```
-### Inside guest OS (for ChromiumOS only)
-
-Go to the network setting and configure as below.
-
-* IP: 192.168.1.2 (other addresses in the 192.168.1.0/24 subnet also works)
-* netmask: 255.255.255.0
-* gateway: 192.168.1.1
-* DNS: 8.8.8.8 (or any DNS server you know)
-
-These settings are persistent; stored in chromiumos_test_image.bin. So you
-don’t have to repeat this next time.
-
### Debugging
To open the serial console (interactive terminal):
@@ -263,9 +251,16 @@
$ adb shell 'su root tail +0 -F /data/user/$(am get-current-user)/com{,.google}.android.virtualization.vmlauncher/files/console.log'
```
-For ChromiumOS, you can ssh-in. Use following commands after network setup.
+For ChromiumOS, you can enter to the console via SSH connection. Check your IP
+address of ChromiumOS VM from the ethernet network setting page and follow
+commands below.
```shell
-$ adb kill-server ; adb start-server; adb forward tcp:9222 tcp:9222
+$ adb kill-server ; adb start-server
+$ adb shell nc -s localhost -L -p 9222 nc ${CHROMIUMOS_IPV4_ADDR} 22 # This command won't be terminated.
+$ adb forward tcp:9222 tcp:9222
$ ssh -oProxyCommand=none -o UserKnownHostsFile=/dev/null root@localhost -p 9222
```
+
+For ChromiumOS, you would need to login after enthering its console.
+The user ID and the password is `root` and `test0000` respectively.