Page 3 of 5

Re: Virtualbox let Mavericks can't shutdown

Posted: 5. Nov 2013, 02:18
by RCH
I have a Macbook running Mavericks where I run VirtualBox 4.3.2. I have the problem of zombie process appearing in my Dock after I run any VirtualBox VM. I can't force kill it and I can't shutdown or reboot my Mac unless I keep pressing the power button for a hard shutdown.

It appears that many users have this issue. Is there a bug report raised to VirtualBox teams on this issue?

Thanks...

Re: Virtualbox let Mavericks can't shutdown

Posted: 5. Nov 2013, 02:43
by Kenster
The command prompts that many others were suggesting helped a lot.

But what I mainly do to quit the ghost Virtualbox is to delete my host only adapter (vboxnet#) and that quits it. Hope that helps, much a simpler alternative way for me!

Re: Virtualbox let Mavericks can't shutdown

Posted: 5. Nov 2013, 09:02
by Souni
I have same problem with shut down. I'ts quite fatal for me because I need virtualbox with networking quite a lot.

Sollution for rolandow's re-install VirtualBox on every boot issue can be found by Googling:
VritualBox 4.30 on OS X 10.9 Mavericks jarneil
(can't send direct link as a first day forum user)

Re: Virtualbox let Mavericks can't shutdown

Posted: 5. Nov 2013, 15:23
by ChrisJenkins
I've been experiencing this issue since I updated to OS X 10.9 Mavericks. As others have already figured out it is primarily related to host only networking and having DHCp enabled seems to be a contributory factor (but is not essential as I still sometimes see the problem even though I do not have DHCp enabled on any of my 4 host-only networks).

There is a relatively painless workaround that avoids having to delete your networks etc. At least it is working fine for me but YMMV:

1. Upgrade to the newly released VirtualBox 4.3.2 (as step 2 does not work reliably in 4.3.0, at least in my experience).

2. Disable DHCP on any host-only adaptors that do not need it.

3. If you find yourself with a 'zombie' dock icon after exiting/suspending a VM then:

a) Make sure you do not have any VMs running and you have exited from the VirtualBox GUI.
b) From a terminal session in the Mac host run the command: sudo /Library/Application\ Support/VirtualBox/LaunchDaemons/VirtualBoxStartup.sh restart

This should clear the zombie and allow you to continue using VirtualBox without needing to reboot.

Chris

Re: Virtualbox let Mavericks can't shutdown

Posted: 8. Nov 2013, 01:27
by teetee
1-button solution whenever vbox hangs and can't be forced quit:

Use Applications | Automator.app

Create a "Run AppleScript" item and save it as .app with the following content:
--
on run {input, parameters}
tell application "System Events"
set the_password to "password"
display dialog "Admin password goes here." default answer "password" buttons {"OK", "Cancel"} default button "OK" with icon 2 with title "Password" with hidden answer
set the_password to text returned of the result
end tell
do shell script "sudo '/Library/Application Support/VirtualBox/LaunchDaemons/VirtualBoxStartup.sh' restart" password the_password with administrator privileges

end run
--

You can place it in the dock or on the desktop and run it to reset virtualbox.

Re: Virtualbox let Mavericks can't shutdown

Posted: 8. Nov 2013, 01:50
by RCH
This is great. Thanks for the script.
teetee wrote:1-button solution whenever vbox hangs and can't be forced quit:

Use Applications | Automator.app

Create a "Run AppleScript" item and save it as .app with the following content:
--
on run {input, parameters}
tell application "System Events"
set the_password to "password"
display dialog "Admin password goes here." default answer "password" buttons {"OK", "Cancel"} default button "OK" with icon 2 with title "Password" with hidden answer
set the_password to text returned of the result
end tell
do shell script "sudo '/Library/Application Support/VirtualBox/LaunchDaemons/VirtualBoxStartup.sh' restart" password the_password with administrator privileges

end run
--

You can place it in the dock or on the desktop and run it to reset virtualbox.

Re: Virtualbox let Mavericks can't shutdown

Posted: 11. Nov 2013, 06:07
by tmohr
Hi,

I have been having this issue as well but unfortunately the script does not work for me.

