public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* [PATCH] start_vm: support SSH access to the machine in qemu
@ 2022-11-20 15:33 Uladzimir Bely
  2022-11-29 13:23 ` Anton Mikanovich
  0 siblings, 1 reply; 2+ messages in thread
From: Uladzimir Bely @ 2022-11-20 15:33 UTC (permalink / raw)
  To: isar-users

Map host port 22222 to guest port 22.

Use command `ssh -l <user> -p 22222 localhost` to connect.

Signed-off-by: Uladzimir Bely <ubely@ilbers.de>
---
Sometimes it's useful to have several terminals to check things under
machine that is run under qemu. SSH access is the good way to do it.

 testsuite/start_vm.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/testsuite/start_vm.py b/testsuite/start_vm.py
index f761a8bd..dbe70815 100755
--- a/testsuite/start_vm.py
+++ b/testsuite/start_vm.py
@@ -70,6 +70,10 @@ def format_qemu_cmdline(arch, build, distro, out, pid, enforce_pcbios=False):
         bios_idx = qemu_disk_args.index('-bios')
         del qemu_disk_args[bios_idx : bios_idx+2]
 
+    # Support SSH access from host via port 22222
+    extra_args.extend(['-device', 'e1000,netdev=net0'])
+    extra_args.extend(['-netdev', 'user,id=net0,hostfwd=tcp::22222-:22'])
+
     cmd = ['qemu-system-' + qemu_arch, '-m', '1024M']
 
     if qemu_machine:
-- 
2.20.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] start_vm: support SSH access to the machine in qemu
  2022-11-20 15:33 [PATCH] start_vm: support SSH access to the machine in qemu Uladzimir Bely
@ 2022-11-29 13:23 ` Anton Mikanovich
  0 siblings, 0 replies; 2+ messages in thread
From: Anton Mikanovich @ 2022-11-29 13:23 UTC (permalink / raw)
  To: Uladzimir Bely, isar-users

20.11.2022 18:33, Uladzimir Bely wrote:
> Map host port 22222 to guest port 22.
>
> Use command `ssh -l <user> -p 22222 localhost` to connect.
>
> Signed-off-by: Uladzimir Bely <ubely@ilbers.de>

Applied to next, thanks.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-11-29 13:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-20 15:33 [PATCH] start_vm: support SSH access to the machine in qemu Uladzimir Bely
2022-11-29 13:23 ` Anton Mikanovich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox