2

OpenStack · 启动一个 CentOS 7 实例

 2 years ago
source link: https://blog.triplez.cn/posts/launch-a-centos-7-instance/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

下载 CentOS 7 云镜像#

这里找到一个合适版本的云镜像并下载到服务器上。

新建镜像#

导入 admin 环境变量:

$ . admin-openrc

上传 CentOS 7 镜像:

$ openstack image create "CentOS-7-64bit" --file YOUR_CENTOS_IMAGE --disk-format qcow2 --container-format bare --public

查看镜像列表:

$ openstack image list

启动 CentOS 7 实例#

通过控制面板启动#

demo 用户登录 http://controller/dashboard ,在 Project -> Compute -> Instances 中点击 Launch instance

openstack-compute-instances.png

其他配置自行填写,在 Source 中要选择 CentOS-7-64bit

Configuration 一栏中编写启动脚本,更改默认密码。

#!/bin/sh
passwd root<<EOF
YOUR_ROOT_PASSWORD
YOUR_ROOT_PASSWORD
EOF

YOUR_ROOT_PASSWORD 替换为需要的 root 密码。

openstack-launch-instance-configuration.png

如果不这样做,就登不进去 CentOS7…… 可能是 cloud-init 套件导致的。


知识共享许可协议
本作品采用知识共享署名-相同方式共享 4.0 国际许可协议进行许可。

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK