bhyve Cannot type into bhyve OpenBSD guest (ie. not keyboard input)

ikevin8me

Active Member

Reaction score: 12
Messages: 198

I'm trying to install/configure OpenBSD bhyve guests, by following these instructions.
Host OS: FreeBSD 13
Guest OS: OpenBSD 6.9

First, when I connect to the VM using VNC, I notice that it actually uses a different console. The text which are output the KDE Konsole terminal console is different from the VNC display. On further examination, the VNC console say "ttyC0" while terminal console says "tty00". And, obviously, the contents of the consoles are not the same.

The real problem is the VNC console is I can't type into (ie. no keyboard input). Please help!

(Note: On the contrary to the FreeBSD 13 guest which is started from more or less the same bhyve command parameters, the console contents are synchronized.)
 
OP
I

ikevin8me

Active Member

Reaction score: 12
Messages: 198

[SOLVED]

OK. This is what I have found out:

To run OpenBSD purely as a console guest:
(accessible from console Terminal only, no intention to use graphical apps in the guest)
- do NOT include "-s 29,fbuf,tcp=0.0.0.0:5900,w=800,h=600,vga=off,wait"
- but instead type in "set tty com0" at the boot prompt IMMEDIATELY when the guest OpenBSD is booted.

To run OpenBSD accessible from VNC:
- include the framebuffer option "-s 29,fbuf,tcp=0.0.0.0:5900,w=800,h=600,vga=off,wait" on the first initial install, and all subsequent bootups.
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 12,744
Messages: 39,332

Don't know how OpenBSD does it but for FreeBSD you can set console="comconsole,vidconsole" in /boot/loader.conf to enable both serial and video consoles. I'm sure OpenBSD has something similar.
 

sko

Aspiring Daemon

Reaction score: 421
Messages: 728

Usually with OpenBSD you can directly use the serial console without any additional configuration or workarounds like VNC.
I'm running several OpenBSD installs in bhyve (on smartOS though) and never used anything but the native bhyve serial console. IIRC you only have to make sure to confirm the question about console output to serial (one of the very first questions during installation) or manually add set tty com0 to /etc/boot.conf.
 

kpedersen

Son of Beastie

Reaction score: 2,169
Messages: 3,007

I don't know if it is related but when I boot OpenBSD on the Raspberry Pi via UEFI (https://github.com/pftf/RPi3) I get the VGA tty terminal but the keyboard doesn't work. I assumed it was a power deficiency of the Pi and OpenBSD's slightly less mature power management for that platform. However perhaps there is an issue with UEFI and keyboard on OpenBSD (Though many of my Thinkpads work fine).

Unfortunately Bhyve doesn't have a "legacy" BIOS mode (as far as I know).

How is it if you install OpenBSD via the standard serial? When you then boot it graphically, does the keyboard still not work?

Another option which I find slightly easier for graphical support is VirtualBox. We have it in ports.
 

Zirias

Son of Beastie

Reaction score: 1,702
Messages: 2,870

It does seem to say "expired" due to the fragile design of Python. But that doesn't really mean much in the grand scheme of things.
This python issue should be a wakeup call. At the very least, it lead to "double standards" in FreeBSD ports, sorting them in "important" and "not-so-important" ports. It's also a lesson in conscious decisions. Many projects seem to use python as part of their build system, and build systems are nothing you want to actively maintain, you want to focus on the code providing the actual features. A language introducing breaking changes is a bad choice for a build system.
 

Zirias

Son of Beastie

Reaction score: 1,702
Messages: 2,870

Zirias, what do you think about the lua in the loader ?
Nothing, actually. Whether Lua or Forth, it's part of the system, plus the loader is an actual feature and not just part of a build system. I don't expect any maintenance problems there, so why not just use what you think is best for the job…
 
Top