I ran into the same issue.
The first thing I tried was to manually update hostapd from a debian repository from v2.1 to v2.3 . The issue persisted.
I created this script, which is a list of commands that unblock the WLAN driver, and now I finally have a working AP, already deployed in a remote location.
I saved the script to /usr/bin/enableAP.sh
. Make sure to include it into your crontab so that it is executed at boot.
#!/bin/sh
/bin/sleep 30
/usr/sbin/service hostapd stop
/usr/sbin/service network-manager stop
/sbin/ifdown wlan0
/sbin/iwconfig wlan0 mode Managed
/usr/sbin/rfkill unblock wlan
/usr/bin/nmcli radio wifi off
/usr/sbin/service hostapd stop
/bin/sleep 10
/usr/sbin/service hostapd start
if you want to avoid this issue just after installing your new virtual machine and hostapd, you need to block ubuntu from upgrading hostapd:
when you use sudo apt-get upgrade
it upgrades this package to v2.1, which doesn't work (surely bugged).
You must use sudo apt-mark hold hostapd
to block future upgrades to Hostapd.