It's not a bug. If a vm in VirtualBox is closed from host i.e. user clicks the close button of vm's Explorer window, the default action is the last one used of three alternatives: Save the machine state, Send the shutdown signal and Power off the machine. If user has not changed this default closing action by selecting another action, the selection is Power off the machine, so when it is selected and user clicks OK, it's like pressing power button on a real PC when Windows is still running. That causes for instance Windows vm's to ask if they should boot to Safe Mode next time when the vm is launched.
How to close a VirtualBox Windows vm:
- Shut down normally: From guest, using guest's Start Menu > Shut down
- Hibernate: From host, using Explorer window's close button, select Save the machine state. It's much faster than Windows guest's own hibernate function, doing basically the same thing. Extremely fast wake-up
- Power off: From host, using Explorer window's close button, select Power off the machine. Use this when you need to do a hard reset for instance after guest turning unresponsive