当前位置: > Ubuntu >

给ubuntu/centos/fedora cloud image设置root密码--inject password

时间:2015-10-15 15:53来源:linux.it.net.cn 作者:IT

wKioL1ON0YuQZLz8AAGMjHUnzuo724.jpg

1. aptitude -y install libguestfs-tools
 


 

2. guestfish --rw -a ubuntu-14.04-server-cloudimg-amd64-disk1.img
><fs> run
><fs> list-filesystems
/dev/sda1: ext4
><fs> mount /dev/sda1 /

><fs> edit /etc/ssh/sshd_config

PermitRootLogin yes
 

PasswordAuthentication yes
 

><fs> exit


 

3. on Horizon node (normally controller node)

vi /etc/openstack-dashboard/local_settings.py

OPENSTACK_HYPERVISOR_FEATURE = {
...
'can_set_password': True,
}


 

service apache2 restart; service memcached restart


 

4. on compute nodes:

vi /etc/nova/nova.conf

[libvirt]
inject_password=true


 

service nova-compute restart


 

5. now when you launch instance, you can set root password within dashboard

wKiom1OhQwXAt1rAAAE7B7NyoUo416.jpg


 

6. then you can login with publickey or root

(责任编辑:IT)
------分隔线----------------------------
栏目列表
推荐内容