Bug 221712

Summary: bhyve can not open virtual console
Product: Base System Reporter: Dmitry Lukhtionov <dmitryluhtionov>
Component: kernAssignee: freebsd-virtualization (Nobody) <virtualization>
Status: New ---    
Severity: Affects Only Me    
Priority: ---    
Version: 11.1-STABLE   
Hardware: amd64   
OS: Any   

Description Dmitry Lukhtionov 2017-08-22 10:49:27 UTC
I am run this command

sh /usr/share/examples/bhyve/vmrun.sh -c 4 -m 8G -t tap0 -C /dev/nmdm0A -e autoboot_delay=1 -d ./base.img base &

And connect to console with cu -l /dev/nmdm0B
and see

atkbdc0: <Keyboard controller (i8042)> port 0x60,0x64 irq 1 on acpi0
atkbd0: <AT Keyboard> irq 1 on atkbdc0
kbd0 at atkbd0
atkbd0: [GIANT-LOCKED]
driver bug: Unable to set devclass (class: atkbdc devname: (unknown))
Unhandled ps2 mouse command 0xe1
                                psm0: <PS/2 Mouse> irq 12 on atkbdc0
psm0: [GIANT-LOCKED]
psm0: model Generic PS/2 mouse, device ID 0
uart0: <16550 or compatible> port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0
uart0: console (9600,n,8,1)
uart1: <16550 or compatible>

after 15 second

port 0x2f8-0x2ff irq

and after 15 second

3 on acpi0

and other lines appears after more time

In host machine I run `top` and see, bhyve eating 100% cpu


If I run bhyve with `stdio` console - all run fine
Comment 1 Dmitry Lukhtionov 2017-08-22 11:39:46 UTC
After a long time I see in console

qpi0: <QPI system bus> on motherboard
vga0: <Generic ISA VGA> at port 0x3b0-0x3bb iomem 0xb0000-0xb7fff on isa0
ppc0: cannot reserve I/O port range
Timecounters tick every 1.000 msec
usb_needs_explore_all: no devclass
nvme cam probe device init
Trying to mount root from ufs:/dev/vtbd0s1a [rw]...
��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������

When I run command `bhyvectl --destroy --vm=base`

I see

����������������������������������������������������������������������������������������������������������������������������������������������������������������
vm_run error -1, errno 25
                         Assertion failed: (error == 0), function emulate_inout, file /usr/src/usr.sbin/bhyve/inout.c, line 230.
                                                Abort trap