# VMWare console not working with FreeBSD 11 install



## JamesNJ (Nov 1, 2016)

I have ESXi 5.5 and vCenter5.5, trying to install FreeBSD 11 from ISO image.

The console is horrible and impossible to use; skips characters, doesn't register shift/control properly, etc.

FreeBSD 10.3 under the same system seemed to install ok with fewer quirks, but 11 is just impossible to get going.

I know it is not much to go on, but any idea what the issue is here? I don't seem to have any keyboard/mouse input issues with either Linux or Windows VM's ... just FreeBSD.

Any pointers appreciated, thanks!


----------



## JamesNJ (Nov 1, 2016)

The console input is just plain erratic. Sometimes on cold boot the keyboard input is fine for a while and then goes haywire ... I can't seem to narrow down a pattern that triggers the condition. But once the console goes bad it seems like only a cold boot might get it functional again for some time.


----------



## JamesNJ (Nov 2, 2016)

I found the factors causing this issue, but no real good way around it.

I found that this issue exists when you run the vSphere client on a remote windows machine and RDP to that machine to access vSphere and the consoles. I do this mainly because I use MacOS which has no great vmware management tools, but also because I often VPN to work ... having the remote windows PC accessible for management tools makes things easier.  However, I confirmed this issue exists if you use windows mstsc to RDP into the same host.  Using a windows host to directly run the vSphere tools does not exhibit the symptom.

The odd thing is that of all the OS's I've managed on ESX, FreeBSD so far is the only OS/console that has a problem with this combination. Netapp simulators also have this issue which interestingly are based on a freebsd kernel.

I tried playing with console video modes but didn't get anywhere as the VESA kernel module refuses to load, unsure why.

So FreeBSD11 runs well on ESX, but for Mac users the best solution for console access is Firefox and the vSphere web console.


----------



## SirDice (Nov 2, 2016)

JamesNJ said:


> I tried playing with console video modes but didn't get anywhere as the VESA kernel module refuses to load, unsure why.


Because it's already included in the GENERIC kernel.

Newer FreeBSD versions use vt(4) for the console, you may want to try the 'old' sc(4) console. Add to /boot/loader.conf:

```
kern.vty=sc
```


----------



## JamesNJ (Nov 2, 2016)

Thanks for the help ... it didn't work for me and I can figure out how to debug.

I tried the entry you suggested above, but after reboot I didn't see any different behavior in the console.  I also tried

```
kern.vty="sc"
```
with no luck. I also tried to remove that and replace with:

```
hw.vga.textmode="1"
```
Thinking that maybe a different vt(4) console mode would be different. However on reboot I don't see any difference. I checked loader.rc and it includes the loader.4th file and 'initialize' statement.

Not sure but I must be doing something wrong, is there some way to check that these statements I'm putting into loader.conf are actually getting processed correctly? I don't see anything obvious in the dmesg output.

Thanks for the help


----------



## SirDice (Nov 3, 2016)

You should be able to tell the difference:

```
vtvga0: <VT VGA driver> on motherboard
```
This is for a vt(4) console.


----------



## JamesNJ (Nov 3, 2016)

Thanks for that.
I was able to verify that I could switch to sc console but no change in behavior. I was also successful in setting hw.vga.textmode="0", same behavior. I also attempted to disable mouse input to the console, no luck.

Any other suggestions I might try?

I was thinking to try switching VGA modes on the console, but the "vidcontrol -i mode" doesn't return anything and any attempt to change modes usually results in ioctl error.

As an aside, I loaded up OpenBSD and it doesn't have this console issue. It only seems to plague FreeBSD installations.

I don't need anything fancy on the console, just simple reliable keyboard entry when trouble hits. I'm not totally dead in the water as the vSphere web console can work under firefox but has its own set of quirks.


----------



## SirDice (Nov 3, 2016)

JamesNJ said:


> Any other suggestions I might try?


I'm quickly running out of ideas unfortunately. The only thing I could think of that might be worth a try is to see if you can get a FreeBSD to UEFI boot on ESXi. It's a bit of a long shot though.


----------



## JamesNJ (Nov 4, 2016)

Hey I appreciate the help here ... I know it is a bit of a corner case I'm working on.

I got the UEFI VM to boot and install, but the console input is just as bad.  But I will say that the vt(efifb) console looks nicer than the BIOS based system. On a whim I tried setting sc console and that seems to be a very bad idea; not only does FreeBSD fail to boot but it looks to have caused vSphere more trouble and hung the RDP session.

If I use FreeBSD for his project I'll have to document some alternative way to manage the instance.  Maybe if I'm desperate I'll try to enable the serial console and use another VM to manage it that way. I might also get away with forcing the startup of X and stick to graphical console.


----------



## SirDice (Nov 4, 2016)

If it's for production systems I would recommend sticking to 10.3 for now. It will be supported until April 2018. There's ample time to test 11.0 and in the mean time 11.1 will have been released too.


----------



## scotia (May 31, 2017)

Late to the party, however I found that adding:

`keyboard.typematicMinDelay = "2000000"`

to the VM's vmx file fixed the issue for me.  (Added that while powered off).

I found the hint in https://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=196 although it wasn't solving the issue of dropped key presses.


----------

