Cloud-init 日志

Cloud-init 日志

我正在尝试从我准备的自定义 VHD 运行 Ubuntu Linux VM。我配置了 VM,但 Vm 代理和 cloud-init 似乎存在一些问题。

  • 启动时未设置主机名/DNS
  • Cloud-init 日志显示“未找到实例数据源!可能即将发生糟糕的事情!”
  • 门户显示 Linux VM 代理不可访问但实际上它正在运行。

Cloud-init 日志

2017-10-17 03:37:12,127 - util.py[DEBUG]: Attempting to remove /var/lib/cloud/instance 2017-10-17 03:37:12,132 - stages.py[DEBUG]: Using distro class <class 'cloudinit.distros.ubuntu.Distro'> 2017-10-17 03:37:12,132 - __init__.py[DEBUG]: Looking for for data source in: ['Azure'], via packages ['', 'cloudinit.sources'] that matches dependencies ['FILESYSTEM', 'NETWORK'] 2017-10-17 03:37:12,191
- __init__.py[DEBUG]: Searching for network data source in: [] 2017-10-17 03:37:12,192 - util.py[WARNING]: No instance datasource found! Likely bad things to come! 2017-10-17 03:37:12,199 - util.py[DEBUG]: No instance datasource found! Likely bad things to come! Traceback (most recent call last):   File "/usr/lib/python3/dist-packages/cloudinit/cmd/main.py", line 331, in main_init
    init.fetch(existing=existing)   File "/usr/lib/python3/dist-packages/cloudinit/stages.py", line 349, in fetch
    return self._get_data_source(existing=existing)   File "/usr/lib/python3/dist-packages/cloudinit/stages.py", line 259, in
_get_data_source
    pkg_list, self.reporter)   File "/usr/lib/python3/dist-packages/cloudinit/sources/__init__.py", line 333, in find_source
    raise DataSourceNotFoundException(msg) cloudinit.sources.DataSourceNotFoundException: Did not find any data source, searched classes: ()

Waagent 日志

2017/10/20 05:10:31.059647 INFO Waiting for cloud-init to copy ovf-env.xml to /var/lib/waagent/ovf-env.xml [2 retries remaining, sleeping 5s]
2017/10/20 05:10:31.109442 WARNING cloud-init does not appear to be running
2017/10/20 05:10:36.140473 ERROR Provisioning failed: [000004] Giving up, ovf-env.xml was not copied to /var/lib/waagent/ovf-env.xml after 1800s
2017/10/20 05:10:36.202700 INFO Detect protocol endpoints
2017/10/20 05:10:36.222987 INFO Clean protocol

感谢任何帮助。

谢谢

房车

答案1

将 /etc/waagent.conf 更改为

Provisioning.Enabled=n
ResourceDisk.Format=n

运行命令取消配置命令

 # sudo waagent -deprovision

关闭虚拟机并捕获虚拟机映像,然后从捕获的映像创建新的虚拟机

相关内容