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
转载于:https://blog.51cto.com/hj192837/1427750