openstack命令整理

本文档详细整理了OpenStack中nova、cinder、glance和neutron等关键组件的命令用法,包括服务器创建、网络操作、镜像管理、存储操作等,旨在帮助初学者快速上手OpenStack操作。
摘要由CSDN通过智能技术生成

初学,发现很多不熟悉的命令。整理这个是希望自己更熟悉。


nova命令

  • Command-line interface to the OpenStack Nova API.
  • Positional arguments:
    • add-fixed-ip Add new IP address on a network to server.
    • add-secgroup Add a Security Group to a server.
    • agent-create Create new agent build.
    • agent-delete Delete existing agent build.
    • agent-list List all builds.
    • agent-modify Modify existing agent build.
    • [aggregate 资源群集]
    • aggregate-add-host Add the host to the specified aggregate.
    • aggregate-create Create a new aggregate with the specified details.
    • aggregate-delete Delete the aggregate.
    • aggregate-list Print a list of all aggregates.
    • aggregate-remove-host Remove the specified host from the specified aggregate.
    • aggregate-set-metadata Update the metadata associated with the aggregate.
    • aggregate-show Show details of the specified aggregate.
    • aggregate-update Update the aggregate’s name and optionally availability zone.
    • availability-zone-list List all the availability zones.
    • backup Backup a server by creating a ‘backup’ type snapshot.
    • boot Boot a new server.
    • cell-capacities Get cell capacities for all cells or a given cell.
    • cell-show Show details of a given cell.
    • clear-password Clear the admin password for a server from the metadata server. This action does not actually change the instance server password.
    • cloudpipe-configure Update the VPN IP/port of a cloudpipe instance.
    • cloudpipe-create Create a cloudpipe instance for the given project.
    • cloudpipe-list Print a list of all cloudpipe instances.
    • console-log Get console log output of a server.
    • delete Immediately shut down and delete specified server(s).
    • diagnostics Retrieve server diagnostics.
    • dns-create DEPRECATED: Create a DNS entry for domain, name, and IP.
    • dns-create-private-domain DEPRECATED: Create the specified DNS domain.
    • dns-create-public-domain DEPRECATED: Create the specified DNS domain.
    • dns-delete DEPRECATED: Delete the specified DNS entry.
    • dns-delete-domain DEPRECATED: Delete the specified DNS domain.
    • dns-domains DEPRECATED: Print a list of available dns domains.
    • dns-list DEPRECATED: List current DNS entries for domain and IP or domain and name.
    • evacuate Evacuate server from failed host.
    • fixed-ip-get DEPRECATED: Retrieve info on a fixed IP.
    • fixed-ip-reserve DEPRECATED: Reserve a fixed IP.
    • fixed-ip-unreserve DEPRECATED: Unreserve a fixed IP.
    • [flavor 云主机类型]
    • flavor-access-add Add flavor access for the given tenant.
    • flavor-access-list Print access information about the given flavor.
    • flavor-access-remove Remove flavor access for the given tenant.
    • flavor-create Create a new flavor.
    • flavor-delete Delete a specific flavor
    • flavor-key Set or unset extra_spec for a flavor.
    • flavor-list Print a list of available ‘flavors’ (sizes of servers).
    • flavor-show Show details about the given flavor.
    • floating-ip-associate Associate a floating IP address to a server.
    • floating-ip-bulk-create DEPRECATED: Bulk create floating IPs by range (nova-network only).
    • floating-ip-bulk-delete DEPRECATED: Bulk delete floating IPs by range (nova-network only).
    • floating-ip-bulk-list DEPRECATED: List all floating IPs (nova-network only).
    • floating-ip-create DEPRECATED: Allocate a floating IP for the current tenant.
    • floating-ip-delete DEPRECATED: De-allocate a floating IP.
    • floating-ip-disassociate Disassociate a floating IP address from a server.
    • floating-ip-list DEPRECATED: List floating IPs.
    • floating-ip-pool-list DEPRECATED: List all floating IP pools.
    • force-delete Force delete a server.
    • get-mks-console Get an MKS console to a server. (Supported by API versions ‘2.8’ - ‘2.latest’) [hint: use ‘–os-compute-api-version’ flag to show help message for proper version]
    • get-password Get the admin password for a server. This operation calls the metadata service to query metadata information and does not read password information from the server itself.
    • get-rdp-console Get a rdp console to a server.
    • get-serial-console Get a serial console to a server.
    • get-spice-console Get a spice console to a server.
    • get-vnc-console Get a vnc console to a server.
    • host-action Perform a power action on a host.
    • host-describe Describe a specific host.
    • host-evacuate Evacuate all instances from failed host.
    • host-evacuate-live Live migrate all instances of the specified host to other available hosts.
    • host-list List all hosts by service.
    • host-meta Set or Delete metadata on all instances of a host.
    • host-servers-migrate Cold migrate all instances off the specified host to other available hosts.
    • host-update Update host settings.
    • hypervisor-list List hypervisors. (Supported by API versions ‘2.0’ - ‘2.latest’) [hint: use ‘–os-compute- api-version’ flag to show help message for proper version]
    • hypervisor-servers List servers belonging to specific hypervisors.
    • hypervisor-show Display the details of the specified hypervisor.
    • hypervisor-stats Get hypervisor statistics over all compute nodes.
    • hypervisor-uptime Display the uptime of the specified hypervisor.
    • image-create Create a new image by taking a snapshot of a running server.
    • image-delete DEPRECATED: Delete specified image(s).
    • image-list DEPRECATED: Print a list of available images to boot from.
    • image-meta DEPRECATED: Set or delete metadata on an image.
    • image-show DEPRECATED: Show details about the given image.
    • instance-action Show an action.
    • instance-action-list List actions on a server.
    • interface-attach Attach a network interface to a server.
    • interface-detach Detach a network interface from a server.
    • interface-list List interfaces attached to a server.
    • keypair-add Create a new key pair for use with servers.
    • keypair-delete Delete keypair given by its name. (Supported by API versions ‘2.0’ - ‘2.latest’) [hint: use ‘–os-compute-api-version’ flag to show help message for proper version]
    • keypair-list Print a list of keypairs for a user (Supported by API versions ‘2.0’ - ‘2.latest’) [hint: use ‘–os-compute-api-version’ flag to show help message for proper version]
    • keypair-show Show details about the given keypair. (Supported by API versions ‘2.0’ - ‘2.latest’) [hint: use ‘–os-compute-api-version’ flag to show help message for proper version]
    • limits Print rate and absolute limits.
    • list List active servers.
    • list-extensions List all the os-api extensions that are available.
    • list-secgroup List Security Group(s) of a server.
    • live-migration Migrate running server to a new machine.
    • live-migration-abort Abort an on-going live migration. (Supported by API versions ‘2.24’ - ‘2.latest’) [hint: use ‘–os-compute-api-version’ flag to show help message for proper version]
    • live-migration-force-complete Force on-going live migration to complete. (Supported by API versions ‘2.22’ - ‘2.latest’) [hint: use ‘–os-compute-api-version’ flag to show help message for proper version]
    • lock Lock a server. A normal (non-admin) user will not be able to execute actions on a locked server.
    • meta Set or delete metadata on a server.
    • migrate Migrate a server. The new host will be selected by the scheduler.
    • migration-list Print a list of migrations.
    • network-associate-host DEPRECATED: Associate host with network.
    • network-associate-project DEPRECATED: Associate project with network.
    • network-create DEPRECATED: Create a network.
    • network-delete DEPRECATED: Delete network by label or id.
    • network-disassociate DEPRECATED: Disassociate host and/or project from the given network.
    • network-list DEPRECATED: Print a list of available networks.
    • network-show DEPRECATED: Show details about the given network.
    • pause Pause a server.
    • quota-class-show List the quotas for a quota class.
    • quota-class-update Update the quotas for a quota class. (Supported by API versions ‘2.0’ - ‘2.latest’) [hint: use ‘–os-compute-api-version’ flag to show help message for proper version]
    • quota-defaults List the default quotas for a tenant.
    • quota-delete Delete quota for a tenant/user so their quota will Revert back to default.
    • quota-show List the quotas for a tenant/user.
    • quota-update Update the quotas for a tenant/user. (Supported by API versions ‘2.0’ - ‘2.latest’) [hint: use ‘–os-compute-api-version’ flag to show help message for proper version]
    • reboot Reboot a server.
    • rebuild Shutdown, re-image, and re-boot a server.
    • refresh-network Refresh server network information.
    • remove-fixed-ip Remove an IP address from a server.
    • remove-secgroup Remove a Security Group from a server.
    • rescue Reboots a server into rescue mode, which starts the machine from either the initial image or a specified image, attaching the current boot disk as secondary.
    • reset-network Reset network of a server.
    • reset-state Reset the state of a server.
    • resize Resize a server.
    • resize-confirm Confirm a previous resize.
    • resize-revert Revert a previous resize (and return to the previous VM).
    • restore Restore a soft-deleted server.
    • resume Resume a server.
    • scrub DEPRECATED: Delete networks and security groups associated with a project.
    • secgroup-add-default-rule DEPRECATED: Add a rule to the set of rules that will be added to the ‘default’ security group for new tenants (nova-network only).
    • secgroup-add-group-rule DEPRECATED: Add a source group rule to a security group.
    • secgroup-add-rule DEPRECATED: Add a rule to a security group.
    • secgroup-create DEPRECATED: Create a security group.
    • secgroup-delete DEPRECATED: Delete a security group.
    • secgroup-delete-default-rule DEPRECATED: Delete a rule from the set of rules that will be added to the ‘default’ security group for new tenants (nova-network only).
    • secgroup-delete-group-rule DEPRECATED: Delete a source group rule from a security group.
    • secgroup-delete-rule DEPRECATED: Delete a rule from a security group.
    • secgroup-list DEPRECATED: List security groups for the current tenant.
    • secgroup-list-default-rules DEPRECATED: List rules that will be added to the ‘default’ security group for new tenants.
    • secgroup-list-rules DEPRECATED: List rules for a security group.
    • secgroup-update DEPRECATED: Update a security group.
    • server-group-create Create a new server group with the specified details.
    • server-group-delete Delete specific server group(s).
    • server-group-get Get a specific server group.
    • server-group-list Print a list of all server groups.
    • server-migration-list Get the migrations list of specified server. (Supported by API versions ‘2.23’ - ‘2.latest’) [hint: use ‘–os-compute-api-version’ flag to show help message for proper version]
    • server-migration-show Get the migration of specified server. (Supported by API versions ‘2.23’ - ‘2.latest’) [hint: use ‘–os-compute-api-version’ flag to show help message for proper version]
    • server-tag-add Add one or more tags to a server. (Supported by API versions ‘2.26’ - ‘2.latest’) [hint: use ‘–os-compute-api-version’ flag to show help message for proper version]
    • server-tag-delete Delete one or more tags from a server. (Supported by API versions ‘2.26’ - ‘2.latest’) [hint: use ‘–os-compute-api-version’ flag to show help message for proper version]
    • server-tag-delete-all Delete all tags from a server. (Supported by API versions ‘2.26’ - ‘2.latest’) [hint: use ‘–os-compute-api-version’ flag to show help message for proper version]
    • server-tag-list Get list of tags from a server. (Supported by API versions ‘2.26’ - ‘2.latest’) [hint: use ‘–os-compute-api-version’ flag to show help message for proper version]
    • server-tag-set Set list of tags to a server. (Supported by API versions ‘2.26’ - ‘2.latest’) [hint: use ‘–os-compute-api-version’ flag to show help message for proper version]
    • service-delete Delete the service.
    • service-disable Disable the service.
    • service-enable Enable the service.
    • service-force-down Force service to down. (Supported by API versions ‘2.11’ - ‘2.latest’) [hint: use ‘–os-compute-api-version’ flag to show help message for proper version]
    • [service-list 服务列表]
    • service-list Show a list of all running services. Filter by host & binary.
    • set-password Change the admin password for a server.
    • shelve Shelve a server.
    • shelve-offload Remove a shelved server from the compute node.
    • show Show details about the given server.
    • ssh SSH into a server.
    • start Start the server(s).
    • stop Stop the server(s).
    • suspend Suspend a server.
    • trigger-crash-dump Trigger crash dump in an instance. (Supported by API versions ‘2.17’ - ‘2.latest’) [hint: use ‘–os-compute-api-version’ flag to show help message for proper version]
    • unlock Unlock a server.
    • unpause Unpause a server.
    • unrescue Restart the server from normal boot disk again.
    • unshelve Unshelve a server.
    • update Update the name or the description for a server.
    • [usage 查看某一个租户的云主机数量,CPU数量,ram大小,disk大小]
    • usage Show usage data for a single tenant.
    • usage-list List usage data for all tenants.
    • version-list List all API versions.
    • virtual-interface-list Show virtual interface info about the given server.
    • volume-attach Attach a volume to a server.
    • volume-attachments List all the volumes attached to a server.
    • volume-detach Detach a volume from a server.
    • volume-update Update volume attachment.
    • x509-create-cert Create x509 cert for a user in tenant.
    • x509-get-root-cert Fetch the x509 root cert.
    • bash-completion Prints all of the commands and options to stdout so that the nova.bash_completion script doesn’t have to hard code them.
    • help Display help about this program or one of its subcommands.
    • baremetal-interface-list DEPRECATED: List network interfaces as
  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值