qemu: warn that network won't work with ui=none

The other day I spent way too long trying to find a regression that
caused network inside qemu not to work anymore, before I realized it was
caused by selecting UI=none instead of anything else.

Print a warning and link to a wiki page describing this in more detail.

Reviewed-by: Clayton Craft <clayton@craftyguy.net>
Link: https://lists.sr.ht/~postmarketos/pmbootstrap-devel/%3C20230226184546.6869-1-ollieparanoid@postmarketos.org%3E
This commit is contained in:
Oliver Smith 2023-02-26 19:45:46 +01:00
parent 162867a08c
commit f208bba4f2
No known key found for this signature in database
GPG Key ID: 5AE7F5513E0885CB
1 changed files with 5 additions and 1 deletions

View File

@ -340,7 +340,7 @@ def run(args):
logging.info("NOTE: Run 'pmbootstrap qemu --image-size 2G' to set"
" the rootfs size when you run out of space!")
# SSH/serial hints
# SSH/serial/network hints
logging.info("Connect to the VM:")
logging.info("* (ssh) ssh -p {port} {user}@localhost".format(**vars(args)))
logging.info("* (serial) in this console (stdout/stdin)")
@ -351,6 +351,10 @@ def run(args):
logging.info("NOTE: To quit QEMU with this option you can use "
"Ctrl-A, X.")
if args.ui == "none":
logging.warning("WARNING: With UI=none network doesn't work"
" automatically: https://postmarketos.org/qemu-network")
# Run QEMU and kill it together with pmbootstrap
process = None
try: