Bug 252768

Summary: bhyve UEFI com1,stdio console doubles as unsupported MSR logging console
Product: Base System Reporter: Michael Dexter <editor>
Component: bhyveAssignee: freebsd-virtualization (Nobody) <virtualization>
Status: Closed Works As Intended    
Severity: Affects Some People CC: afedorov
Priority: ---    
Version: CURRENT   
Hardware: amd64   
OS: Any   

Description Michael Dexter 2021-01-17 09:34:23 UTC
If a bhyve UEFI-booted guest is launched with a com1,stdio console, that console is useful as a system console on the VM, and in the case of Windows Server, the SAC management console.

Unfortunately, the com1,stdio console receives various error reporting from bhyve, including keyboard/mouse and "rdmsr to register" notifications.

Workaround: Use an nmdm or pty console device

Desirable solution: Proper bhyve logging to a mechanism such as one or more log files or syslog.
Comment 1 Aleksandr Fedorov freebsd_committer freebsd_triage 2021-01-18 18:19:50 UTC
I'm not sure if this is a bug. Bhyve, as a usual utility, displays the stderr on the terminal. Therefore, you can simply redirect stderr output to a file.

# bhyve ... -l com1,stdio ... 2>vmerr.log
# cat vmerr.log 
rdmsr to register 0x4e on vcpu 0
rdmsr to register 0x34 on vcpu 0
wrmsr to register 0xc8f(0) on vcpu 0
Unhandled ps2 mouse command 0xe1
Unhandled ps2 mouse command 0x88
Unhandled ps2 keyboard command 0xf6
Comment 2 Michael Dexter 2021-01-18 19:35:07 UTC
That workaround is preferable to every suggestion to date.
I don't know if grehan@ requested a ticket for another reason but I will mark this as resolved.