]> git.ipfire.org Git - thirdparty/hostap.git/commit - tests/hwsim/vm/vm-run.sh
tests: Optionally start telnet server inside VMs
authorJohannes Berg <johannes.berg@intel.com>
Tue, 5 Feb 2019 11:26:58 +0000 (12:26 +0100)
committerJouni Malinen <j@w1.fi>
Tue, 5 Feb 2019 12:26:36 +0000 (14:26 +0200)
commite33951100744961a90d0999599e78d1109a199b4
treef9b5224574fc79bdf357ee4f18096f19051626f8
parentb0797ec9558e8e76ac77a4eacfd4585cc6f7b3ea
tests: Optionally start telnet server inside VMs

If telnetd is installed and --telnet <port> is passed on the
vm-run.sh command line, start a telnet server (directly connected
to bash, no login) inside the VM(s) to be able to look into them
when something is wrong. Use a user network in qemu with a single
host forward from the specified port for this, listening only on
'localhost'.

Please note that this provides unauthenticated access to the guest
system from anything that can open a TCP connection on the host system.
The guess system does have access to reading all files on the host that
the user account running kvm has access to (and even write access if the
default ROTAG ,readonly parameter is cleared). In other words, this
option should not be used on any multiuser systems where kvm is run
under user accounts that are not dedicated for testing purposes (i.e.,
do not have access to any files that should not be readable to
everyone).

This needs CONFIG_VIRTIO_NET=y in the guest kernel.

For parallel-vm.py, the --telnet argument specifies the base port
and each VM index (0, 1, ...) is added to it.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
tests/hwsim/vm/inside.sh
tests/hwsim/vm/parallel-vm.py
tests/hwsim/vm/vm-run.sh