VirtualBoxes will not start

Discussions related to using VirtualBox on Linux hosts.
Post Reply
coatmaker618
Posts: 15
Joined: 2. Feb 2016, 18:12

VirtualBoxes will not start

Post by coatmaker618 »

Hi all, I'm running VirtualBox on a headless Linux box--or I should say I was, not I can't get a single VM to open :(

Here is what I've tried & the outputs: (file name changed to BASH variables to an, everything else is the same)

$ VBoxManage startvm $thisVM --type headless
Waiting for VM "$thisVM" to power on...
VBoxManage: error: The VM session was closed before any attempt to power it on
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component SessionMachine, interface ISession

I read a forum post that recommended this
$ VBoxManage discardstate ${thisVM}

VBoxManage: error: Runtime error opening '$VMPATH/$thisVM/$thisVM.vbox-tmp' for overwriting: -38 (Access denied.).
VBoxManage: error: /build/virtualbox-p8NxA3/virtualbox-5.2.34-dfsg/src/VBox/Main/src-server/MachineImpl.cpp[10777] (nsresult Machine::i_saveStateSettings(int))
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component SessionMachine, interface IMachine, callee nsISupports
VBoxManage: error: Context: "DiscardSavedState(true )" at line 662 of file VBoxManageMisc.cpp


the only log I could find:
$ sudo cat VBoxSVC.log | grep $thisVM

00:00:05.511144 main ERROR [COM]: aRC=VBOX_E_OBJECT_IN_USE (0x80bb000c) aIID={4afe423b-43e0-e9d0-82e8-ceb307940dda} aComponent={MediumWrap} aText={Medium '$VMPATH/$thisVM/Snapshots/{66b6af72-3ce9-4505-8cd5-5f9d76ae0b58}.vdi' cannot be closed because it is still attached to 1 virtual machines}, preserve=false aResultDetail=0
00:00:05.511180 main ERROR [COM]: aRC=VBOX_E_OBJECT_IN_USE (0x80bb000c) aIID={4afe423b-43e0-e9d0-82e8-ceb307940dda} aComponent={MediumWrap} aText={Medium '$VMPATH/$thisVM/Snapshots/{52d86c67-160b-418e-98fd-3223f8acaab9}.vdi' cannot be closed because it is still attached to 1 virtual machines}, preserve=false aResultDetail=0
00:00:05.511203 main ERROR [COM]: aRC=VBOX_E_OBJECT_IN_USE (0x80bb000c) aIID={4afe423b-43e0-e9d0-82e8-ceb307940dda} aComponent={MediumWrap} aText={Medium '$VMPATH/$thisVM/Snapshots/{43e16783-0766-4dd1-8a35-7aeb21cae699}.vdi' cannot be closed because it is still attached to 1 virtual machines}, preserve=false aResultDetail=0
00:00:05.511226 main ERROR [COM]: aRC=VBOX_E_OBJECT_IN_USE (0x80bb000c) aIID={4afe423b-43e0-e9d0-82e8-ceb307940dda} aComponent={MediumWrap} aText={Medium '$VMPATH/$thisVM/Snapshots/{16ad5491-47c8-4555-b3ba-7fb8c782c196}.vdi' cannot be closed because it is still attached to 1 virtual machines}, preserve=false aResultDetail=0
00:00:05.511248 main ERROR [COM]: aRC=VBOX_E_OBJECT_IN_USE (0x80bb000c) aIID={4afe423b-43e0-e9d0-82e8-ceb307940dda} aComponent={MediumWrap} aText={Medium '$VMPATH/$thisVM/Snapshots/{e0a72174-1830-4008-af1c-5cc8ae357552}.vdi' cannot be closed because it is still attached to 1 virtual machines}, preserve=false aResultDetail=0
00:00:05.511270 main ERROR [COM]: aRC=VBOX_E_OBJECT_IN_USE (0x80bb000c) aIID={4afe423b-43e0-e9d0-82e8-ceb307940dda} aComponent={MediumWrap} aText={Medium '$VMPATH/$thisVM/$thisVM.vdi' cannot be closed because it is still attached to 1 virtual machines}, preserve=false aResultDetail=0



This is a case where the state is "saved" if the machine is "powered off" then I get a similar (but not identical) error. I can post the message for powered off if that helps. Thanks in advance!
coatmaker618
Posts: 15
Joined: 2. Feb 2016, 18:12

Re: VirtualBoxes will not start

Post by coatmaker618 »

For anyone who has a similiar problem, it ended up being permissions in my case. The share was 755 but VirtualBox needed 777, so I had to force the share to 777. Once that happened, Virtualbox was happy to restore the VMs (though a few did take longer than normal)
7Up Man
Posts: 11
Joined: 27. Apr 2019, 16:14

Re: VirtualBoxes will not start

Post by 7Up Man »

I just had this exact same error message when upgrading to 6.1.36r152435. The cause for me is that I had the wrong version of the ExtPack loaded. When I up-graded the ExtPack to the correct version, everything worked just fine.
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: VirtualBoxes will not start

Post by mpack »

That's nonsense I'm afraid - nothing in the extension pack affects host file permissions. The problem above is clearly an orphaned file lock or the VM is still running in the background. A host reboot will usually fix either one.
7Up Man
Posts: 11
Joined: 27. Apr 2019, 16:14

Re: VirtualBoxes will not start

Post by 7Up Man »

I take on board your points. I did re-boot several times, I also set the file permissions to 666 or 777 per the previous post.

I also appreciate that if there were a problem with the ExtPacks then there would be a lot more people then me with this issue. The reason that I got to the ExtPack is because there was a reference to it in one of the log files. It may have been that the permissions on the ExtPack were wrong; didn't check that.

So what I will say is this. I don't know what the true cause was, but upgrading the ExtPacks, with everything that is impacted by that, resolved the issue for me.

My system is about 5 years old and been upgraded many times, plus messed around with by my. I write this to potentially help others, not because I believe there is a problem with the software.
Post Reply