背景:
openstack juno版本,使用glance創建centos7鏡像,然后生成虛擬機。
操作步驟:
首先獲取鏡像http://cloud.centos.org/centos/7/images/CentOS-7-x86_64-GenericCloud-1503.qcow2
wget -P /tmp/images http://cloud.centos.org/centos/7/images/CentOS-7-x86_64-GenericCloud-1503.qcow2
創建鏡像glance image-create --name "cirros-0.3.3-x86_64" --file /tmp/images/CentOS-7-x86_64-GenericCloud-1503.qcow2 --disk-format qcow2 --container-format bare --is-public
True --progress
然后在dashboard上創建虛擬機,但是使用這個鏡像創建完虛擬機后我不知道root的登錄密碼。
最后解決辦法是在創建虛擬機的時候執行修改密碼的腳步如圖:
#!/bin/sh passwd root<<EOF 123456 123456 EOF
然后在登錄到虛擬機就可以了