けつあご日記

tinojiはやみのふぃくさーにしかなりたくない.ひゃっぽゆずっててんほういは,あり.

vagrantのCentOS7のIPが192.168.56.xxxになる

ただのメモ。

qiita.com

基本的に↑の通りだが、eth1だとだめだった。

sudo systemctl status network.service
network.service - LSB: Bring up/down networking
   Loaded: loaded (/etc/rc.d/init.d/network)
   Active: failed (Result: exit-code) since Sun 2017-10-22 04:48:47 PDT; 45s ago
  Process: 2768 ExecStop=/etc/rc.d/init.d/network stop (code=exited, status=0/SUCCESS)
  Process: 2928 ExecStart=/etc/rc.d/init.d/network start (code=exited, status=1/FAILURE)

Oct 22 04:48:46 centos7 network[2928]: Could not load file '/etc/sysconfig/network-scripts/ifcfg-lo'
Oct 22 04:48:46 centos7 network[2928]: Could not load file '/etc/sysconfig/network-scripts/ifcfg-lo'
Oct 22 04:48:46 centos7 network[2928]: [  OK  ]
Oct 22 04:48:47 centos7 network[2928]: Bringing up interface enp0s3:  Connection successfully activated (D-Bus active path: /...tion/2)
Oct 22 04:48:47 centos7 network[2928]: [  OK  ]
Oct 22 04:48:47 centos7 network[2928]: Bringing up interface eth1:  ERROR    : [/etc/sysconfig/network-scripts/ifup-eth] Devi...zation.
Oct 22 04:48:47 centos7 network[2928]: [FAILED]
Oct 22 04:48:47 centos7 systemd[1]: network.service: control process exited, code=exited status=1
Oct 22 04:48:47 centos7 systemd[1]: Failed to start LSB: Bring up/down networking.
Oct 22 04:48:47 centos7 systemd[1]: Unit network.service entered failed state.
Hint: Some lines were ellipsized, use -l to show in full.

なんのことはなく、インターフェース名が違うだけだった。

3: enp0s8: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 08:00:27:50:f8:3a brd ff:ff:ff:ff:ff:ff
    inet 192.168.56.102/24 brd 192.168.56.255 scope global dynamic enp0s8
       valid_lft 684sec preferred_lft 684sec
    inet6 fe80::a00:27ff:fe50:f83a/64 scope link
       valid_lft forever preferred_lft forever

/etc/sysconfig/network-scripts/ifcfg-enp0s8を作成すればいけた。

完全にバグなので早く直ってほしい、、、