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

前端 未结 4 387
灰色年华
灰色年华 2020-12-23 11:32

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

相关标签:
4条回答
  • 2020-12-23 12:01

    For Vagrant with CoreOS only please do the following:

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

    This PR is a working source of this info.


    For Vagrang with any vm you can also try disabling nested paging.

    See "Fix High Guest CPU Utilization in VirtualBox by disabling Nested Paging" article for more info.

    0 讨论(0)
  • 2020-12-23 12:07

    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

    0 讨论(0)
  • 2020-12-23 12:10

    Step 1: keep guest additions up to date

    Make sure you have vbguest plugin that will keep your guest additions up to date:

    vagrant plugin update vagrant-vbguest
    

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

    vagrant plugin install vagrant-vbguest
    

    Step 2: disable 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"

    Step 3: recude general CPU consumption

    (Optional) Note: this step will decrease your vm maximum performance!

    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).
    0 讨论(0)
  • 2020-12-23 12:23

    I have disabled System Integrity Protection in order to be able to use iosnoop to diagnose high ioctl activity, which seems to cause 100% CPU usage.

    The problem disappeared. So I believe it has something to do with SIP.

    0 讨论(0)
提交回复
热议问题