在虚拟机中运行 Ubuntu Server 12.04(或更高版本)。重启。Cloud-init 继续工作。然后安装 xubuntu-desktop。然后重启;您将看到现在到链路本地 IPv4 地址(169.254.169.254)的路由已中断,这会导致 cloud-init 中断。详情如下。
以下是安装 xubuntu-desktop 之前成功重启的摘录:
...
cloud-init start-local running: Fri, 28 Mar 2014 15:24:45 +0000. up 3.46 seconds
no instance data found in start-local
ci-info: lo : 1 127.0.0.1 255.0.0.0 .
ci-info: eth0 : 1 10.10.0.136 255.255.0.0 fa:63:63:c3:0c:b0
ci-info: route-0: 0.0.0.0 10.10.0.1 0.0.0.0 eth0 UG
ci-info: route-1: 10.10.0.0 0.0.0.0 255.255.0.0 eth0 U
cloud-init start running: Fri, 28 Mar 2014 15:24:45 +0000. up 3.99 seconds
found data source: DataSourceEc2
Skipping profile in /etc/apparmor.d/disable: usr.sbin.rsyslogd
* Starting AppArmor profiles [80G [74G[ OK ]
landscape-client is not configured, please run landscape-config.
* Stopping System V initialisation compatibility[74G[ OK ]
* Starting System V runlevel compatibility[74G[ OK ]
* Starting regular background program processing daemon[74G[ OK ]
* Starting save kernel messages[74G[ OK ]
* Starting deferred execution scheduler[74G[ OK ]
* Starting ACPI daemon[74G[ OK ]
* Starting automatic crash report generation[74G[ OK ]
* Stopping save kernel messages[74G[ OK ]
* Starting CPU interrupts balancing daemon[74G[ OK ]
* Stopping System V runlevel compatibility[74G[ OK ]
* Starting execute cloud user/final scripts[74G[ OK ]
cloud-init boot finished at Fri, 28 Mar 2014 15:24:58 +0000. Up 16.74 seconds
...
现在,这是安装 xubuntu-desktop 后重启的摘录:
...
cloud-init start-local running: Fri, 28 Mar 2014 18:39:24 +0000. up 5.10 seconds
no instance data found in start-local
ci-info: lo : 1 127.0.0.1 255.0.0.0 .
ci-info: eth0 : 1 10.10.0.136 255.255.0.0 fa:63:63:c3:0c:b0
ci-info: route-0: 0.0.0.0 10.10.0.1 0.0.0.0 eth0 UG
ci-info: route-1: 10.10.0.0 0.0.0.0 255.255.0.0 eth0 U
ci-info: route-2: 169.254.0.0 0.0.0.0 255.255.0.0 eth0 U
cloud-init start running: Fri, 28 Mar 2014 18:39:25 +0000. up 5.90 seconds
2014-03-28 18:39:28,821 - util.py[WARNING]: 'http://169.254.169.254/2009-04-04/meta-data/instance-id' failed [3/120s]: url error [[Errno 113] No route to host]
(你可以想象,接下来会发生很多糟糕的事情)
这里出了什么问题?我该如何解决?