搜索

2.14. hammer 计算资源

download PDF

操作计算资源

Usage:
    hammer compute-resource [OPTIONS] SUBCOMMAND [ARG] ...

Parameters:
 SUBCOMMAND                    Subcommand
 [ARG] ...                     Subcommand arguments

Subcommands:
 associate-vms                 Associate VMs to Hosts
 clusters                      List available clusters for a compute resource
 create                        Create a compute resource
 delete, destroy               Delete a compute resource
 flavors                       List available flavors for a compute resource
 folders                       List available folders for a compute resource
 image                         View and manage compute resource's images
 images                        List available images for a compute resource
 info, show                    Show a compute resource
 list, index                   List all compute resources
 networks                      List available networks for a compute resource
 resource-pools                List resource pools for a compute resource cluster
 security-groups               List available security groups for a compute resource
 storage-domains               List storage domains for a compute resource
 storage-pods                  List storage pods for a compute resource
 update                        Update a compute resource
 virtual-machine               View and manage compute resource's virtual machines
 virtual-machines              List available virtual machines for a compute resource
 vnic-profiles                 List available vnic profiles for a compute resource, for RHEV only
 zones                         List available zone for a compute resource

Options:
 -h, --help                    Print help

2.14.1. hammer 计算资源关联-vms

将虚拟机与主机关联

Usage:
    hammer compute-resource associate-vms [OPTIONS]

Options:
 --id ID
 --location LOCATION_NAME                Set the current location context for the request
 --location-id LOCATION_ID               Set the current location context for the request
 --location-title LOCATION_TITLE         Set the current location context for the request
 --name NAME                             Compute resource name
 --organization ORGANIZATION_NAME        Set the current organization context for the request
 --organization-id ORGANIZATION_ID       Set the current organization context for the request
 --organization-title ORGANIZATION_TITLE Set the current organization context for the request
 -h, --help                              Print help

2.14.2. hammer 计算资源集群

列出计算资源的可用集群

Usage:
    hammer compute-resource clusters [OPTIONS]

Options:
 --fields FIELDS                         Show specified fields or predefined field sets only. (See below)
                                         Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
                                         JSON is acceptable and preferred way for complex parameters
 --id ID
 --location LOCATION_NAME                Set the current location context for the request
 --location-id LOCATION_ID               Set the current location context for the request
 --location-title LOCATION_TITLE         Set the current location context for the request
 --name NAME                             Compute resource name
 --organization ORGANIZATION_NAME        Set the current organization context for the request
 --organization-id ORGANIZATION_ID       Set the current organization context for the request
 --organization-title ORGANIZATION_TITLE Set the current organization context for the request
 -h, --help                              Print help

Predefined field sets:
  -------|-----|---------|-----
  FIELDS | ALL | DEFAULT | THIN
  -------|-----|---------|-----
  Id     | x   | x       | x
  Name   | x   | x       | x
  -------|-----|---------|-----

2.14.3. hammer 计算资源创建

创建计算资源

Usage:
    hammer compute-resource create [OPTIONS]

