重启后我的实例没有连接到网络,连接到串口我可以看到错误:
原文链接:https://www.f2er.com/ubuntu/347613.html[ 1415.293774] cloud-init[31802]: Cloud-init v. 0.7.7 running 'init' at Tue,28 Jun 2016 09:51:02 +0000. Up 1415.24 seconds. [ 1415.294047] cloud-init[31802]: ci-info: +++++++++++++++++++++++++++Net device info++++++++++++++++++++++++++++ [ 1415.294140] cloud-init[31802]: ci-info: +--------+-------+-----------+-----------+-------+-------------------+ [ 1415.294226] cloud-init[31802]: ci-info: | Device | Up | Address | Mask | Scope | Hw-Address | [ 1415.294319] cloud-init[31802]: ci-info: +--------+-------+-----------+-----------+-------+-------------------+ [ 1415.294404] cloud-init[31802]: ci-info: | ens4 | False | . | . | . | 42:01:0a:84:00:02 | [ 1415.294487] cloud-init[31802]: ci-info: | lo | True | 127.0.0.1 | 255.0.0.0 | . | . | [ 1415.294572] cloud-init[31802]: ci-info: | lo | True | ::1/128 | . | host | . | [ 1415.294654] cloud-init[31802]: ci-info: +--------+-------+-----------+-----------+-------+-------------------+ [ 1415.294735] cloud-init[31802]: 2016-06-28 09:51:02,536 - util.py[WARNING]: Failed of stage init Jun 28 09:51:02 demo-project cloud-init[31802]: Cloud-init v. 0.7.7 running 'init' at Tue,28 Jun 2016 09:51:02 +0000. Up 1415.24 seconds. Jun 28 09:51:02 demo-project cloud-init[31802]: ci-info: +++++++++++++++++++++++++++Net device info++++++++++++++++++++++++++++ Jun 28 09:51:02 demo-project cloud-init[31802]: ci-info: +--------+-------+-----------+-----------+-------+-------------------+ Jun 28 09:51:02 demo-project cloud-init[31802]: ci-info: | Device | Up | Address | Mask | Scope | Hw-Address | Jun 28 09:51:02 demo-project cloud-init[31802]: ci-info: +--------+-------+-----------+-----------+-------+-------------------+ Jun 28 09:51:02 demo-project cloud-init[31802]: ci-info: | ens4 | False | . | . | . | 42:01:0a:84:00:02 | Jun 28 09:51:02 demo-project cloud-init[31802]: ci-info: | lo | True | 127.0.0.1 | 255.0.0.0 | . | . | Jun 28 09:51:02 demo-project cloud-init[31802]: ci-info: | lo | True | ::1/128 | . | host | . | Jun 28 09:51:02 demo-project cloud-init[31802]: ci-info: +--------+-------+-----------+-----------+-------+-------------------+ Jun 28 09:51:02 demo-project cloud-init[31802]: 2016-06-28 09:51:02,536 - util.py[WARNING]: Failed of stage init [ 1415.298376] cloud-init[31802]: Failed run of stage init [ 1415.298487] cloud-init[31802]: ------------------------------------------------------------ [ 1415.298591] cloud-init[31802]: Traceback (most recent call last): [ 1415.298678] cloud-init[31802]: File "/usr/bin/cloud-init",line 520,in status_wrapper [ 1415.298763] cloud-init[31802]: ret = functor(name,args) [ 1415.298847] cloud-init[31802]: File "/usr/bin/cloud-init",line 250,in main_init [ 1415.298929] cloud-init[31802]: init.fetch(existing=existing) [ 1415.299010] cloud-init[31802]: File "/usr/lib/python3/dist-packages/cloudinit/stages.py",line 322,in fetch [ 1415.299096] cloud-init[31802]: return self._get_data_source(existing=existing) [ 1415.299178] cloud-init[31802]: File "/usr/lib/python3/dist-packages/cloudinit/stages.py",line 241,in _get_data_source [ 1415.299267] cloud-init[31802]: util.del_file(self.paths.instance_link) [ 1415.299454] cloud-init[31802]: File "/usr/lib/python3/dist-packages/cloudinit/util.py",line 1567,in del_file [ 1415.299542] cloud-init[31802]: raise e [ 1415.299624] cloud-init[31802]: File "/usr/lib/python3/dist-packages/cloudinit/util.py",line 1564,in del_file [ 1415.299704] cloud-init[31802]: os.unlink(path) [ 1415.299785] cloud-init[31802]: IsADirectoryError: [Errno 21] Is a directory: '/var/lib/cloud/instance' [ 1415.299867] cloud-init[31802]: ------------------------------------------------------------ Jun 28 09:51:02 demo-project cloud-init[31802]: Failed run of stage init Jun 28 09:51:02 demo-project cloud-init[31802]: ------------------------------------------------------------ Jun 28 09:51:02 demo-project cloud-init[31802]: Traceback (most recent call last): Jun 28 09:51:02 demo-project cloud-init[31802]: File "/usr/bin/cloud-init",in status_wrapper Jun 28 09:51:02 demo-project cloud-init[31802]: ret = functor(name,args) Jun 28 09:51:02 demo-project cloud-init[31802]: File "/usr/bin/cloud-init",in main_init Jun 28 09:51:02 demo-project cloud-init[31802]: init.fetch(existing=existing) Jun 28 09:51:02 demo-project cloud-init[31802]: File "/usr/lib/python3/dist-packages/cloudinit/stages.py",in fetch Jun 28 09:51:02 demo-project cloud-init[31802]: return self._get_data_source(existing=existing) Jun 28 09:51:02 demo-project cloud-init[31802]: File "/usr/lib/python3/dist-packages/cloudinit/stages.py",in _get_data_source Jun 28 09:51:02 demo-project cloud-init[31802]: util.del_file(self.paths.instance_link) Jun 28 09:51:02 demo-project cloud-init[31802]: File "/usr/lib/python3/dist-packages/cloudinit/util.py",in del_file Jun 28 09:51:02 demo-project cloud-init[31802]: raise e Jun 28 09:51:02 demo-project cloud-init[31802]: File "/usr/lib/python3/dist-packages/cloudinit/util.py",in del_file Jun 28 09:51:02 demo-project cloud-init[31802]: os.unlink(path) Jun 28 09:51:02 demo-project cloud-init[31802]: IsADirectoryError: [Errno 21] Is a directory: '/var/lib/cloud/instance' Jun 28 09:51:02 demo-project cloud-init[31802]: ------------------------------------------------------------ Job for cloud-init.service Failed because the control process exited with error code. See "systemctl status cloud-init.service" and "journalctl -xe" for details.
在串口上我有这个错误:
Jun 28 09:52:14 demo-project google: Waiting for Metadata server,attempt 859 Jun 28 09:52:14 demo-project google: There is likely a problem with the network. ● cloud-init.service - Initial cloud-init job (Metadata service crawler) Loaded: loaded (/lib/systemd/system/cloud-init.service; enabled; vendor prese Active: Failed (Result: exit-code) since Tue 2016-06-28 09:51:02 UTC; 1min 45 Process: 31802 ExecStart=/usr/bin/cloud-init init (code=exited,status=1/FAILU Main PID: 31802 (code=exited,status=1/FAILURE)
我怎样才能解决这个问题?