Why does virtual box vboxheadless process using Vagrant use 100% of my cpu?

我的梦境 提交于 2019-12-03 03:37:09

问题


So I'm using a couple vagrant boxes and when i have them up, "sometimes/randomly" it starts to take up 100% cpu on my OS X machine and i have no idea whats causing it. I can ssh into the vmachine and check the load and it's at 0 sot its not something thats running in the box.

The only way I can fix this is if i suspend it and resume it, then it goes away until randomly it starts to happen again. Sometimes hours later, sometimes days later.

The only thing I can think of is it might be because i'm using nfs mounts within my virtual machine to access my projects, but i'm not sure yet. Any ideas?


回答1:


EngineerCoder's answer only applies if you're using CoreOS.

I've run into problems if the VirtualBox Extensions pack version differs from the version of VirtualBox. Also, install the Vagrant VirtualBox guest plugin:

vagrant plugin install vagrant-vbguest

And make sure to update the plugin when you update Virtualbox and the extension pack:

vagrant plugin update vagrant-vbguest




回答2:


Please do the following :

  • Set $enable_serial_logging=false in config.rb
  • vagrant destroy
  • vagrant up
  • Observe three VBoxHeadless processes under 3% CPU

And check these links:

http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2010/09/22/fix-high-guest-cpu-utilization-in-virtualbox-by-disabling-nested-paging.aspx

https://github.com/coreos/coreos-vagrant/issues/98




回答3:


Make sure vbguest plugin updated

vagrant plugin update vagrant-vbguest

If it wasn't installed already, you can install it with

vagrant plugin install vagrant-vbguest

Now, disable the sound In VirtualBox window:

  • click on the machine you are using
  • Click settings
  • Go to: Audio Tab
  • Uncheck both "Enable Audio Output" and "Enable Audio Input"

This combination should stop the horrible CPU craziness in Mojave-Virtualbox.

if you wish to take one step forward. you may reduce the general CPU consumption:

  • Click on the Machine --> Settings --> System --> Processor
  • Reduce the Execution Cap. this limits the % of the host CPU, that the guest CPU can use. (default, is 100% - no limit).


来源:https://stackoverflow.com/questions/28293238/why-does-virtual-box-vboxheadless-process-using-vagrant-use-100-of-my-cpu

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!