LoginSignup
16
12

More than 5 years have passed since last update.

VagrantfileでCPUの数を設定する

Posted at

実行環境が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

参考

16
12
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
16
12