2017-01-06 7 views
0

"迷惑なことがある"の後、プライベートネットワークインターフェイス(enp0s8)は自動的に起動しません。私が "vagrant ssh"経由でマシンにアクセスし、手動で "ifup enp0s8"を実行すると、問題なく起動します。次のようにVagrant:Interface Down Buildビルド

私Vagrantfileがある -

Vagrant.configure("2") do |config| 

    config.vm.define "centossean" do |centos7| 
    config.ssh.insert_key = false 
    centos7.vm.box = "geerlingguy/centos7" 
    centos7.vm.hostname = "centossean" 
    centos7.vm.network :private_network, ip: "192.168.157.10" 

    centos7.vm.provider :virtualbox do |vb| 
     vb.memory = 4096 
     vb.cpus = 2 
    end 

    config.vm.provision "ansible" do |ansible| 
     #ansible.verbose = "v" 
     ansible.inventory_path ="inventory" 
     ansible.limit = "centossean" 
     ansible.playbook = "playbooks/main.yml" 
    end 

は、誰もがこの前に遭遇していますか?私はオンラインを見ていたが、それはまっすぐ前方に何かをする可能性がありますので、私は次のバージョン使用してい

...ベイグラントにかなり新たなんだ - ベイグラント1.9.1

  • のVirtualBox 5.1.10 r112026
  • ゲストOSの - CentOSのLinuxの次のようにリリース1511年7月2日

生成のifcfg-enp0s8内容は -

[[email protected] ~]$ cat /etc/sysconfig/network-scripts/ifcfg-enp0s8 
#VAGRANT-BEGIN 
# The contents below are automatically generated by Vagrant. Do not modify. 
NM_CONTROLLED=no 
BOOTPROTO=none 
ONBOOT=yes 
IPADDR=192.168.157.10 
NETMASK=255.255.255.0 
DEVICE=enp0s8 
PEERDNS=no 
#VAGRANT-END 

ありがとうございました!

答えて

0

回答が見つかりました -

config.vm.define "centossean" do |centos7| 
    centos7.ssh.insert_key = false 
    centos7.vm.box = "centos/7" 
    centos7.vm.hostname = "centossean" 
    centos7.vm.network :private_network, ip: "192.168.157.10" 
    *centos7.vm.provision "shell", inline: "nmcli connection reload; systemctl restart network.service"* 
関連する問題