I have installed Ubuntu Precise (v. 12.04) on VirtualBox v. 4.1.12, on two different machines running Mac OS 10.5.8 and 10.6.8, respectively. All works as expected. I can shut down Ubuntu using the “Shut Down” command in the menu, and the guest OS does indeed shut down.
But when I try to shut down from the command line using sudo halt, while the guest OS does shut down, its window never disappears.
Does anyone have any idea why this might be? I have no such problem with Ubuntu Lucid (v. 10.04) in the same environments.
It seems to be an open bug see: https://bugs.launchpad.net/ubuntu/+source/upstart/+bug/880240
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/950129
Try
sudo shutdown -h nowinstead.