Options:
 --app-ident APP_IDENT                       Client ID for AzureRm
 --caching-enabled CACHING_ENABLED           Enable caching, for VMware only
                                             One of true/false, yes/no, 1/0.
 --cloud CLOUD                               Cloud
 --datacenter DATACENTER                     For RHEV, VMware Datacenter
 --description DESCRIPTION
 --display-type DISPLAY_TYPE                 For Libvirt and RHEV only
                                             Possible value(s): 'VNC', 'SPICE'
 --domain DOMAIN                             For RHEL OpenStack Platform (v3) only
 --email EMAIL                               Email for GCE only
 --key-path KEY_PATH                         Certificate path for GCE only
 --keyboard-layout KEYBOARD_LAYOUT           For RHEV only
                                             Possible value(s): 'ar', 'de-ch', 'es', 'fo', 'fr-ca', 'hu', 'ja', 'mk', 'no', 'pt-br', 'sv', 'da', 'en-gb', 'et', 'fr', 'fr-ch', 'is', 'lt', 'nl', 'pl', 'ru', 'th', 'de', 'en-us', 'fi', 'fr-be', 'hr', 'it', 'lv', 'nl-be', 'pt', 'sl', 'tr'
 --location LOCATION_NAME                    Set the current location context for the request
 --location-id LOCATION_ID                   Set the current location context for the request
 --location-ids LOCATION_IDS                 REPLACE locations with given ids
                                             Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
                                             JSON is acceptable and preferred way for complex parameters
 --location-title LOCATION_TITLE             Set the current location context for the request
 --location-titles LOCATION_TITLES           Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
                                             JSON is acceptable and preferred way for complex parameters
 --locations LOCATION_NAMES                  Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
                                             JSON is acceptable and preferred way for complex parameters
 --name NAME
 --organization ORGANIZATION_NAME            Set the current organization context for the request
 --organization-id ORGANIZATION_ID           Set the current organization context for the request
 --organization-ids ORGANIZATION_IDS         REPLACE organizations with given ids.
                                             Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
                                             JSON is acceptable and preferred way for complex parameters
 --organization-title ORGANIZATION_TITLE     Set the current organization context for the request
 --organization-titles ORGANIZATION_TITLES   Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
                                             JSON is acceptable and preferred way for complex parameters
 --organizations ORGANIZATION_NAMES          Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
                                             JSON is acceptable and preferred way for complex parameters
 --ovirt-quota OVIRT_QUOTA                   For RHEV only, ID or Name of quota to use
 --password PASSWORD                         Password for RHEV, EC2, VMware, RHEL OpenStack Platform. Secret key for EC2
 --project PROJECT                           Project id for GCE only
 --project-domain-id PROJECT_DOMAIN_ID       For RHEL OpenStack Platform (v3) only
 --project-domain-name PROJECT_DOMAIN_NAME   For RHEL OpenStack Platform (v3) only
 --provider PROVIDER                         Providers include Libvirt, Ovirt, EC2, Vmware, Openstack, GCE, AzureRm
 --public-key PUBLIC_KEY                     For RHEV only
 --public-key-path PUBLIC_KEY_PATH           Path to a file that contains oVirt public key (For oVirt only)
 --region REGION                             For AzureRm eg. 'eastus' and for EC2 only. Use 'us-gov-west-1' for EC2 GovCloud region
 --secret-key SECRET_KEY                     Client Secret for AzureRm
 --server SERVER                             For VMware
 --set-console-password SET_CONSOLE_PASSWORD For Libvirt and VMware only
                                             One of true/false, yes/no, 1/0.
 --sub-id SUB_ID                             Subscription ID for AzureRm
 --tenant TENANT                             For RHEL OpenStack Platform and AzureRm only
 --url URL                                   URL for Libvirt, RHEV and RHEL OpenStack Platform
 --user USER                                 Username for RHEV, EC2, VMware, RHEL OpenStack Platform. Access Key for EC2.
 --zone ZONE                                 For GCE only
 -h, --help                                  Print help

2.14.4. hammer 计算资源删除

删除计算资源

Usage:
    hammer compute-resource <delete|destroy> [OPTIONS]

Options:
 --id ID
 --location LOCATION_NAME                Set the current location context for the request
 --location-id LOCATION_ID               Set the current location context for the request
 --location-title LOCATION_TITLE         Set the current location context for the request
 --name NAME                             Compute resource name
 --organization ORGANIZATION_NAME        Set the current organization context for the request
 --organization-id ORGANIZATION_ID       Set the current organization context for the request
 --organization-title ORGANIZATION_TITLE Set the current organization context for the request
 -h, --help                              Print help

2.14.5. hammer 计算资源类型

列出计算资源的可用类别

Usage:
    hammer compute-resource flavors [OPTIONS]

Options:
 --fields FIELDS                         Show specified fields or predefined field sets only. (See below)
                                         Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
                                         JSON is acceptable and preferred way for complex parameters
 --id ID
 --location LOCATION_NAME                Set the current location context for the request
 --location-id LOCATION_ID               Set the current location context for the request
 --location-title LOCATION_TITLE         Set the current location context for the request
 --name NAME                             Compute resource name
 --organization ORGANIZATION_NAME        Set the current organization context for the request
 --organization-id ORGANIZATION_ID       Set the current organization context for the request
 --organization-title ORGANIZATION_TITLE Set the current organization context for the request
 -h, --help                              Print help

Predefined field sets:
  -------|-----|---------|-----
  FIELDS | ALL | DEFAULT | THIN
  -------|-----|---------|-----
  Id     | x   | x       | x
  Name   | x   | x       | x
  -------|-----|---------|-----

2.14.6. hammer 计算资源文件夹

列出计算资源的可用文件夹

Usage:
    hammer compute-resource folders [OPTIONS]

Options:
 --fields FIELDS                         Show specified fields or predefined field sets only. (See below)
                                         Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
                                         JSON is acceptable and preferred way for complex parameters
 --id ID
 --location LOCATION_NAME                Set the current location context for the request
 --location-id LOCATION_ID               Set the current location context for the request
 --location-title LOCATION_TITLE         Set the current location context for the request
 --name NAME                             Compute resource name
 --organization ORGANIZATION_NAME        Set the current organization context for the request
 --organization-id ORGANIZATION_ID       Set the current organization context for the request
 --organization-title ORGANIZATION_TITLE Set the current organization context for the request
 -h, --help                              Print help

