云初始化-nonet

云初始化-nonet

我遇到了论坛上有人指出的问题。但我发现每个人在使用虚拟机时都遇到了这个问题。我的情况是使用裸机:

当我启动机器时,我看到 cloud-init-nonet 正在等待网络。

--------------------------------
cloud-init-nonet[164.54]: gave up waiting for a network device.
Cloud-init v. 0.7.5 running 'init' at Sat, 11 Oct 2014 22:23:38 +0000. Up 164.77     seconds.
ci-info: +++++++++++++++++++++++Net device info+++++++++++++++++++++++
ci-info: +--------+------+-----------+-----------+-------------------+
ci-info: | Device |  Up  |  Address  |    Mask   |     Hw-Address    |
ci-info: +--------+------+-----------+-----------+-------------------+
ci-info: |   lo   | True | 127.0.0.1 | 255.0.0.0 |         .         |
ci-info: |  eth1  | True |     .     |     .     | 68:XX:ca:YY:09:50 |
ci-info: |  eth0  | True |     .     |     .     | 00:XX:8c:YY:c7:00 |
ci-info: +--------+------+-----------+-----------+-------------------+
ci-info: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!Route info failed!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
2014-10-12 00:25:44,469 - DataSourceMAAS.py[CRITICAL]: Giving up on md from ['http://172.16.0.40/MAAS/metadata//2012-03-01/meta-data/instance-id'] after 126 seconds
2014-10-12 00:25:44,469 - util.py[WARNING]: No instance datasource found! Likely bad things to come!
--------------------------------

几乎和这里看到的一样:

https://ask.openstack.org/en/question/28297/cloud-init-nonet-waiting-and-fails/

我也尝试在这个错误中解释:

https://bugs.launchpad.net/cloud-init/+bug/1345433

正如我在错误中所说的那样,在我看来,openvswitch 没有按顺序启动。但我不知道。也许只是我的网络配置在 openvswitch db 上中继。

我的配置相当简单 /etc/network/interfaces:

### This does nothing, but left here for future reference. It should work. It's supposed to be openvswitch support on startup
allow-ovs br-ext
iface br-ext inet manual
        ovs_type OVSBridge
        ovs_ports eth0


# The primary network interface
auto eth0
iface eth0 inet manual
        up ifconfig $IFACE 0.0.0.0 up
        up ip link set $IFACE promisc on
        down ip link set $IFACE promisc off
        down ifconfig $IFACE down

auto eth1
iface eth1 inet manual 
        up ifconfig $IFACE 0.0.0.0 up
        down ifconfig $IFACE down


#This also does nothing as br-int is not created when this script is executed
auto br-int
iface br-int inet dhcp

有没有人能帮忙解决这个问题?这真的让我的启动变得非常混乱,所以我正在考虑删除 MAAS 并在没有 cloud-init 的情况下重新安装。

答案1

这对我有用:

  1. 使用 :gui 通过 login/pass: vagrant/vagrant 登录
  2. 修改/etc/rc.local文件以sh /etc/init.d/networking restart包含exit 0
  3. 禁用 :gui
  4. vagrant up 或 vagrant reload

https://github.com/mitchellh/vagrant/issues/391#issuecomment-2078383

相关内容