# Create a private network, which allows host-only access to the machine# using a specific IP.# config.vm.network "private_network", ip: "192.168.33.10"
% vagrant up [~/VagrantVMs/CentOS6]Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'CentOS6'...
==> default: Matching MAC address for NAT networking...
==> default: Setting the name of the VM: CentOS6_default_1405513680628_69547==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
default: Adapter 2: hostonly==> default: Forwarding ports...
default: 22=> 2222 (adapter 1)==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
default: SSH address: 127.0.0.1:2222
default: SSH username: vagrant
default: SSH auth method: private key
default: Warning: Connection timeout. Retrying...
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
==> default: Configuring and enabling network interfaces...
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!
ARPCHECK=no /sbin/ifup eth1 2> /dev/null
Stdout from the command:
デバイス eth1 は存在しないようですので、初期化を遅らせます。
Stderr from the command:
#VAGRANT-BEGIN# The contents below are automatically generated by Vagrant. Do not modify.NM_CONTROLLED=no
BOOTPROTO=none
ONBOOT=yes
HWADDR=08:00:27:F7:36:D6 # 追記IPADDR=192.168.33.10
NETMASK=255.255.255.0
DEVICE=eth1
PEERDNS=no
#VAGRANT-END
# Create a public network, which generally matched to bridged network.# Bridged networks make the machine appear as another physical device on# your network.# config.vm.network "public_network"
% vagrant up [~/VagrantVMs/CentOS6]Bringing machine 'default' up with 'virtualbox' provider...
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfaces...
==> default: Available bridged network interfaces:
1) en1: Wi-Fi (AirPort)2) en0: Ethernet
3) en2: Thunderbolt 1
4) p2p0
5) bridge0
default: What interface should the network bridge to? 1==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
default: Adapter 2: bridged==> default: Forwarding ports...
default: 22=> 2222 (adapter 1)==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
default: SSH address: 127.0.0.1:2222
default: SSH username: vagrant
default: SSH auth method: private key
default: Warning: Connection timeout. Retrying...
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
==> default: Configuring and enabling network interfaces...
==> default: Mounting shared folders...
default: /vagrant => /Users/hao/VagrantVMs/CentOS6
==> default: Machine already provisioned. Run `vagrant provision` or use the `--provision`==> default: to force provisioning. Provisioners marked to run always will still run.
1234567
==> default: Available bridged network interfaces:
1) en1: Wi-Fi (AirPort)2) en0: Ethernet
3) en2: Thunderbolt 1
4) p2p0
5) bridge0
default: What interface should the network bridge to? 1 # ← en1を指定するときは 1 と入力
config.vm.provider"virtualbox"do|vb|# # Don't boot with headless mode# vb.gui = true## # Use VBoxManage to customize the VM. For example to change memory:# vb.customize ["modifyvm", :id, "--memory", "1024"]vb.memory=1024# 追記vb.cpus=2# 追記#end
変更前のcpu情報
1234567
[vagrant@localhost ~]$ cat /proc/cpuinfo
processor : 0 # この項目は、cpu数ではなく番号vendor_id : GenuineIntel
cpu family : 6
model : 42
model name : Intel(R) Core(TM) i5-2415M CPU @ 2.30GHz
--- 省略 ---
変更後のcpu情報
1234567891011121314
[vagrant@localhost ~]$ cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 42
model name : Intel(R) Core(TM) i5-2415M CPU @ 2.30GHz
--- 省略 ---
processor : 1 # cpuコア数が増えているvendor_id : GenuineIntel
cpu family : 6
model : 42
model name : Intel(R) Core(TM) i5-2415M CPU @ 2.30GHz
--- 省略 ---