Predefined field sets:
  -------|-----|---------|-----
  FIELDS | ALL | DEFAULT | THIN
  -------|-----|---------|-----
  Id     | x   | x       | x
  Name   | x   | x       | x
  -------|-----|---------|-----

2.14.7. hammer 计算资源镜像

查看并管理计算资源的镜像

Usage:
    hammer compute-resource image [OPTIONS] SUBCOMMAND [ARG] ...

Parameters:
 SUBCOMMAND                    Subcommand
 [ARG] ...                     Subcommand arguments

Subcommands:
 available                     Show images available for addition
 create                        Create an image
 delete, destroy               Delete an image
 info, show                    Show an image
 list, index                   List all images for a compute resource
 update                        Update an image

Options:
 -h, --help                    Print help

2.14.7.1. hammer 计算资源镜像可用

显示可用于添加的镜像

Usage:
    hammer compute-resource image available [OPTIONS]

Options:
 --compute-resource NAME                 Compute resource name
 --compute-resource-id ID
 --fields FIELDS                         Show specified fields or predefined field sets only. (See below)
                                         Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
                                         JSON is acceptable and preferred way for complex parameters
 --location LOCATION_NAME                Set the current location context for the request
 --location-id LOCATION_ID               Set the current location context for the request
 --location-title LOCATION_TITLE         Set the current location context for the request
 --organization ORGANIZATION_NAME        Set the current organization context for the request
 --organization-id ORGANIZATION_ID       Set the current organization context for the request
 --organization-title ORGANIZATION_TITLE Set the current organization context for the request
 -h, --help                              Print help

Predefined field sets:
  -------|-----|---------|-----
  FIELDS | ALL | DEFAULT | THIN
  -------|-----|---------|-----
  Name   | x   | x       | x
  Uuid   | x   | x       |
  -------|-----|---------|-----

2.14.7.2. hammer 计算资源镜像创建

创建镜像

Usage:
    hammer compute-resource image create [OPTIONS]

Options:
 --architecture ARCHITECTURE_NAME          Architecture name
 --architecture-id ARCHITECTURE_ID         ID of architecture
 --compute-resource COMPUTE_RESOURCE_NAME  Compute resource name
 --compute-resource-id COMPUTE_RESOURCE_ID
 --location LOCATION_NAME                  Set the current location context for the request
 --location-id LOCATION_ID                 Set the current location context for the request
 --location-title LOCATION_TITLE           Set the current location context for the request
 --name NAME
 --operatingsystem OPERATINGSYSTEM_TITLE   Operating system title
 --operatingsystem-id OPERATINGSYSTEM_ID   ID of operating system
 --organization ORGANIZATION_NAME          Set the current organization context for the request
 --organization-id ORGANIZATION_ID         Set the current organization context for the request
 --organization-title ORGANIZATION_TITLE   Set the current organization context for the request
 --password PASSWORD
 --user-data USER_DATA                     Whether or not the image supports user data
                                           One of true/false, yes/no, 1/0.
 --username USERNAME
 --uuid UUID                               Template ID in the compute resource
 -h, --help                                Print help

2.14.7.3. hammer 计算资源镜像删除

删除镜像

Usage:
    hammer compute-resource image <delete|destroy> [OPTIONS]

Options:
 --compute-resource COMPUTE_RESOURCE_NAME  Compute resource name
 --compute-resource-id COMPUTE_RESOURCE_ID
 --id ID
 --location LOCATION_NAME                  Set the current location context for the request
 --location-id LOCATION_ID                 Set the current location context for the request
 --location-title LOCATION_TITLE           Set the current location context for the request
 --name NAME                               Name to search by
 --organization ORGANIZATION_NAME          Set the current organization context for the request
 --organization-id ORGANIZATION_ID         Set the current organization context for the request
 --organization-title ORGANIZATION_TITLE   Set the current organization context for the request
 -h, --help                                Print help

2.14.7.4. hammer 计算资源镜像信息

显示镜像

Usage:
    hammer compute-resource image <info|show> [OPTIONS]

Options:
 --architecture ARCHITECTURE_NAME          Architecture name
 --architecture-id ARCHITECTURE_ID         ID of architecture
 --compute-resource COMPUTE_RESOURCE_NAME  Compute resource name
 --compute-resource-id COMPUTE_RESOURCE_ID ID of compute resource
 --fields FIELDS                           Show specified fields or predefined field sets only. (See below)
                                           Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
                                           JSON is acceptable and preferred way for complex parameters
 --id ID
 --location LOCATION_NAME                  Set the current location context for the request
 --location-id LOCATION_ID                 Set the current location context for the request
 --location-title LOCATION_TITLE           Set the current location context for the request
 --name NAME                               Name to search by
 --operatingsystem OPERATINGSYSTEM_TITLE   Operating system title
 --operatingsystem-id OPERATINGSYSTEM_ID   ID of operating system
 --organization ORGANIZATION_NAME          Set the current organization context for the request
 --organization-id ORGANIZATION_ID         Set the current organization context for the request
 --organization-title ORGANIZATION_TITLE   Set the current organization context for the request
 -h, --help                                Print help

