The vm session was closed before any attempt to power it on как исправить

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).

FIX VirtualBox Error "VM Session was closed before any attempt to power it on"

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.

Discard Saved State Virtual Machine

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.

virtualbox vm fails to start

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).

fix Failed to open a session for the virtual machine - virtualbox

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!

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.

Remove Storage
  • 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.

Discard State - vm session was closed before

VirtualBox may come up with some fixes for this issue. But, I can confirm this method worked for me.

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.

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

user3813256's user avatar

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

user3813256's user avatar

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.

press here

Simon Schnell's user avatar

answered Nov 18, 2016 at 1:15

Pegasus's user avatar

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

OutOfThisPlanet's user avatar

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

Pipo's user avatar

PipoPipo

4,56338 silver badges47 bronze badges

1

vboxmanage discardstate <vmId>

you can get with vboxmanage list vms

answered Dec 3, 2018 at 14:54

Pipo's user avatar

PipoPipo

4,56338 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!

Change permissions

answered Feb 19, 2020 at 0:44

Bassam Helal's user avatar

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.'s user avatar

Cristian F.Cristian F.

3282 silver badges12 bronze badges

Solution of «Discard Saved State» is still valid at 2022 Cx

enter image description here

answered Jan 2, 2022 at 22:29

Abdennour TOUMI's user avatar

Abdennour TOUMIAbdennour TOUMI

85.5k38 gold badges243 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

Hauke's user avatar

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

Tiina's user avatar

TiinaTiina

4,1716 gold badges44 silver badges71 bronze badges

I faced the same problem. I resolved it by renaming the .sav file.
Steps to resolve the problem.

  1. Select the VM which is having problem and Right click on VM and select ‘show log’ option

  2. Find the file name which is saved the VM state like ‘2018-07-03T17-05-16-834993200Z.sav is invalid’ in the logs.

  3. Go the path where the .sav file is located and change the file extension to anyother file format.

  4. Restart the VM. It works.

Regards
Sridhar Ganji

answered Jul 9, 2018 at 11:13

SridharGanji's user avatar

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.

General Grievance's user avatar

answered Oct 14, 2020 at 11:36

Spulit's user avatar

[Resolved] The VM session was closed before any attempt to power it on

Hi,

My VirtualBox wont start!

I get the following error message:

The VM session was closed before any attempt to power it on.

Result Code: E_FAIL (0x80004005)
Component: SessionMachine
Interface: ISession {c0447716-ff5a-4795-b57a-ecd5fffa18a4}

The log info is:

00:00:02.352024 VirtualBox VM 6.0.2 r128162 win.amd64 (Jan 14 2019 14:48:15) release log
00:00:02.352028 Log opened 2019-02-08T04:24:59.973668200Z
00:00:02.352028 Build Type: release
00:00:02.352032 OS Product: Windows 7
00:00:02.352033 OS Release: 6.1.7601
00:00:02.352033 OS Service Pack: 1
00:00:02.692931 DMI Product Name: OptiPlex 9020
00:00:02.695330 DMI Product Version: 01
00:00:02.695336 Host RAM: 16326MB (15.9GB) total, 14276MB (13.9GB) available
00:00:02.695339 Executable: C:Program FilesOracleVirtualBoxVirtualBoxVM.exe
00:00:02.695339 Process ID: 4788
00:00:02.695340 Package type: WINDOWS_64BITS_GENERIC
00:00:02.695645 ERROR [COM]: aRC=VBOX_E_FILE_ERROR (0x80bb0004) aIID={872da645-4a9b-1727-bee2-5585105b9eed} aComponent={ConsoleWrap} aText={VM cannot start because the saved state file 'C:Virtual MachinesBRLS001Snapshots2019-02-08T01-35-39-927980700Z.sav' is invalid (VERR_FILE_NOT_FOUND). Delete the saved state prior to starting the VM}, preserve=false aResultDetail=-102
00:00:02.696078 GUI: Aborting startup due to power up issue detected...
00:00:02.696130 GUI: UIMediumEnumerator: Medium-enumeration finished!

I have only recently installed this version (14 days ago) Version 6.0.2 r128162 (Qt5.6.2)

When we installed this version it ran fine. Today we had an unrelated internet outage and so I restarted the computer and now VirtualBox wont start.

I’m running windows 7 professional.

Any ideas?

Last edited by socratis on 11. Feb 2019, 09:33, edited 2 times in total.

Reason: Marked as [Resolved].

BRLC
 
Posts: 4
Joined: 8. Feb 2019, 07:02

