This tutorial contains instructions to fix the following error in VirtualBox: «Failed to open a session for the virtual machine. The VM session session was closed before any attempt to power it on» with Result Code: E_FAIL (0x80004005).
The VirtualBox error «VM Session was closed before any attempt to power it on» usually occurs when the user shuts down the host machine without shutting down the VM guest machine first.
How to FIX VirtualBox Error: «The VM Session was closed before any attempt to power it on».
Method 1. Discard VM’s Saved State.
Method 2. Uninstall and Re-Install VirtualBox.
Method 1. Discard VM’s Saved State.
The usually method to fix the «VM session session was closed before any attempt to power it on», is to discard the saved state of the Virtual machine. To do that:
1. Right click on the Virtual Machine and select Discard Saved State.
2. Then try to start the virtual machine. If the problem persists, continue to the next method below.
Method 2. Uninstall and Re-Install VirtualBox.
The next method to solve the «VM session session was closed before any attempt to power it on» problem in VirtualBox, is to uninstall and then to reinstall the VirtualBox application, especially if the problem appeared after a Windows Update.
1. Go to Control Panel & Uninstall VirtualBox. (Don’t worry, the VMs will stay untouched).
2. Reboot your computer.
3. Download latest version of VirtualBox.
4. Right click on the downloaded file and click «Run As Administrator».
5. Follow the on screen prompts to install VirtualBox.
6. After installation, reboot your computer.
7. Open VirtualBox manager and start your Virtual Machine.
8. If the Virtual Machine opens fine, then proceed to install the Guest Additions and the Extension Pack (if needed).
That’s it! Let me know if this guide has helped you by leaving your comment about your experience. Please like and share this guide to help others.
If this article was useful for you, please consider supporting us by making a donation. Even $1 can a make a huge difference for us in our effort to continue to help others while keeping this site free:

If you want to stay constantly protected from malware threats, existing and future ones, we recommend that you install Malwarebytes Anti-Malware PRO by clicking below (we
do earn a commision from sales generated from this link, but at no additional cost to you. We have experience with this software and we recommend it because it is helpful and useful):
Full household PC Protection — Protect up to 3 PCs with NEW Malwarebytes Anti-Malware Premium!
I installed VirtualBox on Windows. I set it up to boot Ubuntu14. I enabled the virtualization option for the CPU to enabled (before that, the VM would not boot up complaining about i686 CPU). I rebooted the OS. After this, when I try starting the VM, it gives the following error:
The VM session was closed before any attempt to power it on.
Result Code:
E_FAIL (0x80004005)
Component:
SessionMachine
Interface:
ISession {7844aa05-b02e-4cdd-a04f-ade4a762e6b7}
What did I do wrong and how can I fix it? Thanks. I did not post on serverfault since this is not a server but a laptop.
asked Sep 26, 2015 at 18:08
0
discarding the «saved state» of the virtual machine using the virtual box GUI allowed me to launch the Ubuntu VM.
answered Sep 26, 2015 at 18:11
user3813256user3813256
7721 gold badge6 silver badges19 bronze badges
3
Just right click and choose «clear saved state» to restart
or click on the orange discard icon.
answered Nov 18, 2016 at 1:15
PegasusPegasus
1,39815 silver badges20 bronze badges
1
I just had this same issue, and the fix for me (On Windows) was to run Virtual Box as Administrator.
answered Jan 23, 2016 at 20:49
2
I fixed it fixing filesystem permissions, there were in a strange state by doing as root (or sudo):
find /pathToVmDir -type d -exec chmod 755 {} +
find /pathToVmDir -type f -exec chmod 644 {} +
The state was:
usr@machnine:~$ ls -l /mnt/data/virtualboxVms/ [418/418]
ls: cannot access '/mnt/data/virtualboxVms/vmDebDev': Permission denied
ls: cannot access '/mnt/data/virtualboxVms/Archiv': Permission denied
total 0
d????????? ? ? ? ? ? Archiv
d????????? ? ? ? ? ? vmDebDevJava_Clone
answered Jul 24, 2018 at 12:05
PipoPipo
4,59338 silver badges47 bronze badges
1
vboxmanage discardstate <vmId>
you can get with vboxmanage list vms
answered Dec 3, 2018 at 14:54
PipoPipo
4,59338 silver badges47 bronze badges
It was a permissions issue for me because I changed the VM folder to a different drive, either try running as administrator or just change the security permissions of the VM root folder to allow full control by anyone. The latter worked for me!
answered Feb 19, 2020 at 0:44
My solution was to clone the VM into an alternative name, and then remove the older one with all the files.
(I already removed the Snapshoots and VM in every way I thought …)
answered Aug 5, 2021 at 12:36
Cristian F.Cristian F.
3282 silver badges12 bronze badges
Solution of «Discard Saved State» is still valid at 2022 Cx
answered Jan 2, 2022 at 22:29
Abdennour TOUMIAbdennour TOUMI
86.1k38 gold badges246 silver badges251 bronze badges
If you have done shapshots .. you can easy get back to the last version: (snapshot > restore spapshot)
answered Mar 11, 2016 at 10:12
HaukeHauke
2574 silver badges12 bronze badges
I newly installed VirtualBox and try to register a former created virtual machine.
When start it I got the same error. And the «clear saved state» was not-able-to-click. I tried other virtual machines, all the same.
Then I did this:
1)I enabled the CPU virtualization in bios, which was disabled. (not really related but should give another 64 cpu not supported like error sooner or later).
2)I remove and save storage hard disk. Then another error:
............(Access denied.)..........
3)Reopen virtual box in Administrator. or maybe repeat 2.
it works…
answered Jan 18, 2017 at 2:29
TiinaTiina
4,2116 gold badges44 silver badges71 bronze badges
I faced the same problem. I resolved it by renaming the .sav file.
Steps to resolve the problem.
-
Select the VM which is having problem and Right click on VM and select ‘show log’ option
-
Find the file name which is saved the VM state like ‘2018-07-03T17-05-16-834993200Z.sav is invalid’ in the logs.
-
Go the path where the .sav file is located and change the file extension to anyother file format.
-
Restart the VM. It works.
Regards
Sridhar Ganji
answered Jul 9, 2018 at 11:13
I hope this answer isn’t too late, but I was in the same problem and finally I solved with two solutions get from different sources.
You must solve the next issue with:
- Open the registry editor. Start > Run > regedit
- Go to: HKEY_LOCAL_MACHINESYSTEMCurrentControlSetservicesVBoxDrv
- Edit the key called
Start
. Change its value from 1 to 3 - Close the registry editor and restart your computer. After your computer restarts you should be able to use VirtualBox without any issues.
If not you must open cmd as Administrator and type the next command:
sc start vboxdrv
After that try to start the virtual machine.
answered Oct 14, 2020 at 11:36
For some reason, if the Oracle VirtualBox is giving the below error while powering on a virtual machine, this simple trick will be useful. You may get an error saying “The VM session was closed before any attempt to power it on“, and closes by itself while switching on a particular VM.
Here is the solution that worked for me to overcome this issue.
I tried the following methods but did not work.
1) Tried several snapshots to restore back the VM to an earlier state. But it gave me the same error.
2) Restarted the host computer.
3) Stopped all VirtualBox services and restarted. It is almost identical to restarting the physical computer, but I tried that too.
So, here is the working solution.
If you get the ‘the VM session was closed before any attempt to power it on’ message and the Virtual Machine doesn’t start, don’t panic. Just take a snapshot of the virtual machine to protect the current state. Then, follow the steps.
The Working Method for VirtualBox Error
Go to the Storage option of VM; remove hard disks and CD drives.