Predefined field sets:
  -----------------|-----|---------|-----
  FIELDS           | ALL | DEFAULT | THIN
  -----------------|-----|---------|-----
  Id               | x   | x       | x
  Name             | x   | x       | x
  Operating system | x   | x       |
  Username         | x   | x       |
  Uuid             | x   | x       |
  User data        | x   | x       |
  Architecture     | x   | x       |
  Iam role         | x   | x       |
  Created at       | x   | x       |
  Updated at       | x   | x       |
  -----------------|-----|---------|-----

2.14.7.5. hammer 计算资源镜像列表

列出计算资源的所有镜像

Usage:
    hammer compute-resource image <list|index> [OPTIONS]

Options:
 --architecture ARCHITECTURE_NAME          Architecture name
 --architecture-id ARCHITECTURE_ID         ID of architecture
 --compute-resource COMPUTE_RESOURCE_NAME  Compute resource name
 --compute-resource-id COMPUTE_RESOURCE_ID ID of compute resource
 --fields FIELDS                           Show specified fields or predefined field sets only. (See below)
                                           Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
                                           JSON is acceptable and preferred way for complex parameters
 --location LOCATION_NAME                  Set the current location context for the request
 --location-id LOCATION_ID                 Set the current location context for the request
 --location-title LOCATION_TITLE           Set the current location context for the request
 --operatingsystem OPERATINGSYSTEM_TITLE   Operating system title
 --operatingsystem-id OPERATINGSYSTEM_ID   ID of operating system
 --order ORDER                             Sort field and order, eg. ‘id DESC’
 --organization ORGANIZATION_NAME          Set the current organization context for the request
 --organization-id ORGANIZATION_ID         Set the current organization context for the request
 --organization-title ORGANIZATION_TITLE   Set the current organization context for the request
 --page PAGE                               Page number, starting at 1
 --per-page PER_PAGE                       Number of results per page to return, 'all' to return all results
 --search SEARCH                           Filter results
 -h, --help                                Print help

Predefined field sets:
  -----------------|-----|---------|-----
  FIELDS           | ALL | DEFAULT | THIN
  -----------------|-----|---------|-----
  Id               | x   | x       | x
  Name             | x   | x       | x
  Operating system | x   | x       |
  Username         | x   | x       |
  Uuid             | x   | x       |
  User data        | x   | x       |
  -----------------|-----|---------|-----

Search / Order fields:
  architecture        integer
  compute_resource    string
  name                string
  operatingsystem     integer
  user_data           Values: true, false
  username            string

2.14.7.6. hammer 计算资源镜像更新

更新镜像

Usage:
    hammer compute-resource image update [OPTIONS]

Options:
 --architecture ARCHITECTURE_NAME          Architecture name
 --architecture-id ARCHITECTURE_ID         ID of architecture
 --compute-resource COMPUTE_RESOURCE_NAME  Compute resource name
 --compute-resource-id COMPUTE_RESOURCE_ID
 --id ID
 --location LOCATION_NAME                  Set the current location context for the request
 --location-id LOCATION_ID                 Set the current location context for the request
 --location-title LOCATION_TITLE           Set the current location context for the request
 --name NAME                               Name to search by
 --new-name NEW_NAME
 --operatingsystem OPERATINGSYSTEM_TITLE   Operating system title
 --operatingsystem-id OPERATINGSYSTEM_ID   ID of operating system
 --organization ORGANIZATION_NAME          Set the current organization context for the request
 --organization-id ORGANIZATION_ID         Set the current organization context for the request
 --organization-title ORGANIZATION_TITLE   Set the current organization context for the request
 --password PASSWORD
 --user-data USER_DATA                     Whether or not the image supports user data
                                           One of true/false, yes/no, 1/0.
 --username USERNAME
 --uuid UUID                               Template ID in the compute resource
 -h, --help                                Print help

2.14.8. hammer 计算资源镜像

列出计算资源的可用镜像

Usage:
    hammer compute-resource images [OPTIONS]

Options:
 --fields FIELDS                         Show specified fields or predefined field sets only. (See below)
                                         Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
                                         JSON is acceptable and preferred way for complex parameters
 --id ID
 --location LOCATION_NAME                Set the current location context for the request
 --location-id LOCATION_ID               Set the current location context for the request
 --location-title LOCATION_TITLE         Set the current location context for the request
 --name NAME                             Compute resource name
 --organization ORGANIZATION_NAME        Set the current organization context for the request
 --organization-id ORGANIZATION_ID       Set the current organization context for the request
 --organization-title ORGANIZATION_TITLE Set the current organization context for the request
 -h, --help                              Print help

