天天看點

CentOS7雲鏡像:注入執行個體的root密碼

預設OpenStack的Dashboard修改虛拟機的密碼的功能是關閉的,你需要enable。 1. 配置 can_set_password : [[email protected] ~]# vim /etc/openstack-dashboard/local_settings ...... OPENSTACK_HYPERVISOR_FEATURES = {     'can_set_mount_point': False,     'can_set_password':  True,     'requires_keypair': False, } ...... 重新開機 httpd 服務: [[email protected] ~]# systemctl restart httpd.service memcached.service

這時候你就可以看到設定管理者密碼的地方:

不過這個時候,你可能還是不能修改密碼。你需要修改計算節點的nova.conf檔案 [[email protected] ~]# vi /etc/nova/nova.conf ...... [libvirt] ...... # Inject the admin password at boot time, without an agent. (boolean value) inject_password=true ...... # The partition to inject to : -2 => disable, -1 => inspect (libguestfs only), # 0 => not partitioned, >0 => partition number (integer value) inject_partition=-1 ...... 重新開機服務:

[[email protected] ~]# systemctl restart libvirtd.service openstack-nova-compute.service

這樣,就可以在建立instance時,在‘管理者密碼’處設定root的密碼了。

繼續閱讀