For some reasons, if the Oracle VirtualBox is giving this error while powering on a virtual machine, this simple trick going to be useful. Today I had an issue when powered on one of the VM with the following message; “The VM session was closed before any attempt to power it on“, then closed by itself. It is a strange behavior. Finally, I managed to fix with the following method. Now VMs are fine.
I tried the following methods, but failed.
1) Tried several snapshots which gave me the same error.
2) Restarted Host computer.
3) Stopped all VirtualBox services and restarted.
All failed, finally, Google helped me to find out this thread in VirtualBox.
If you get The VM session was closed before any attempt to power it on message and Virtual Machines cannot be started, don’t panic. Don’t do anything. Just take a snapshot.
The working Method
Go to Storage option of VM; remove hard disks and CD drives.
Start Virtual machine now. At least now you could see Oracle VirtualBox screen, but as expected boot medium error you will get. Shut down VM and add storage disks as it was earlier.
Now switch on the virtual machine, which will start normally.
I didn’t try much to find out the cause. VirtualBox may come up with some fixes for this issue. But, I can confirm this method worked for me. This method can work on any host such as Windows or Mac.