Predefined field sets:
  -------|-----|---------|-----
  FIELDS | ALL | DEFAULT | THIN
  -------|-----|---------|-----
  Uuid   | x   | x       |
  Name   | x   | x       | x
  -------|-----|---------|-----

2.14.9. hammer 计算资源信息

显示计算资源

Usage:
    hammer compute-resource <info|show> [OPTIONS]

Options:
 --fields FIELDS                         Show specified fields or predefined field sets only. (See below)
                                         Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
                                         JSON is acceptable and preferred way for complex parameters
 --id ID
 --location LOCATION_NAME                Set the current location context for the request
 --location-id LOCATION_ID               Set the current location context for the request
 --location-title LOCATION_TITLE         Set the current location context for the request
 --name NAME                             Compute resource name
 --organization ORGANIZATION_NAME        Set the current organization context for the request
 --organization-id ORGANIZATION_ID       Set the current organization context for the request
 --organization-title ORGANIZATION_TITLE Set the current organization context for the request
 -h, --help                              Print help

Predefined field sets:
  ---------------|-----|---------|-----
  FIELDS         | ALL | DEFAULT | THIN
  ---------------|-----|---------|-----
  Id             | x   | x       | x
  Name           | x   | x       | x
  Provider       | x   | x       |
  Description    | x   | x       |
  User           | x   | x       |
  Locations/     | x   | x       |
  Organizations/ | x   | x       |
  Created at     | x   | x       |
  Updated at     | x   | x       |
  ---------------|-----|---------|-----

2.14.10. hammer 计算资源列表

列出所有计算资源

Usage:
    hammer compute-resource <list|index> [OPTIONS]

Options:
 --fields FIELDS                         Show specified fields or predefined field sets only. (See below)
                                         Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
                                         JSON is acceptable and preferred way for complex parameters
 --location LOCATION_NAME                Set the current location context for the request
 --location-id LOCATION_ID               Scope by locations
 --location-title LOCATION_TITLE         Set the current location context for the request
 --order ORDER                           Sort field and order, eg. ‘id DESC’
 --organization ORGANIZATION_NAME        Set the current organization context for the request
 --organization-id ORGANIZATION_ID       Scope by organizations
 --organization-title ORGANIZATION_TITLE Set the current organization context for the request
 --page PAGE                             Page number, starting at 1
 --per-page PER_PAGE                     Number of results per page to return, 'all' to return all results
 --search SEARCH                         Filter results
 -h, --help                              Print help

Predefined field sets:
  ---------|-----|---------|-----
  FIELDS   | ALL | DEFAULT | THIN
  ---------|-----|---------|-----
  Id       | x   | x       | x
  Name     | x   | x       | x
  Provider | x   | x       |
  ---------|-----|---------|-----

Search / Order fields:
  id                  integer
  location            string
  location_id         integer
  name                string
  organization        string
  organization_id     integer
  type                string

2.14.11. hammer 计算资源网络

列出计算资源的可用网络

Usage:
    hammer compute-resource networks [OPTIONS]

Options:
 --cluster-id CLUSTER_ID
 --fields FIELDS                         Show specified fields or predefined field sets only. (See below)
                                         Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
                                         JSON is acceptable and preferred way for complex parameters
 --id ID
 --location LOCATION_NAME                Set the current location context for the request
 --location-id LOCATION_ID               Set the current location context for the request
 --location-title LOCATION_TITLE         Set the current location context for the request
 --name NAME                             Compute resource name
 --organization ORGANIZATION_NAME        Set the current organization context for the request
 --organization-id ORGANIZATION_ID       Set the current organization context for the request
 --organization-title ORGANIZATION_TITLE Set the current organization context for the request
 -h, --help                              Print help

Predefined field sets:
  -------|-----|---------|-----
  FIELDS | ALL | DEFAULT | THIN
  -------|-----|---------|-----
  Id     | x   | x       | x
  Name   | x   | x       | x
  -------|-----|---------|-----

2.14.12. hammer compute-resource resource-pools

列出计算资源集群的资源池

Usage:
    hammer compute-resource resource-pools [OPTIONS]

Options:
 --cluster-id CLUSTER_ID
 --fields FIELDS                         Show specified fields or predefined field sets only. (See below)
                                         Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
                                         JSON is acceptable and preferred way for complex parameters
 --id ID
 --location LOCATION_NAME                Set the current location context for the request
 --location-id LOCATION_ID               Set the current location context for the request
 --location-title LOCATION_TITLE         Set the current location context for the request
 --name NAME                             Compute resource name
 --organization ORGANIZATION_NAME        Set the current organization context for the request
 --organization-id ORGANIZATION_ID       Set the current organization context for the request
 --organization-title ORGANIZATION_TITLE Set the current organization context for the request
 -h, --help                              Print help