- Once all storage is removed, it will have no attached storage. Start the Virtual machine now. You will see the Oracle VirtualBox screen with boot medium error because there is no bootable CD or hard disk attached.
- Shut down VM now and add the correct storage disks as it was earlier.
- Now switch on the virtual machine, which will start normally.
Other Possible Cause
Also, the possible corruption or broken saved state of the VM could cause this issue. You might have closed the VirtualBox software while the VM is working without properly shutting down it or you saved the VM while the guest OS was doing some busy tasks. After that, when you try to start the same VM, you may get a similar error.
In this case, discard the ‘Saved State” and start the Virtual Machine.

VirtualBox may come up with some fixes for this issue. But, I can confirm this method worked for me.
If any of the above solutions did not fix the Windows PC issues, we recommend downloading the below PC repair tool to identify and solve any PC Issues.
Dinesh is the founder of Sysprobs and written more than 400 articles. Enthusiast in Microsoft and cloud technologies with more than 15 years of IT experience.
After a long, friendly and fruitful chat with @DavidFoerster, it turned out that Microsoft and its weird update policy was the culprit!
David patiently guided me through the reinstallation of the VirtualBox packages from the Ubuntu repositories and check out the configuration (dkms, extension packages, etc.). At last, he asked me to try a new installation with a live ISO. It was then that I noticed that my «Default Machine Folder» defined in VirtualBox - File - Preferences - General
was not usable. I knew that it was on a mounted NTFS used by the dualboot Win10 system. A closer look showed that at present it was mounted read-only, which prevented the virtual machines from starting (with a not very helpful error message).
As I recalled then, shortly after I had last successfully booted the VirtualBox guests, I had not only got Ubuntu updates, but I had also booted for the first time since long my native Win10 system. Apparently, Microsoft had then installed updates AND had reactivated the ‘fast startup’ option (which certainly had been deactivated before!) — so that later, back in Ubuntu, the NTFS file system was mounted in read-only mode, as Windows had not properly shut down.
Now that I have again deactivated the ‘fast startup’ option in Windows10, my guest systems are running again.
Thank you, David, for asking the right question which set me on the right track!
При запуске виртуальной машины появляется сообщение об ошибке примерно следующего содержания:
Failed to open a session for the virtual machine Windows 7 Pro.
The VM session was closed before any attempt to power it on.
Result Code: NS_ERROR_FAILURE (0x80004005)
Component: SessionMachine
Interface: ISession {12345678-1234-1234-1234-aaaaaaaa}
В моем случае все решалось довольно просто — при копировании информации со старого диска на новый пользователи по умолчанию получили права только на чтение и запуск файлов, но не на изменение.
Таким образом, если на папку с виртуальной машиной дать нужному пользователю права на запись, эта ошибка больше не появится.
- Об авторе
- Недавние публикации