Re: The VM session was closed before any attempt to power it on

Postby socratis » 8. Feb 2019, 12:28

BRLC wrote:00:00:02.695645 ERROR [COM]: aRC=VBOX_E_FILE_ERROR (0x80bb0004) aIID={872da645-4a9b-1727-bee2-5585105b9eed} aComponent={ConsoleWrap} aText={VM cannot start because the saved state file ‘C:Virtual MachinesBRLS001Snapshots2019-02-08T01-35-39-927980700Z.sav’ is invalid (VERR_FILE_NOT_FOUND). Delete the saved state prior to starting the VM}, preserve=false aResultDetail=-102

Please let me know if you want me to explain the error any further…

Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the «QUOTE» button, please use the «POST REPLY«, at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.

socratis
Site Moderator
 
Posts: 27689
Joined: 22. Oct 2010, 11:03
Location: Greece
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5

Re: The VM session was closed before any attempt to power it on

Postby BRLC » 10. Feb 2019, 09:28

Thank you for your reply Socratis.

I’ll search the forum here a bit to find out how to do that. I’m sure someone has had to do it before.

Cheers,

BRLC

BRLC
 
Posts: 4
Joined: 8. Feb 2019, 07:02

Re: The VM session was closed before any attempt to power it on

Postby socratis » 10. Feb 2019, 09:59

From the toolbar, next to the «Start», there’s a «Discard». That’s how you discard the saved state.

Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the «QUOTE» button, please use the «POST REPLY«, at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.

socratis
Site Moderator
 
Posts: 27689
Joined: 22. Oct 2010, 11:03
Location: Greece
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5

Re: The VM session was closed before any attempt to power it on

Postby BRLC » 10. Feb 2019, 23:28

Thanks will try that in an hour or so when back at the computer.

Next question is why has it savd that error state? How can I stop it from saving that error state?

Will post the result shortly. Hopefully it works.

Cheers.

BRLC
 
Posts: 4
Joined: 8. Feb 2019, 07:02

Re: The VM session was closed before any attempt to power it on

Postby socratis » 11. Feb 2019, 05:39

BRLC wrote:How can I stop it from saving that error state?

Stop it from saving the error state? I’m sorry, but what are you talking about? Please read the error again a little bit closer:

You saved the VM state into a file, and that file (the saved state) went missing, who knows what you did to your computer. When you tried to restart it from that saved state, the file couldn’t be found and you got that error.

Generally speaking, if a program expects a file to be somewhere, and that file isn’t? You get an error.

Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the «QUOTE» button, please use the «POST REPLY«, at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.

socratis
Site Moderator
 
Posts: 27689
Joined: 22. Oct 2010, 11:03
Location: Greece
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5

Re: The VM session was closed before any attempt to power it on

Postby BRLC » 11. Feb 2019, 06:00

Ok cool, that makes sense.

Thanks for your help Socratis.

The server is up and running again and seems to be fine. At least I’ll know what to do next time this happens!

Someone can make this post as solved now.

Cheers,

BRLC

BRLC
 
Posts: 4
Joined: 8. Feb 2019, 07:02

Re: The VM session was closed before any attempt to power it on

Postby socratis » 11. Feb 2019, 09:33

BRLC wrote:Someone can make this post as solved now.

Happy to… ;)

Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the «QUOTE» button, please use the «POST REPLY«, at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.

socratis
Site Moderator
 
Posts: 27689
Joined: 22. Oct 2010, 11:03
Location: Greece
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5

Re: [Resolved] The VM session was closed before any attempt to power it on

Postby TimOz » 18. Jun 2022, 18:38

I want to report that I think this problem was for me caused by a virtual machine still running in the background.

Unfortunately I also upgraded JIC, so I can’t be sure.

However I did CTRL-ALT DELETE and shut down a running virtual machine.

I upgraded to VirtualBox-6.1.34a-150636-Win, probably from VirtualBox-6.1.22-144080-Win.

After that the same VM that wouldn’t start before, did.

TimOz
 
Posts: 6
Joined: 17. Jun 2022, 19:48


Return to VirtualBox on Windows Hosts

Who is online

Users browsing this forum: Cigala, Majestic-12 [Bot], TheJollyRodger and 27 guests

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!

Понравилась статья? Поделить с друзьями:
  • Короткие ногти как исправить
  • Как правильно составить обязанности сотрудникам
  • Не удалось завершить установку поскольку служба обновления завершает работу как исправить
  • Найти как нарисовать национальные костюмы
  • Забыла свой пароль почты как найти