给ubuntu/centos/fedora cloud image设置root密码--inject password
时间:2015-10-15 15:53 来源:linux.it.net.cn 作者:IT
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
6. then you can login with publickey or root
(责任编辑:IT)
1. aptitude -y install libguestfs-tools
2. guestfish --rw -a ubuntu-14.04-server-cloudimg-amd64-disk1.img ><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 = {
service apache2 restart; service memcached restart
4. on compute nodes: vi /etc/nova/nova.conf
[libvirt]
service nova-compute restart
5. now when you launch instance, you can set root password within dashboard
6. then you can login with publickey or root (责任编辑:IT) |