compute server create

コマンド概要

新たに仮想サーバーを作成します。


必須パラメーター

パラメーター名 データ形式 デフォルト値 パラメーター説明
name String なし Server name

任意パラメーター

パラメーター名 データ形式 デフォルト値 パラメーター説明
--flavor String なし Flavor ID
--image | --volume String | String なし Create server from this image (name or ID) | Create server from this volume (name or ID)
--nic <net-id=net-uuid,v4-fixed-ip=ip-addr,v6-fixed-ip=ip-addr,port-id=port-uuid> なし Create a NIC on the server. Specify option multiple times to create multiple NICs. Either net-id or port-id must be provided, but not both. net-id: attach NIC to network with this UUID, port-id: attach NIC to port with this UUID, v4-fixed-ip: IPv4 fixed address for NIC (optional), v6-fixed-ip: IPv6 fixed address for NIC (optional).
--security-group security-group-name なし Security group to assign to this server (name or ID) (repeat for multiple groups)
--key-name key-name なし Keypair to inject into this server (optional extension)
--property String なし Set a property on this server (repeat for multiple values)
--user-data String なし User data file to serve from the metadata server (Base64 encoding is not necessary)
--availability_zone String Select an availability zone for the server  
--block-device-mapping dev-name=mapping なし Map block devices; map is <id>:<type>:<size(GB)>:<delete_on_terminate> (optional extension); sample: –block_device_mapping vdb=cb9a5d36-b1fd-456f-94c0-7151075159d9:volume:40:true
--hint LVM VolumeGroup なし Hints for the scheduler (optional extension)
--config-drive <config-drive-volume>|True なし Use specified volume as the config drive, or ‘True’ to use an ephemeral drive
--min count 1 Minimum number of servers to launch (default=1)
--max count 1 Maximum number of servers to launch (default=1)

コマンド使用例

$ ecl compute server create --image df1944a7-ca45-4709-9ec6-e31664133650 --flavor 1CPU-4GB --nic net-id=b8f8b3f6-4325-4e9a-a6f0-ae535d4dfab4 test-server
+--------------------------------------+----------------------------------------------------------------+
| Field                                | Value                                                          |
+--------------------------------------+----------------------------------------------------------------+
| OS-DCF:diskConfig                    | MANUAL                                                         |
| OS-EXT-AZ:availability_zone          | nova                                                           |
| OS-EXT-STS:power_state               | 0                                                              |
| OS-EXT-STS:task_state                | scheduling                                                     |
| OS-EXT-STS:vm_state                  | building                                                       |
| OS-SRV-USG:launched_at               | None                                                           |
| OS-SRV-USG:terminated_at             | None                                                           |
| accessIPv4                           |                                                                |
| accessIPv6                           |                                                                |
| addresses                            |                                                                |
| adminPass                            | 2kopTg29dPtu                                                   |
| config_drive                         |                                                                |
| created                              | 2016-08-01T04:35:32Z                                           |
| flavor                               | 1CPU-4GB (1CPU-4GB)                                            |
| hostId                               |                                                                |
| id                                   | 90ba81f1-fdac-401c-aac1-414b045dda45                           |
| image                                | CentOS-7.1-1503_64_virtual-server_12                           |
|                                      | (df1944a7-ca45-4709-9ec6-e31664133650)                         |
| key_name                             | None                                                           |
| name                                 | test-server                                                    |
| os-extended-volumes:volumes_attached | []                                                             |
| progress                             | 0                                                              |
| project_id                           | ef5778e553a24d789c15c689e30adf5d                               |
| properties                           |                                                                |
| security_groups                      | [{u'name': u'default'}]                                        |
| status                               | BUILD                                                          |
| updated                              | 2016-08-01T04:35:32Z                                           |
| user_id                              | 47893d618ecf452f8f85929fccfee0f1                               |
+--------------------------------------+----------------------------------------------------------------+