devstack nova boot 没有 --file 参数选项?

devstack nova boot does not have --file parameter option?

我希望将文件传递到我的实例,但是没有 文件选项?即使文档说这应该可用?

stack@openstack:/tmp$ nova boot --config-drive true --flavor 8755fc00-4c24-418d-a505-592c809108d9 --image 2ca99129-4b09-4a2a-a43d-b22c76dc4efc --file license=FGVM080000109836.lic --user-data cloudinitfile test
usage: nova [--version] [--debug] [--os-cache] [--timings]
        [--os-region-name <region-name>] [--service-type <service-type>]
        [--service-name <service-name>]
        [--os-endpoint-type <endpoint-type>]
        [--os-compute-api-version <compute-api-ver>]
        [--endpoint-override <bypass-url>] [--profile HMAC_KEY]
        [--insecure] [--os-cacert <ca-certificate>]
        [--os-cert <certificate>] [--os-key <key>] [--timeout <seconds>]
        [--os-auth-type <name>] [--os-auth-url OS_AUTH_URL]
        [--os-system-scope OS_SYSTEM_SCOPE] [--os-domain-id OS_DOMAIN_ID]
        [--os-domain-name OS_DOMAIN_NAME] [--os-project-id OS_PROJECT_ID]
        [--os-project-name OS_PROJECT_NAME]
        [--os-project-domain-id OS_PROJECT_DOMAIN_ID]
        [--os-project-domain-name OS_PROJECT_DOMAIN_NAME]
        [--os-trust-id OS_TRUST_ID]
        [--os-default-domain-id OS_DEFAULT_DOMAIN_ID]
        [--os-default-domain-name OS_DEFAULT_DOMAIN_NAME]
        [--os-user-id OS_USER_ID] [--os-username OS_USERNAME]
        [--os-user-domain-id OS_USER_DOMAIN_ID]
        [--os-user-domain-name OS_USER_DOMAIN_NAME]
        [--os-password OS_PASSWORD]
        <subcommand> ...
error: unrecognized arguments: --file test
Try 'nova help ' for more information.

是的,有 --file 选项,您可以通过该选项将文件传递给您的实例。您可以使用 "nova help command".

检查可用的可选参数

例如:

nova help boot 
usage: nova boot [--flavor <flavor>] [--image <image>]
                 [--image-with <key=value>] [--boot-volume <volume_id>]
                 [--snapshot <snapshot_id>] [--min-count <number>]
                 [--max-count <number>] [--meta <key=value>]
                 **[--file <dst-path=src-path>]** [--key-name <key-name>]
                 [--user-data <user-data>]
                 [--availability-zone <availability-zone>]
                 [--security-groups <security-groups>]
                 [--block-device-mapping <dev-name=mapping>]
                 [--block-device key1=value1[,key2=value2...]]
                 [--swap <swap_size>]
                 [--ephemeral size=<size>[,format=<format>]]
                 [--hint <key=value>]
                 [--nic <net-id=net-uuid,v4-fixed-ip=ip-addr,v6-fixed-ip=ip-addr,port-id=port-uuid>]
                 [--config-drive <value>] [--poll] [--admin-pass <value>]
                 [--access-ip-v4 <value>] [--access-ip-v6 <value>]
                 <name>

Boot a new server.
Please check with alternative command using OpenStack CLI: 
***openstack server create --image 2ca99129-4b09-4a2a-a43d-b22c76dc4efc --flavor 8755fc00-4c24-418d-a505-592c809108d9 --config-drive True   --file license=FGVM080000109836.lic --user-data cloudinitfile test***
Note: 
  1. Please also check once the injected files quota.