ICOS CLI 常用命令 ---持续更新

日志存放位置
/var/lib/docker/volumes/kolla_logs/_data
OpenStack 导出镜像:
查看镜像列表:
glance image-list
glance image-download --file /tmp/filename uuid
 
更新镜像元数据
glance image-update 镜像ID --property hw_qemu_guest_agent="yes"
查看计算节点列表:
openstack  compute service list
nova hypervisor-list
认证(keystone)
openstack user list
openstack catalog list
镜像(glance)
openstack image list
openstack image delete IMAGEID
openstack image show IMAGEID
openstack image set IMAGEID
openstack image create --container-format bare --disk-format qcow2 --file /tmp/Auto_Ubuntu1604_Ver1.qcow2 --public Ubuntu1604
计算(nova)
openstack server list
openstack image list
查看云主机列表:
openstack server list
 
查看云主机详情:
openstack server show NAME/UUID
 
查看云主机控制台日志:
openstack console log show NAME/UUID
 
安全组(security)
openstack help security
openstack security group create
openstack security group delete
openstack  security group list
openstack security group rule create
openstack security group rule delete
openstack security group rule list
openstack security group rule show
openstack security group set
openstack security group show
openstack security group unset
创建安全组
openstack security group create MyTest
增加规则(ICMP:允许Ping)
openstack security group rule create --protocol tcp --dst-port 22 MyTest
openstack security group rule create --remote-ip 0.0.0.0/0 --protocol icmp --ingress MyTest
参数说明:
--remote-ip <ip-address>    远程IP地址块(可以使用CIDR表示法; IPv4规则的默认值:0.0.0.0/0)
--remote-group <group>      远程安全组(名称或ID)   
--dst-port <port-range>    目标端口,可以是单个端口,也可以是起始端口和结束端口范围:137:139。IP协议TCP和UDP必需。忽略ICMP IP协议。
--protocol <protocol>    IP协议(icmp,tcp,udp;默认值:tcp)
--ingress    入口
--egress    出口
--ethertype <ethertype>    网络流量的以太网类型(IPv4,IPv6;默认值:基于IP协议)
--project <project>    项目
--project-domain <project-domain>    项目域
--description <description>    描述
<group>    安全组名
创建云主机
openstack server create --image 7d11e893-abbf-4078-aadf-659a901d26d2 --flavor m1.tiny  --nic net-id=dc97bbd5-c052-440d-aabb-1ec2c5664b47 --wait TestVM001 --debug
卷(cinder)
卷列表:
openstack volume list
cinder list                 //列出所有volumes
cinder type-list            //列出所有volume类型
cinder snapshot-list        //列出所有快照snapshot
cinder backup-list          //列出所有备份backup
cinder qos-list             //列出所有qos
cinder service-list         //列出所有服务
cinder transfer-list        //列出所有transfer
cinder list-extensions      //列出所有扩展extensions
 
卷创建:
cinder create <size> --dispaly-name --volume-type   //创建volume
cinder snapshot-create <volume> --dispaly-name      //创建快照
cinder backup-create <volume> --dispaly-name        //创建备份
cinder qos-create <name> <key=value>                //创建qos
cinder type-create <name>                           //创建类型
cinder transfer-create <volume> --dispaly-name      //创建传输
卷详情:
cinder show <volume>                    //显示volume详情
cinder metadata-show <volume>           //显示volume下元数据
cinder backup-show <backup>             //显示backup详情
cinder qos-show <qos>                   //显示qos详情
cinder snapshot-show <snapshot>         //显示快照详情
cinder snapshot-metadata-show <snapshot>//显示快照元数据详情
cinder transfer-show <transfer>         //显示传输详情
cinder quota-show <tenant_id>           //显示一个租户下面的quota详情
 
卷删除:
cinder delete <volume>                  //删除volume
cinder force-delete <volume>            //强制删除volume
cinder backup-delete <backup>           //删除备份
cinder qos-delete <qos_specs> --force <True|False>      //删除qos
cinder quota-delete <tenant_id>         //删除租户下的quota
cinder snapshot-delete <snapshot>       //删除快照
cinder type-delete <id>                 //删除类型
cinder transfer-delete <transfer>       //删除传输
 
一般情况下的卷操作:
cinder list                                         //列出所有volumes
cinder create <size> --dispaly-name --volume-type   //创建volume
cinder show <volume>                                //显示volume详情
cinder delete <volume>                              //删除volume
cinder migrate [--force-host-copy <True|False>]
                     <volume> <host>                //迁移
cinder rename [--display-description <display-description>]
                     <volume> [<display-name>]      //重命名
cinder reset-state <volume> --state <state>         //重置状态
cinder set-bootable <volume> <TRUE|FALSE>           //可启动
cinder endpoints                                    //发现endpoints
cinder credentials   //Shows user credentials returned from auth.
 
卷备份:
cinder backup-create <volume> --dispaly-name    //创建备份
cinder backup-delete <backup>                   //删除备份
cinder backup-list                              //列出备份
cinder backup-restore [--volume-id <volume>] <backup>      
                                                //重置备份
cinder backup-show <backup>                     //显示备份详情
 
卷快照:
snapshot-create     Creates a snapshot.
snapshot-delete     Remove one or more snapshots.
snapshot-list       Lists all snapshots.
snapshot-metadata   Sets or deletes snapshot metadata.
snapshot-metadata-show
                    Shows snapshot metadata.
snapshot-metadata-update-all
                    Updates snapshot metadata.
snapshot-rename     Renames a snapshot.
snapshot-reset-state
                    Explicitly updates the snapshot state.
snapshot-show       Shows snapshot details.
 
卷类型:
type-create         Creates a volume type.
type-delete         Deletes a specified volume type.
type-key            Sets or unsets extra_spec for a volume type.
type-list           Lists available 'volume types'.
 
 
卷QOS:
qos-associate       Associates qos specs with specified volume type.
qos-create          Creates a qos specs.
qos-delete          Deletes a specified qos specs.
qos-disassociate    Disassociates qos specs from specified volume type.
qos-disassociate-all
                    Disassociates qos specs from all associations.
qos-get-association
                    Gets all associations for specified qos specs.
qos-key             Sets or unsets specifications for a qos spec.
qos-list            Lists qos specs.
qos-show            Shows a specified qos specs.
 
 
卷quota:
quota-class-show    Lists quotas for a quota class.
quota-class-update  Updates quotas for a quota class.
quota-defaults      Lists default quotas for a tenant.
quota-delete        Delete the quotas for a tenant.
quota-show          Lists quotas for a tenant.
quota-update        Updates quotas for a tenant.
quota-usage         Lists quota usage for a tenant.
 
卷Transfer:
transfer-accept     Accepts a volume transfer.
transfer-create     Creates a volume transfer.
transfer-delete     Undoes a transfer.
transfer-list       Lists all transfers.
transfer-show       Show transfer details.
 
卷服务:
service-disable Disables the service. 
service-enable Enables the service. 
service-list Lists all services.
卷Encryption:
encryption-type-create    Creates encryption type for a volume type. Admin only.
encryption-type-delete    Deletes encryption type for a volume type. Admin only.
encryption-type-list      Shows encryption type details for volume types. Admin only.
encryption-type-show      Shows encryption type details for volume type. Admin only.
 
Neutron(网络)
neutron agent-list
posted @ 2021-06-02 14:49  sxy-cloud  阅读(196)  评论(0编辑  收藏  举报