一、在openstack上使用centos7 image 创建一个instance
1、创建flavor
openstack flavor create --id 8 --ram 1024 --disk 8 --vcpus 1 manila.centos
2、使用flavor 6创建 instance
二、修改镜像
1、安装nfs
yum install nfs-utils
2、修改nfs启动服务
systemctl enable rpcbind systemctl enable nfs-server ln -s /usr/lib/systemd/system/nfs-server.service /usr/lib/systemd/system/nfs-kernel-server.service systemctl daemon-reload systemctl status nfs-kernel-server
3、创建manila user
# 创建user user -m add manila cat /etc/sudoers.d/m Defaults:manila !requiretty manila ALL=(ALL) NOPASSWD:ALL # 将/etc/manila/ssh/id_rsa.pub注入到image的manila用户中 ssh-copy-id manila@instance_ip
三、关闭instance,将instance做成快照上传到glance中,快照名需要与manila share中配置一致
本文出自 “武陵荒草” 博客,请务必保留此出处http://penguintux.blog.51cto.com/3021117/1882175
原文地址:http://penguintux.blog.51cto.com/3021117/1882175