From: Oliver Dixon <ash@suugaku.co.uk>
To: Gentoo Users <gentoo-user@lists.gentoo.org>
Subject: [gentoo-user] QEMU -nographic Option with OVMF
Date: Mon, 24 May 2021 02:01:15 +0100 [thread overview]
Message-ID: <20210524010115.dnp6lolmpfp55fzh@ad-gentoo-main> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 1850 bytes --]
Hi,
I decided to bite the bullet yesterday and switch from clunky, and generally
untoward, VirtualBox to QEMU/KVM for developing kernel modules. I have a working
Gentoo VM with all the bells and whistles I need/want (UEFI booting, NIC
passthrough, SSH forwarding, NFSv4 support, etc.), but it's running in an SDL
window, which means the guest TTY will become confused and pretty much unusable
whenever I change the window size. (Which is rather often since I use a tiling
window manager.)
Since I'll only be using the TTY, the '-nographic' option to QEMU seems
appropriate, but this causes the initial bootloader screen (OVMF/EDK-II) and
GRUB to hang on stdout (screenshot attached). Here's my QEMU invocation script:
#!/bin/bash
exec qemu-system-x86_64 \
-enable-kvm \
-cpu host \
-drive file=Gentoo-VM.img,if=virtio \
-nic user,hostfwd=tcp:127.0.0.1:2222-:22 \
-m 4G \
-smp 12 \
-name "Gentoo VM" \
-bios /usr/share/edk2-ovmf/OVMF_CODE.fd \
-nographic \
$@
I have to spawn another terminal to kill the QEMU process. I can make a bit of
progress by telling the kernel to direct early messages to ttyS0, which does
display the early bootup messages from Linux, but then hangs just before a login
prompt would be shown (screenshot attached).
console=tty0 console=ttyS0,9600n8
Again, I can't do anything other than a `pkill qemu` from elsewhere.
Any ideas from someone more familiar with QEMU hosting Linux guests? I've only
been using it for a day, most of which has been trying to fix this annoying
behaviour.
Cheers.
--
Oliver Dixon
suugaku.co.uk
FD40 39CD
FDEB E22D
B265 6DFD
A9C4 3889
4CA9 3AEC
[-- Attachment #1.2: linux-hang.png --]
[-- Type: image/png, Size: 73838 bytes --]
[-- Attachment #1.3: grub-hang.png --]
[-- Type: image/png, Size: 6494 bytes --]
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next reply other threads:[~2021-05-24 1:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-24 1:01 Oliver Dixon [this message]
2021-05-24 10:52 ` [gentoo-user] QEMU -nographic Option with OVMF Michael
2021-06-05 12:51 ` Nils Freydank
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210524010115.dnp6lolmpfp55fzh@ad-gentoo-main \
--to=ash@suugaku.co.uk \
--cc=gentoo-user@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox