Ubuntu 16.04 Images Report Errors About EC2 Metadata Service

启动时,某些较旧的Ubuntu 16.04实例可能显示以下警告:

**************************************************************************
# This system is using the EC2 Metadata Service, but does not appear to  #
# be running on Amazon EC2 or one of cloud-init's known platforms that   #
# provide a EC2 Metadata service. In the future, cloud-init may stop     #
# reading metadata from the EC2 Metadata Service unless the platform can #
# be identified.                                                         #
#                                                                        #
# If you are seeing this message, please file a bug against              #
# cloud-init at                                                          #
#    https://bugs.launchpad.net/cloud-init/+filebug?field.tags=dsid      #
# Make sure to include the cloud provider your instance is               #
# running on.                                                            #
#                                                                        #
# For more information see                                               #
#   https://bugs.launchpad.net/bugs/1660385                              #
#                                                                        #
# After you have filed a bug, you can disable this warning by            #
# launching your instance with the cloud-config below, or                #
# putting that content into                                              #
#    /etc/cloud/cloud.cfg.d/99-ec2-datasource.cfg                        #
#                                                                        #
# #cloud-config                                                          #
# datasource:                                                            #
#  Ec2:                                                                  #
#   strict_id: false                                                     #
**************************************************************************

发生这种情况是由于Ubuntu对cloud-init进行了更改。详细信息可以在这里找到。

Vultr实例曾经使用cloud-init来执行一些初始设置任务,但我们在2016年末停止使用该程序进行新部署。如果您使用的是2016年创建的快照或从2016年开始运行Ubuntu 16.04实例,则可能仍然已安装cloud-init。

有几种解决警告的方法:

  • 如果您从经常部署的快照中看到警告,建议您从全新安装中重新创建快照。
  • 如果您在运行实例上看到警告,建议您使用删除cloud-init apt-get remove cloud-init
  • 如果您依赖cloud-init,则可以按照错误消息末尾记录的说明来禁止显示此消息。
cloud-init
cloud-init
滚动至顶部