euca-run-instances

Runs instances of the specified machine image.

Syntax

euca-run-instances image_id [-n count ][-g group_name ]
				[-k keypair ][-d user_data ] [-f user_data_file]
				[-t instance_type ][--kernel kernel ][--ramdisk ramdisk ]
				[-b block_device_mapping][--monitor] [-z zone ]  
				[--disable-api-termination] 
				[--instance-initiated-shutdown-behavior value] 
				[--placement-group group_name]
				[--tenancy value] [--client-token token_value] [-s subnet_value]
				[--associate-public-ip-address  value]
				[--private-ip-address address] [--secondary-private-ip-address address]
				[--secondary-private-ip-address-count count] [-a interface]
				[-p IAM_profile] [--ebs-optimized]
				

Options

Option Description Required
image_id ID of the image to run. Yes
-n,--instance-count min[-max] Number of instances to run. If this is specified as a range (min-max), Eucalyptus will try to run the maximum number, but no fewer than the minimum number. No
-g,--group group Security group to run the instance in. No
-k,--key keypair Name of a key pair. Not necessary to launch an instance as cloud-init is always executed if it exists inside an image. No
-d,--user-data user_data User data to pass to the instance. No
--user-data-force user_data Same as --user-data, but without checking if a file by that name already exists. No
-f,--user-data-file user_data_file File containing user data to pass to the instance. No
--addressing user_data_file (Eucalyptus only) Addressing scheme to use when launching the instance. Use private to run an instance with no public address.

Valid values: public | private

No
-t,--instance-type Instance type to run.

Valid values: m1.small | t1.micro | m1.medium | m1.large | c1.medium | m1.xlarge | c1.xlarge | m2.xlarge | m3.xlarge | cc1.4xlarge | m2.2xlarge | m3.2xlarge | m2.4xlarge | hi1.4xlarge | cc2.8xlarge | cg1.4xlarge | cr1.8xlarge | hs1.8xlarge

No
--kernel Kernel ID to be used. No
--ramdisk Ramdisk ID to be used. No
-b,--block-device-mapping Block device mapping for the instance. This is passed in the form of <devicename>=<blockdevice>, where: devicename is the device name of the physical device on the instance to map and blockdevice is one of the following values:
  • none: Use this value to suppress existing mapping on the specified image for this device. For example: /dev/sdc=none
  • ephemeral[0..3]: Use this value to indicate that an instance local storage device should be mapped to this device. For example: /dev/sdc=ephemeral0
  • [snapshot-id]:[size]:[delete-on-termination (true|false)]: Use this value to map a device to an existing EBS-backed volume, and to specify whether the EBS volume should be deleted on termination. This value defaults to true.

    To specify a new EBS-backed volume, skip the snapshot ID and pass in a volume size instead. For example: /dev/sdb=:20.

No
-m, --monitor Enable monitoring for the instance. Boolean value. Defaults to Disabled. No
--disable-api-termination Prevent API calls from terminating the instance(s). No
--instance-initiated-shutdown-behavior value Indicates whether to stop or terminate EBS-backed instances upon shutdown.

Valid values: stop (default) | terminate

No
--placement-group group_name Specifies the placement group in which to launch the instance. No
--tenancy value (VPC only) Indicates the type of tenancy for the instance. A value of dedicated indicates that the instance should run on single-tenant hardware.

Valid values: default | dedicated

No
--client-token token_value Unique identifier to ensure request idempotency. No
-s,--subnet subnet_value (VPC only) Subnet for the instance's network interface. No
--associate-public-ip-address value (VPC only) Whether or not to assign public IP addresses to the new instances. This overrides the subnet’s settings for whether or not to assign them by default. If you don't want a public IP address, set it to false; and note that you need to also specify the --subnet option.

Valid values: true | false

No
--private-ip-address address (VPC only) Assign the specified primary private IP address to an instance's interface. No
--secondary-private-ip-address address (VPC only) Assign the specified secondary private IP address to an instance's network interface. Use this option multiple times to add additional addresses. No
--secondary-private-ip-address-count count (VPC only) Automatically assign a specific number of secondary private IP addresses to an instance's network interface. No
-a, --network-interface interface (VPC only) Add the specified network interface to the new instance.

If the interface already exists, supply its ID and a numeric index for it, separated by ":", in the form "eni-NNNNNNNN:INDEX". To create a new interface, supply a numeric index and subnet ID for it, along with (in order) an optional description, a primary private IP address, a list of security group IDs to associate with the interface, whether to delete the interface upon instance termination ("true" or "false"), a number of secondary private IP addresses to create automatically, and a list of secondary private IP addresses to assign to the interface, separated by ":", in the form:

:INDEX:SUBNET:[DESCRIPT ION]:[PRIV_IP]:[GROUP1,GROUP2,...]:[true|false]:[SEC_I P_COUNT|:SEC_IP1,SEC_IP2,...].

You cannot specify both.

This option may be used multiple times. Each adds another network interface.

No
-p, --iam-profile IAM_profile The name or ARN of the IAM instance profile to associate with the new instance(s). No
--ebs-optimized Optimize the new instance(s) for EBS I/O. No
-z,--availability-zone zone Availability zone to run the instance in. No

Common Options

Option Description
--show-empty-fields Show empty fields as "(nil)".
--region user@region Region and/or user name to search when looking up config file data. Only valid for EC2 endpoints.
-U,--url url URL of the cloud service to connect to. For administrative commands, this should be <ip_address>:8773/services/Empyrean.
-I,--access-key-id key_id User's access key ID.
-S,--secret-key secret_key User's secret key.
--security-token token User's security token.
--debug Prints what the command sends to the server and what it receives from the server. Use when you're trying to debug Euca2ools.
--debugger Enable interactive debugger on error.
-h,--help Display the manual page for the command.
--version Display the version of this tool.

Output

Example

euca-run-instances -k mykey -g mygroup emi-15A1386E
RESERVATION r-D8A4438A  790547641019    default
INSTANCE    i-12623E16  emi-15A1386E    0.0.0.0 0.0.0.0 pending kp00
 0       m1.small    2012-01-01T00:00:00.000Z    zone00
x