Virtualbox let Mavericks can't shutdown

Discussions related to using VirtualBox on Mac OS X hosts.

Re: Virtualbox let Mavericks can't shutdown

Postby ulkesh » 25. Oct 2013, 17:57

I have the exact same problem, except sudo shutdown -h now doesn't work for me, the Mac OSX GUI still hangs out (requiring me to have to hold down the power button to shut down). Sadly I need networking and host-only adapters/etc for my VMs. I sure hope this can be fixed soon.

This is my Mac spec:
MacBook Pro
Retina, 15-inch, Early 2013
Processor: 2.7 GHz Intel Core i7
Memory: 16 GB 1600 MHz DDR3
ulkesh
 
Posts: 3
Joined: 25. Oct 2013, 17:54

Re: Virtualbox let Mavericks can't shutdown

Postby Kenster » 26. Oct 2013, 09:27

Hey Everyone!

I recently updated my Mac to the OS X Mavericks and I was previously using VirtualBox 4.2 and I updated to 4.3 in order for the host network issue to be fixed. That was successful but here comes another problem, which is the problem many of you are currently experiencing!

When I run my virtual box, everything works fine and I can SSH into my other networks and such. I can power off my Virtual box and everything and quit that specific virtual box window etc,but once I quit everything, there's another virtual box icon on my dock that will never ever quit!! Even if I force quit it, it won't work and it won't let my Mac shut down! The only way I have been shutting down my computer is to hold down the power button and that turns off my computer.

I've read to do the sudo command but I am not sure how to do that when I can quit my virtual box fine and power off the machine, it's just that there's an extra virtual box icon running in the background that contains no windows whatsoever. It's like a ghost!

My Mac specs (if it matters..) Early 2011, Mac OS 10.9
I hope I explained enough! If not, let me know so I can take screenshots. Please help as soon as you can since I need my virtual box in order to work on my school projects! :(

Help anyone?
Kenster
 
Posts: 3
Joined: 26. Oct 2013, 09:22

Re: Virtualbox let Mavericks can't shutdown

Postby fromagique » 26. Oct 2013, 17:44

I've found that I can kill the vampire VM that prevents shutdown by issuing the following command from the Terminal:
Code: Select all   Expand viewCollapse view
VBoxManage hostonlyif remove vboxnet0

Of course, you can see that this is a pretty severe fix, removing the host-only network entirely. It must be recreated if it beomes necessary to use it again. But if you cannot reboot or shut down your machine for whatever other unrelated reason (critical services running, etc.), this will allow you to recover from the stuck VM.

This also confirms my earlier finding that the host-only interface is the source of the trouble (at least on my setup.) I'm still investigating the reason for the problem occurring in the first place.
fromagique
 
Posts: 5
Joined: 24. Oct 2013, 18:16

Re: Virtualbox let Mavericks can't shutdown

Postby Kenster » 27. Oct 2013, 06:35

fromagique wrote:I've found that I can kill the vampire VM that prevents shutdown by issuing the following command from the Terminal:
Code: Select all   Expand viewCollapse view
VBoxManage hostonlyif remove vboxnet0

Of course, you can see that this is a pretty severe fix, removing the host-only network entirely. It must be recreated if it beomes necessary to use it again. But if you cannot reboot or shut down your machine for whatever other unrelated reason (critical services running, etc.), this will allow you to recover from the stuck VM.

This also confirms my earlier finding that the host-only interface is the source of the trouble (at least on my setup.) I'm still investigating the reason for the problem occurring in the first place.


The command you have introduced does work! But when I run the virtual box again, it shows me an error about the network setting, that can be easily fixed by tweaking the settings a bit and I can access my network once again. Thank you! Although I do not know the repercussions of this command, it serves as a temporary solution for me and anyone else who is having a problem. Thank you so much! :)
Kenster
 
Posts: 3
Joined: 26. Oct 2013, 09:22

Re: Virtualbox let Mavericks can't shutdown

Postby Raedok » 28. Oct 2013, 02:44

fromagique wrote:I've found that I can kill the vampire VM that prevents shutdown by issuing the following command from the Terminal:
Code: Select all   Expand viewCollapse view
VBoxManage hostonlyif remove vboxnet0

Of course, you can see that this is a pretty severe fix, removing the host-only network entirely. It must be recreated if it beomes necessary to use it again. But if you cannot reboot or shut down your machine for whatever other unrelated reason (critical services running, etc.), this will allow you to recover from the stuck VM.

This also confirms my earlier finding that the host-only interface is the source of the trouble (at least on my setup.) I'm still investigating the reason for the problem occurring in the first place.


