More than 1 year has passed since last update.



ホストマシンからVagrantで立ち上げたUbuntuに, private_networkで指定したアドレスでアクセス出来ない. sshは繋げる.

$ vagrant up

Configuring and enabling network interfaces...
/Applications/Vagrant/embedded/gems/gems/net-scp-1.1.2/lib/net/scp.rb:392:in `await_response_state': Using /home/vagrant/.rvm/gems/ruby-2.0.0-p247 (RuntimeError)

Configuring and enabling network interfaces...のあとスタックトレースが出るが, VM自体は立ち上がっている状態.

host $ ping
PING ( 56 data bytes
Request timeout for icmp_seq 0



まず, ifconfigで確認するとeth0とloしかない. ここにeth1を追加したい.

host $ cat Vagrantfile = "ubuntu" :private_network, ip: ""
vm $ sudo vim /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet dhcp

+ auto eth1
+ iface eth1 inet static
+   address # <== Vagrantfileに書いたIPと合わせる
+   netmask
vm $ sudo /etc/init.d/networking restart


host $ ping
PING ( 56 data bytes
64 bytes from icmp_seq=0 ttl=64 time=0.321 ms
Sign up for free and join this conversation.
Sign Up
If you already have a Qiita account log in.