这篇文章主要为大家展示了“openstack命令有哪些”,内容简而易懂,条理清晰,希望能够帮助大家解决疑惑,下面让小编带领大家一起研究并学习一下“openstack命令有哪些”这篇文章吧。
1. rabbitmq 消息队列
rabbitmqctl list_queues
rabbitmq-server
2. keystone
keystone user-list
keystone endpoint-list
keystone role-list
keystone service-list
keystone tenant-list
keystone tenant-get ID
ps -ef | grep -i keystone-all
grep ERROR /var/log/keystone/keystone.log
3. Glance
glance add name="Ubuntu 12.04 cloudimg amd64" is_public=true container_format=ovf disk_format=qcow2 < /root/precise-server-cloudimg-amd64-disk1.img
glance index
nova image-list
glance show ID
4. Nova
nova-manage service list
nova image-list
4.1虚拟机
nova list
nova delete ID
nova flavor-list
nova keypair-add oskey > oskey.priv
chmod 600 oskey.priv
nova boot --flavor 2 --key_name oskey --image ea3ffba1-065e-483f-bfe2-c84184ee76be test1
4.2 flating IP
nova floating-ip-list
nova add-floating-ip 7eb1d4b3-13fa-4e39-be17-3a27eb0db218 10.1.199.33
nova remove-floating-ip ID 10.1.199.33
4.3安全组
nova secgroup-add-rule default tcp 22 22 0.0.0.0/0
nova secgroup-add-rule default icmp -1 -1 0.0.0.0/0
nova secgroup-list
nova secgroup-list-rules default
4.4完整创建一个虚拟机的流程
nova keypair-add oskey > oskey.priv
chmod 600 oskey.priv
nova flavor-list
nova image-list
nova boot --flavor 2 --key_name oskey --image ea3ffba1-065e-483f-bfe2-c84184ee76be test1
nova secgroup-add-rule default tcp 22 22 0.0.0.0/0
nova secgroup-add-rule default icmp -1 -1 0.0.0.0/0
4.5 Volume
nova volume-create --display_name "test volume" 10
nova volume-list
( ID是虚拟机的id,后面的1,是volume的ID)添加完后可以通过 nova volume-list查看结果
nova volume-attach 7eb1d4b3-13fa-4e39-be17-3a27eb0db218 1 /dev/vdc
ubuntu
@test1 :~$ cat /proc/partitions
major minor #blocks name
253 0 10485760 vda
253 1 10474380 vda1
253 16 20971520 vdb
253 32 10485760 vdc
sudo mkfs.ext4 /dev/vdc
sudo mkdir -p /mnt/volume
sudo mount /dev/vdc /mnt/volume
nova volume-detach VM_ID Volume_ID
nova image-create 7eb1d4b3-13fa-4e39-be17-3a27eb0db218 "snapshot 1"
4.6 NoVNC
nova get-vnc-console myserver20 novnc
netstat -ltunp | grep 6080
5. 各项服务启动
sudo nova-manage db sync
for svc in keystone glance-api glance-registry nova-api nova-objectstore nova-volume nova-scheduler nova-cert nova-novncproxy; do sudo service openstack-$svc start ; sudo chkconfig openstack-$svc on ; done
for svc in compute network metadata-api; do sudo service openstack-nova-$svc start ; sudo chkconfig openstack-nova-$svc on ; done
nova-manage service list
以上是“openstack命令有哪些”这篇文章的所有内容,感谢各位的阅读!相信大家都有了一定的了解,希望分享的内容对大家有所帮助,如果还想学习更多知识,欢迎关注天达云行业资讯频道!