Even though you delete the vboxnet0 via command, the settings are KEPT (I didn't try do it from anywhere other than the terminal). All you have to do is:
Code: Select all   Expand viewCollapse view
VBoxManage hostonlyif create vboxnet0
and everything is back. If you had a certain configuration for it, it will be there.

Cheers fromagique!
Raedok
 
Posts: 1
Joined: 28. Oct 2013, 02:41

Re: Virtualbox let Mavericks can't shutdown

Postby jferguson » 28. Oct 2013, 05:51

The bash script for launching Quicken running in Windows XP hosted by Ubuntu 12.04 runs fine and quits completely. Same script hosted on Mac Air running Mac OS X 10.8.5 leaves zombies on the dock. They don't prevent starting another instance, but are worrying nonetheless. I'm guessing that the fix will be to grep the process list find the guilty process and kill it by pid. and put that at the end of the script.

You'd sort of think that something like this wouldn't be necessary. If I run vbox manually, and stop the machine in save state, it works fine.

??
jferguson
 
Posts: 12
Joined: 28. Oct 2013, 05:38

Re: Virtualbox let Mavericks can't shutdown

Postby ulkesh » 28. Oct 2013, 15:35

Raedok wrote:
fromagique wrote:I've found that I can kill the vampire VM that prevents shutdown by issuing the following command from the Terminal:
Code: Select all   Expand viewCollapse view
VBoxManage hostonlyif remove vboxnet0

Of course, you can see that this is a pretty severe fix, removing the host-only network entirely. It must be recreated if it beomes necessary to use it again. But if you cannot reboot or shut down your machine for whatever other unrelated reason (critical services running, etc.), this will allow you to recover from the stuck VM.

This also confirms my earlier finding that the host-only interface is the source of the trouble (at least on my setup.) I'm still investigating the reason for the problem occurring in the first place.


Even though you delete the vboxnet0 via command, the settings are KEPT (I didn't try do it from anywhere other than the terminal). All you have to do is:
Code: Select all   Expand viewCollapse view
VBoxManage hostonlyif create vboxnet0
and everything is back. If you had a certain configuration for it, it will be there.

Cheers fromagique!


Thanks so very much! This will at least allow me to get rid of the zombie (I haven't tested shutting down, but I anticipate based on the feedback here, it'll work).

I created the following executable (chmod a+x) shell script to run after shutting down the VM:

Code: Select all   Expand viewCollapse view
#!/bin/bash
VBoxManage hostonlyif remove vboxnet0
VBoxManage hostonlyif create
ulkesh
 
Posts: 3
Joined: 25. Oct 2013, 17:54

Re: Virtualbox let Mavericks can't shutdown

Postby andschwa » 29. Oct 2013, 09:00

Chiming in also having this problem. It was solved by re-opening VirtualBox and removing my host-only adaptor. Which is unfortunate, as I need a host-only network to communicate with some test VMs. Hopefully this gets fixed soon.
andschwa
 
Posts: 1
Joined: 29. Oct 2013, 08:59

Re: Virtualbox let Mavericks can't shutdown

Postby fromagique » 30. Oct 2013, 02:37

jferguson wrote:The bash script for launching Quicken running in Windows XP hosted by Ubuntu 12.04 runs fine and quits completely. Same script hosted on Mac Air running Mac OS X 10.8.5 leaves zombies on the dock. They don't prevent starting another instance, but are worrying nonetheless. I'm guessing that the fix will be to grep the process list find the guilty process and kill it by pid. and put that at the end of the script.

You'd sort of think that something like this wouldn't be necessary. If I run vbox manually, and stop the machine in save state, it works fine.

??


I was not able to find any relevant processes when the zombie VM was stuck in the Dock. I suspect that the problem occurs after the actual process is terminated and Mavericks is cleaning up its Mach ports and such; perhaps the VM was holding a lock to something it shouldn't have or didn't free something important related to the vboxnet driver, and the Mavericks machinery for managing applications (launchd or something related to it) refuses to recognize that the application has quit until that resource is properly disposed of. This would also explain why Force Quit doesn't work--force quitting works (I believe by) using the SIGKILL ("kill -9") process signal.

In any case, my point is, you probably won't be able to find a process to kill, because probably there isn't any. Probably. :) This is all rampant speculation, but I hope at least educated rampant speculation.
fromagique
 
Posts: 5
Joined: 24. Oct 2013, 18:16

Re: Virtualbox let Mavericks can't shutdown

Postby scaseman » 31. Oct 2013, 12:44

I'm also seeing this problem.

Retina Macbook Mid 2012 - Hope they fix this soon
scaseman
 
Posts: 3
Joined: 20. Sep 2012, 14:20

Re: Virtualbox let Mavericks can't shutdown

Postby JimBushWhack » 31. Oct 2013, 19:45

I was able to download and install VBox 4.3 on my late 2012 MBP (2.3 GHz core i7 w/8 GB of memory) with Mavericks and then able to install the Guest additions as well on a Windows 7 Guest. This setup still works fine and I have had no problems with it.

But, I then upgraded my circa 2008 iMac (2.4 GHz Core 2 Duo w/4 GB of memory) to Mavericks and installed VBox 4.3 on it. When I brought up my Windows XP guest and tried to install Guest Additions, this is when the 'fun' began. The XP guest was sluggish at best and I could see the VBox virtual disk activity indicator, mostly in the red all the time. I never was able to install Guest Additions. I finally tried to shutdown windows and quit out of VBox, but this is when VBox failed to quit. Trying to force quit it did not work either. The VBox icon stayed solidly on the dock. I then tried to launch terminal to try some remembered Unix commands to see what was going on, but terminal also failed to launch as well. At this point, I tried shutting down but got the same symptoms as other folks in this thread. As a last resort, I held the power key for 6 seconds and then restarted. I also tried downgrading to VBox 4.2.18 on this setup and got essentially the same symptoms.

I also have a VBox Bootcamp Win XP encapsulation on this iMac, as well as the vdi virtual disk above. I tried bringing this up on VBox 4.3 and got essentially the same symptoms as described above as well. I did not try bringing this up on VBox 4.2.18.
JimBushWhack
 
Posts: 76
Joined: 1. Sep 2008, 23:07
Location: SF Bay Area; California, USA
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win XP on iMac; Win 7 on MacBook pro + bootcamp

Re: Another workaround

Postby AlfaMikeDelta » 1. Nov 2013, 23:06

I'm experiencing the same issue and removing and recreating the vboxnet0 helped killing the "zombie" virtual machine.

But, experimenting with other machines that also have a host only network configured (different from vboxnet0) I found that they are closing normally, so I tried creating another host only network identical to vboxnet0 (with same IP address/mask) and replacing it in the problematic VM and "voilà", the VM now closes correctly.

To create a new network adapter go to: Preferences... > Network > Host-only network tab, click the NIC with the plus sign on the right and edit the configuration with the screwdriver if needed.

After that, select the new network adapter on the VM configuration.

My setup:
- MacBook Pro late 2007
- OS X 10.9 (clean install)
- VirtualBox 4.3.2 (upgraded from 4.3.0)
- VM's came from VirtualBox 4.2.x (cannot remember the exact version)
- 1 NAT virtual network adapter, 2 Host-only (now 3 with the workaround)

UPDATE: I was trying to reproduce the issue after creating the new network adapter and now everything appears to be normal using either vboxnet0 or vboxnet2 (the newly created adapter). May be something got corrupted during the VM import from v4.2.x to 4.3.0?

 Edit: UPDATE2: This solution was temporal... turned off my computer at the end of the day and now I'm experiencing the same issue with vboxnet2. I don't understand why vboxnet1 (the other host-only network adapter) is working normally. 
Last edited by AlfaMikeDelta on 2. Nov 2013, 18:37, edited 1 time in total.
AlfaMikeDelta
 
Posts: 1
Joined: 1. Nov 2013, 22:26

Re: Virtualbox let Mavericks can't shutdown

Postby saientzg » 2. Nov 2013, 00:09

I had the same problem. I've just upgraded to Virtualbox 4.3.2 but the problem persists. Can't close VirtualVM nor force it to quit.
I'm running Mac OS 10.9 (Mavericks).
Any solution or workaround that may work?
saientzg
 
Posts: 1
Joined: 2. Nov 2013, 00:06

Re: Virtualbox let Mavericks can't shutdown

Postby eabalea » 2. Nov 2013, 06:26

It seems VBoxNetDHCP doesn't quit properly. That happens if you setup a host-only network interface with a DHCP server on it and run a VM attached to this network.
I found a workaround, by modifying the /etc/init.d/vboxdrv file. Look for the stop() function, and just after the
Code: Select all   Expand viewCollapse view
    begin_msg "Stopping VirtualBox kernel modules"

line, add the following block:

Code: Select all   Expand viewCollapse view
    # Try to kill remaining VBoxNetDHCP processes
    if [ `pgrep -c VBoxNetDHCP` -gt 0 ]; then
        pkill VBoxNetDHCP
        LOOPS=0
        while [ $LOOPS -lt 10 ]; do
            sleep 1
            if [ `pgrep -c VBoxNetDHCP` -gt 0 ]; then
                LOOPS=$(($LOOPS+1))
            else
                LOOPS=10
            fi
        done
    fi

That code will try to kill any remaining VBoxNetDHCP process, and wait for up to 10 seconds for them to be properly killed before letting the script to the rest of its job. If you find that 10 seconds isn't sufficient on your machine, enlarge the two "10" values to anything that suits you.

Any modification on this file (/etc/init.d/vboxdrv) will surely get reversed on the next upgrade of VirtualBox. Annoying, but I don't want to run a script before shutting down my machine.
eabalea
 
Posts: 1
Joined: 2. Nov 2013, 06:14

Re: Virtualbox let Mavericks can't shutdown

Postby ash87 » 3. Nov 2013, 17:45

Change the init.d on the virtualized machine?

Is there any other pre-requisite for doing this as I can't see a vboxdrv file?
ash87
 
Posts: 1
Joined: 3. Nov 2013, 17:44

PreviousNext

Return to VirtualBox on Mac OS X Hosts

Who is online

Users browsing this forum: No registered users and 11 guests