Predefined field sets:
  -------|-----|---------|-----
  FIELDS | ALL | DEFAULT | THIN
  -------|-----|---------|-----
  Id     | x   | x       | x
  Name   | x   | x       | x
  -------|-----|---------|-----

2.14.13. hammer 计算资源安全组

列出计算资源的可用安全组

Usage:
    hammer compute-resource security-groups [OPTIONS]

Options:
 --fields FIELDS                         Show specified fields or predefined field sets only. (See below)
                                         Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
                                         JSON is acceptable and preferred way for complex parameters
 --id ID
 --location LOCATION_NAME                Set the current location context for the request
 --location-id LOCATION_ID               Set the current location context for the request
 --location-title LOCATION_TITLE         Set the current location context for the request
 --name NAME                             Compute resource name
 --organization ORGANIZATION_NAME        Set the current organization context for the request
 --organization-id ORGANIZATION_ID       Set the current organization context for the request
 --organization-title ORGANIZATION_TITLE Set the current organization context for the request
 -h, --help                              Print help

Predefined field sets:
  -------|-----|---------|-----
  FIELDS | ALL | DEFAULT | THIN
  -------|-----|---------|-----
  Id     | x   | x       | x
  Name   | x   | x       | x
  -------|-----|---------|-----

2.14.14. hammer 计算资源 storage-domains

列出计算资源的存储域

Usage:
    hammer compute-resource storage-domains [OPTIONS]

Options:
 --cluster-id CLUSTER_ID
 --fields FIELDS                         Show specified fields or predefined field sets only. (See below)
                                         Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
                                         JSON is acceptable and preferred way for complex parameters
 --id ID
 --location LOCATION_NAME                Set the current location context for the request
 --location-id LOCATION_ID               Set the current location context for the request
 --location-title LOCATION_TITLE         Set the current location context for the request
 --name NAME                             Compute resource name
 --organization ORGANIZATION_NAME        Set the current organization context for the request
 --organization-id ORGANIZATION_ID       Set the current organization context for the request
 --organization-title ORGANIZATION_TITLE Set the current organization context for the request
 --storage-domain STORAGE_DOMAIN
 -h, --help                              Print help

Predefined field sets:
  -------|-----|---------|-----
  FIELDS | ALL | DEFAULT | THIN
  -------|-----|---------|-----
  Id     | x   | x       | x
  Name   | x   | x       | x
  -------|-----|---------|-----

2.14.15. hammer compute-resource storage-pods

列出计算资源的存储 pod

Usage:
    hammer compute-resource storage-pods [OPTIONS]

Options:
 --cluster-id CLUSTER_ID
 --fields FIELDS                         Show specified fields or predefined field sets only. (See below)
                                         Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
                                         JSON is acceptable and preferred way for complex parameters
 --id ID
 --location LOCATION_NAME                Set the current location context for the request
 --location-id LOCATION_ID               Set the current location context for the request
 --location-title LOCATION_TITLE         Set the current location context for the request
 --name NAME                             Compute resource name
 --organization ORGANIZATION_NAME        Set the current organization context for the request
 --organization-id ORGANIZATION_ID       Set the current organization context for the request
 --organization-title ORGANIZATION_TITLE Set the current organization context for the request
 --storage-pod STORAGE_POD
 -h, --help                              Print help

Predefined field sets:
  -------|-----|---------|-----
  FIELDS | ALL | DEFAULT | THIN
  -------|-----|---------|-----
  Id     | x   | x       | x
  Name   | x   | x       | x
  -------|-----|---------|-----

2.14.16. hammer 计算资源更新

更新计算资源

Usage:
    hammer compute-resource update [OPTIONS]

