openstack 創建鏡像生成虛擬機不知道密碼如何解決


背景:

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


 

然后在登錄到虛擬機就可以了


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM