pmb.qemu: drop telnet port forwarding (!1886)

Now that we try to use the IP assigned by QEMU via DHCP,
the debug-shell is no longer working via telnet.
This is because the VM does not have any IP assigned when it is running.

We would need to start a DHCP client from the initfs to make it work.
busybox provides both udhcpc (client) and udhcpd (server) so this is
not a big problem. But the question is: Is it worth it?

The debug-shell will be only used for debugging, and NetworkManager
handles starting a proper DHCP client once the rootfs is mounted.
Meanwhile the debug-shell can be also accessed via serial output/input,
(available in the pmbootstrap stdout/stdin). So overall it does not
seem worth the effort. Let's just recommend using serial instead.
This commit is contained in:
Minecrell 2020-03-06 12:22:46 +01:00 committed by Oliver Smith
parent 79a8d04835
commit 81b3aade07
No known key found for this signature in database
GPG Key ID: 5AE7F5513E0885CB
1 changed files with 3 additions and 6 deletions

View File

@ -76,7 +76,6 @@ def command_qemu(args, arch, img_path):
logging.debug("Kernel cmdline: " + cmdline)
port_ssh = str(args.port)
port_telnet = str(args.port + 1)
suffix = "rootfs_" + args.device
rootfs = args.work + "/chroot_" + suffix
@ -119,7 +118,6 @@ def command_qemu(args, arch, img_path):
command += ["-netdev",
"user,id=net0,"
"hostfwd=tcp::" + port_ssh + "-:22,"
"hostfwd=tcp::" + port_telnet + "-:23"
]
command += ["-show-cursor"]
@ -246,11 +244,10 @@ def run(args):
logging.info("NOTE: Run 'pmbootstrap qemu --image-size 2G' to set"
" the rootfs size when you run out of space!")
# SSH/telnet hints
logging.info("Connect to the VM (telnet requires 'pmbootstrap initfs"
" hook_add debug-shell'):")
# SSH/serial hints
logging.info("Connect to the VM:")
logging.info("* (ssh) ssh -p {port} {user}@localhost".format(**vars(args)))
logging.info("* (telnet) telnet localhost " + str(args.port + 1))
logging.info("* (serial) in this console (stdout/stdin)")
# Run QEMU and kill it together with pmbootstrap
process = None