I get this as output:
Unloading VBoxNetFlt.kext
(kernel) Kext org.virtualbox.kext.VBoxNetFlt did not stop (return code 0x5).
(kernel) Kext org.virtualbox.kext.VBoxNetFlt can't unload - module stop returned 0xdc008017.
Failed to unload org.virtualbox.kext.VBoxNetFlt - (libkern/kext) kext (kmod) start/stop routine failed.
Error: Failed to unload VBoxNetFlt.kext
Unloading VBoxDrv.kext
(kernel) Can't remove kext org.virtualbox.kext.VBoxDrv; services failed to terminate - 0xdc008018.
Failed to unload org.virtualbox.kext.VBoxDrv - (libkern/kext) kext is in use or retained (cannot unload).
Error: Failed to unload VBoxDrv.kext
Fatal error: VirtualBox
Does anyone have anymore ideas?

Thanks,
Tim

Re: Virtualbox let Mavericks can't shutdown

Posted: 11. Nov 2013, 06:54
by relaxdiego
teetee's suggestion worked for me. I created an alias in ~/.bash_profile to make it easier:

Code: Select all

# Kill zombie VMs
alias nobrains='sudo /Library/Application\ Support/VirtualBox/LaunchDaemons/VirtualBoxStartup.sh restart'

Re: Virtualbox let Mavericks can't shutdown

Posted: 12. Nov 2013, 14:43
by teetee
Make sure you
1. have virtualbox 4.3.2 installed on the host
2. have turned off all the virtual machines and the virtualbox manager.
3. disable / stop the DHCP on any host-only adaptors

The script only restarts the virtualbox service(and solve the zombie virtualbox on the dock issue), it can't do that if any of the kext kernel modules (e.g. VBoxNetFlt.kext) are currently in use (by the virtual machines).

tmohr wrote:Hi,

I have been having this issue as well but unfortunately the script does not work for me.

I get this as output:
Unloading VBoxNetFlt.kext
(kernel) Kext org.virtualbox.kext.VBoxNetFlt did not stop (return code 0x5).
(kernel) Kext org.virtualbox.kext.VBoxNetFlt can't unload - module stop returned 0xdc008017.
Failed to unload org.virtualbox.kext.VBoxNetFlt - (libkern/kext) kext (kmod) start/stop routine failed.
Error: Failed to unload VBoxNetFlt.kext
Unloading VBoxDrv.kext
(kernel) Can't remove kext org.virtualbox.kext.VBoxDrv; services failed to terminate - 0xdc008018.
Failed to unload org.virtualbox.kext.VBoxDrv - (libkern/kext) kext is in use or retained (cannot unload).
Error: Failed to unload VBoxDrv.kext
Fatal error: VirtualBox
Does anyone have anymore ideas?

Thanks,
Tim

Re: Virtualbox let Mavericks can't shutdown

Posted: 12. Nov 2013, 21:40
by tmohr
Ahhh thanks TeeTee... I missed point 3 about disabling DHCP on the hostadaptor.

Now zombie virtual box goes away and all is well in clean shutdown land.

Cheers,
Tim

Re: Virtualbox let Mavericks can't shutdown

Posted: 13. Nov 2013, 05:56
by Chisleu
I also have this issue.

Another problem I find is even when the instance is shut down, when I put the computer to sleep, it still chugs power like crazy. It seems to be sleeping other applications, but my power seems to drain fast. I would bet it is linked.

I just can't wait to get this semester over with so I can my build environment un-stupid (virtualization is for Eucalyptus... heh)

Re: Virtualbox let Mavericks can't shutdown

Posted: 20. Nov 2013, 11:04
by scaseman
Does anybody know if this is identified as an issues by VB?

The script works for me to kill the ghost vm but we shouldn't need to do this

Plus, I think it may have just prevented my Macbook waking up from sleep forcing me to hard shutdown

Re: Virtualbox let Mavericks can't shutdown

Posted: 20. Nov 2013, 14:43
by ChrisJenkins
I cannot claim to speak for the VirtualBox team but I do know that they are aware of it and are investigating.

Re: Virtualbox let Mavericks can't shutdown

Posted: 21. Nov 2013, 00:24
by bulletmark
scaseman wrote:Does anybody know if this is identified as an issues by VB?
See https://www.virtualbox.org/ticket/12241.

Re: Virtualbox let Mavericks can't shutdown

Posted: 28. Nov 2013, 01:29
by viaxxx
If you still want to use network features of VBox, you can just unload the faulty VBox kernel module prior to shutdown.

Go in terminal and type: sudo kextunload /Library/Application\ Support/VirtualBox/VBoxNetAdp.kext/
This will unload the module and let you shutdown properly. But then, you cannot use VirtualBox network features without rebooting.

I hope Oracle will fix this soon...