Options:
 --app-ident APP_IDENT                       Client ID for AzureRm
 --caching-enabled CACHING_ENABLED           Enable caching, for VMware only
                                             One of true/false, yes/no, 1/0.
 --cloud CLOUD                               Cloud
 --datacenter DATACENTER                     For RHEV, VMware Datacenter
 --description DESCRIPTION
 --display-type DISPLAY_TYPE                 For Libvirt and RHEV only
                                             Possible value(s): 'VNC', 'SPICE'
 --domain DOMAIN                             For RHEL OpenStack Platform (v3) only
 --email EMAIL                               Email for GCE only
 --id ID
 --key-path KEY_PATH                         Certificate path for GCE only
 --keyboard-layout KEYBOARD_LAYOUT           For RHEV only
                                             Possible value(s): 'ar', 'de-ch', 'es', 'fo', 'fr-ca', 'hu', 'ja', 'mk', 'no', 'pt-br', 'sv', 'da', 'en-gb', 'et', 'fr', 'fr-ch', 'is', 'lt', 'nl', 'pl', 'ru', 'th', 'de', 'en-us', 'fi', 'fr-be', 'hr', 'it', 'lv', 'nl-be', 'pt', 'sl', 'tr'
 --location LOCATION_NAME                    Set the current location context for the request
 --location-id LOCATION_ID                   Set the current location context for the request
 --location-ids LOCATION_IDS                 REPLACE locations with given ids
                                             Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
                                             JSON is acceptable and preferred way for complex parameters
 --location-title LOCATION_TITLE             Set the current location context for the request
 --location-titles LOCATION_TITLES           Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
                                             JSON is acceptable and preferred way for complex parameters
 --locations LOCATION_NAMES                  Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
                                             JSON is acceptable and preferred way for complex parameters
 --name NAME                                 Compute resource name
 --new-name NEW_NAME
 --organization ORGANIZATION_NAME            Set the current organization context for the request
 --organization-id ORGANIZATION_ID           Set the current organization context for the request
 --organization-ids ORGANIZATION_IDS         REPLACE organizations with given ids.
                                             Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
                                             JSON is acceptable and preferred way for complex parameters
 --organization-title ORGANIZATION_TITLE     Set the current organization context for the request
 --organization-titles ORGANIZATION_TITLES   Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
                                             JSON is acceptable and preferred way for complex parameters
 --organizations ORGANIZATION_NAMES          Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
                                             JSON is acceptable and preferred way for complex parameters
 --ovirt-quota OVIRT_QUOTA                   For RHEV only, ID or Name of quota to use
 --password PASSWORD                         Password for RHEV, EC2, VMware, RHEL OpenStack Platform. Secret key for EC2
 --project PROJECT                           Project id for GCE only
 --project-domain-id PROJECT_DOMAIN_ID       For RHEL OpenStack Platform (v3) only
 --project-domain-name PROJECT_DOMAIN_NAME   For RHEL OpenStack Platform (v3) only
 --provider PROVIDER                         Providers include Libvirt, Ovirt, EC2, Vmware, Openstack, GCE, AzureRm
 --public-key PUBLIC_KEY                     For RHEV only
 --public-key-path PUBLIC_KEY_PATH           Path to a file that contains oVirt public key (For oVirt only)
 --region REGION                             For AzureRm eg. 'eastus' and for EC2 only. Use 'us-gov-west-1' for EC2 GovCloud region
 --secret-key SECRET_KEY                     Client Secret for AzureRm
 --server SERVER                             For VMware
 --set-console-password SET_CONSOLE_PASSWORD For Libvirt and VMware only
                                             One of true/false, yes/no, 1/0.
 --sub-id SUB_ID                             Subscription ID for AzureRm
 --tenant TENANT                             For RHEL OpenStack Platform and AzureRm only
 --url URL                                   URL for Libvirt, RHEV and RHEL OpenStack Platform
 --user USER                                 Username for RHEV, EC2, VMware, RHEL OpenStack Platform. Access Key for EC2.
 --zone ZONE                                 For GCE only
 -h, --help                                  Print help

2.14.17. hammer 计算资源 virtual-machine

查看并管理计算资源的虚拟机

Usage:
    hammer compute-resource virtual-machine [OPTIONS] SUBCOMMAND [ARG] ...

Parameters:
 SUBCOMMAND                    Subcommand
 [ARG] ...                     Subcommand arguments

Subcommands:
 delete, destroy               Delete a Virtual Machine
 info, show                    Show a virtual machine
 power                         Power a Virtual Machine

Options:
 -h, --help                    Print help

2.14.17.1. hammer 计算资源 virtual-machine delete

删除虚拟机

Usage:
    hammer compute-resource virtual-machine <delete|destroy> [OPTIONS]

Options:
 --id ID
 --location LOCATION_NAME                Set the current location context for the request
 --location-id LOCATION_ID               Set the current location context for the request
 --location-title LOCATION_TITLE         Set the current location context for the request
 --name NAME                             Compute resource name
 --organization ORGANIZATION_NAME        Set the current organization context for the request
 --organization-id ORGANIZATION_ID       Set the current organization context for the request
 --organization-title ORGANIZATION_TITLE Set the current organization context for the request
 --vm-id VM-ID                           Virtual machine id, for gce use virtual machine name
 -h, --help                              Print help

2.14.17.2. hammer 计算资源 virtual-machine 信息

显示虚拟机

Usage:
    hammer compute-resource virtual-machine <info|show> [OPTIONS]

