12
Help us understand the problem. What are the problem?

More than 5 years have passed since last update.

posted at

VagrantfileでCPUの数を設定する

実行環境がVirtualBoxの場合にVagrantfileでゲストVMのCPU数を設定する方法。他。

環境

  • macOS Sierra
  • Vagrant 1.9.7
  • VirtualBox 5.1.26

Vagrantfile

Vagrant.configure("2") do |config|
  config.vm.box = "centos/7"
  config.vm.synced_folder ".", "/vagrant", type: "virtualbox"

  config.vm.provider "virtualbox" do |vb|
    # 割り当てるメモリー(MB)
    vb.memory = 512
    # CPUの数
    vb.cpus = 1
    # I/O APICの有効化
    vb.customize ["modifyvm", :id, "--ioapic", "on"]
  end
end

参考

Register as a new user and use Qiita more conveniently

  1. You can follow users and tags
  2. you can stock useful information
  3. You can make editorial suggestions for articles
What you can do with signing up
12
Help us understand the problem. What are the problem?