△列出所有的虚拟机
nova list
△查看所有的nova image
nova image-list
△查看所有的nova volume
nova volume-list
△附加volume到虚拟机上
nova volume-attach SERVER-NAME-OR-ID VOLNAME DEVICE(DEVICE形如/dev/vda)
△从虚拟机上分离volume
nova volume-detach SERVER-NAME-OR-ID VOLNAME
△查看当前的虚拟机配置类型
nova flavor-list
△查看当前安全组
nova secgroup-list
△查看安全组的规则
nova secgroup-list-rules default
△查看某个虚拟机信息
nova show NAME-OR-ID
△查看申请flating IP列表
nova floating-ip-list
△删除虚拟机
nova delete NAME-OR-ID
△创建snapshot
nova image-create SERVER-ID "snapshot 1"
△查看snapshot
nova image-list
△挂起、恢复、重启虚拟机
nova suspend NAME-OR-ID
nova resume NAME-OR-ID
nova reboot NAME-OR-ID
△查看nova服务运行情况
nova-manage service list
△查看floating IP
nova-manage floating list
2 keystone△列出keystone用户
keystone user-list
△查看keystone服务
keystone service-list
△查看keystone的endpoint
keystone endpoint-list
△查看keystone的role
keystone role-list
△查看keystone租户
keystone tenant-list
△查看租户情况
keystone tenant-get ID
3 glance△列出全部镜像(比nova image-list更加详细)
glance index
△查看image具体信息(ID通过glance index查看获得)
glance show ID
4 cinder△显示存储卷列表(和nova volume-list命令功能相同)
cinder list
△显示存储卷类型列表
cinder type-list
△创建存储卷
cinder create --display-name VOLNAME SIZE(SIZE的单位为GB)
△删除存储卷
cinder delete VOLNAME-OR-ID
cinder force-delete VOLNAME-OR-ID(强制删除)
△重命名存储卷
cinder rename VOLNAME-OR-ID NEW-VOLNAME
△显示存储卷信息
cinder show VOLNAME-OR-ID
△存储卷元数据
cinder metadata VOLNAME-OR-ID set KEY=VALUE
cinder metadata VOLNAME-OR-ID unset KEY
△创建存储卷备份
cinder backup-create --display-name BACKUP-VOLNAME VOLNAME-OR-ID
△删除存储卷备份
cinder backup-delete VOLNAME-OR-ID
△显示存储卷备份信息
cinder backup-show VOLNAME-OR-ID
△显示存储卷备份列表
cinder backup-list
△创建存储卷快照
cinder snapshot-create --display-name SNAPSHOT-VOLNAME VOLNAME-OR-ID
△删除存储卷快照
cinder snapshot-delete VOLNAME-OR-ID
△重命名存储卷快照
cinder snapshot-rename VOLNAME-OR-ID NEW-VOLNAME
△显示存储卷快照信息
cinder snapshot-show VOLNAME-OR-ID
△显示存储卷快照列表
cinder snapshot-list
△上传存储卷作为镜像
cinder upload-to-image VOLNAME-OR-ID IMAGE-NAME-OR-ID
5 rabbitmq△查看rabbitmq队列
rabbitmqctl list_queues
6 其它△查看keystone进程
ps -ef | grep -i keystone-all
△查看keystone日志是否有错误
grep ERROR /var/log/keystone/keystone.log
△查看虚拟机里的volume情况
cat /proc/partitions
△完整创建一个虚拟机的流程
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