Options:
 --fields FIELDS                         Show specified fields or predefined field sets only. (See below)
                                         Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
                                         JSON is acceptable and preferred way for complex parameters
 --id ID
 --location LOCATION_NAME                Set the current location context for the request
 --location-id LOCATION_ID               Set the current location context for the request
 --location-title LOCATION_TITLE         Set the current location context for the request
 --name NAME                             Compute resource name
 --organization ORGANIZATION_NAME        Set the current organization context for the request
 --organization-id ORGANIZATION_ID       Set the current organization context for the request
 --organization-title ORGANIZATION_TITLE Set the current organization context for the request
 --vm-id VM-ID                           Virtual machine id, for gce use virtual machine name
 -h, --help                              Print help

Predefined field sets:
  -------|-----|---------|-----
  FIELDS | ALL | DEFAULT | THIN
  -------|-----|---------|-----
  Id     | x   | x       | x
  Name   | x   | x       | x
  -------|-----|---------|-----

2.14.17.3. hammer 计算资源虚拟机电源

关闭虚拟机

Usage:
    hammer compute-resource virtual-machine power [OPTIONS]

Options:
 --id ID
 --location LOCATION_NAME                Set the current location context for the request
 --location-id LOCATION_ID               Set the current location context for the request
 --location-title LOCATION_TITLE         Set the current location context for the request
 --name NAME                             Compute resource name
 --organization ORGANIZATION_NAME        Set the current organization context for the request
 --organization-id ORGANIZATION_ID       Set the current organization context for the request
 --organization-title ORGANIZATION_TITLE Set the current organization context for the request
 --vm-id VM-ID                           Virtual machine id, for gce use virtual machine name
 -h, --help                              Print help

2.14.18. hammer 计算资源 virtual-machines

列出计算资源的可用虚拟机

Usage:
    hammer compute-resource virtual-machines [OPTIONS]

Options:
 --fields FIELDS                         Show specified fields or predefined field sets only. (See below)
                                         Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
                                         JSON is acceptable and preferred way for complex parameters
 --id ID
 --location LOCATION_NAME                Set the current location context for the request
 --location-id LOCATION_ID               Set the current location context for the request
 --location-title LOCATION_TITLE         Set the current location context for the request
 --name NAME                             Compute resource name
 --organization ORGANIZATION_NAME        Set the current organization context for the request
 --organization-id ORGANIZATION_ID       Set the current organization context for the request
 --organization-title ORGANIZATION_TITLE Set the current organization context for the request
 -h, --help                              Print help

Predefined field sets:
  -------|-----|---------|-----
  FIELDS | ALL | DEFAULT | THIN
  -------|-----|---------|-----
  Id     | x   | x       | x
  Name   | x   | x       | x
  -------|-----|---------|-----

2.14.19. hammer compute-resource vnic-profiles

列出用于计算资源的可用 vnic 配置集,仅用于 RHEV

Usage:
    hammer compute-resource vnic-profiles [OPTIONS]

Options:
 --fields FIELDS                         Show specified fields or predefined field sets only. (See below)
                                         Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
                                         JSON is acceptable and preferred way for complex parameters
 --id ID
 --location LOCATION_NAME                Set the current location context for the request
 --location-id LOCATION_ID               Set the current location context for the request
 --location-title LOCATION_TITLE         Set the current location context for the request
 --name NAME                             Compute resource name
 --organization ORGANIZATION_NAME        Set the current organization context for the request
 --organization-id ORGANIZATION_ID       Set the current organization context for the request
 --organization-title ORGANIZATION_TITLE Set the current organization context for the request
 -h, --help                              Print help

Predefined field sets:
  ----------------|-----|---------|-----
  FIELDS          | ALL | DEFAULT | THIN
  ----------------|-----|---------|-----
  Vnic profile id | x   | x       | x
  Name            | x   | x       | x
  Network id      | x   | x       |
  ----------------|-----|---------|-----

2.14.20. hammer 计算资源区域

列出计算资源的可用区

Usage:
    hammer compute-resource zones [OPTIONS]

Options:
 --fields FIELDS                         Show specified fields or predefined field sets only. (See below)
                                         Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
                                         JSON is acceptable and preferred way for complex parameters
 --id ID
 --location LOCATION_NAME                Set the current location context for the request
 --location-id LOCATION_ID               Set the current location context for the request
 --location-title LOCATION_TITLE         Set the current location context for the request
 --name NAME                             Compute resource name
 --organization ORGANIZATION_NAME        Set the current organization context for the request
 --organization-id ORGANIZATION_ID       Set the current organization context for the request
 --organization-title ORGANIZATION_TITLE Set the current organization context for the request
 -h, --help                              Print help

Predefined field sets:
  -------|-----|---------|-----
  FIELDS | ALL | DEFAULT | THIN
  -------|-----|---------|-----
  Id     | x   | x       | x
  Name   | x   | x       | x
  -------|-----|---------|-----
Red Hat logoGithubRedditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

© 2024 Red Hat, Inc.