首页 > 代码库 > cloud-init 问题小记
cloud-init 问题小记
1. 使用ConfigDrive的场景下,NetworkManager会overwrite DNS
1 # /etc/NetworkManager/NetworkManager.conf 2 [main] 3 dns=none
https://ma.ttias.be/centos-7-networkmanager-keeps-overwriting-etcresolv-conf/
2.安装cloud-init
1.源安装:http://www.ibm.com/support/knowledgecenter/SSB27U_6.3.0/com.ibm.zvm.v630.hcpo4/instslesmore.htm
2.rpm包安装
a.生成rpm包,cloud-init/packages/brpm
b.yum install cloud-init-0.7.7-1.el7.centos.noarch.rpm
3. Nova 使用configDrive
#1.nova启用ConfigDrive nova boot --config-drive true --flavor m1.small --image centos6 --nic net-id=xxxxxxxx --key-name controller --user-data ./my-user-data.txt instance-003 #2.查看configDrive配置 mkdir -p /mnt/config mount /dev/disk/by-label/config-2 /mnt/config #3.configdrive #cloud-config chpasswd: list: | centos:passw0rd expire: False ssh_pwauth: True hostname: host001 runcmd: - [ service, ssh, restart ] #!/bin/sh passwd centos<<EOF passw0rd passw0rd EOF sed -i ‘s/PasswordAuthentication no/PasswordAuthentication yes/g‘ /etc/ssh/sshd_config service ssh restart
cloud-init 问题小记
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。