OS::Nova::Server

A resource for managing Nova instances.

A Server resource manages the running virtual machine instance within an OpenStack cloud.

Required Properties

Name

Description

flavor

The ID or name of the flavor to boot onto.

String value expected.

Can be updated without replacement.

Value must be of type nova.flavor

Note

The Server flavor does not support the replace parameter (When updating the stack, resources need to be deleted and rebuilt).

networks

An ordered list of NICs to be added to this server, with information about connected networks, fixed IP addresses, port, and others.

List value expected.

Can be updated without replacement.

List contents:

  • *

    Map value expected.

    Can be updated without replacement.

    Map properties:

    • fixed_ip

      Fixed IP address to specify for the port created on the requested network.

      String value expected.

      Can be updated without replacement.

      Value must be of type ip_addr

    • port

      ID of an existing port to associate with this server.

      String value expected.

      Can be updated without replacement.

      Value must be of type neutron.port

    • network

      Name or ID of network to create a port on.

      String value expected.

      Can be updated without replacement.

      Value must be of type neutron.network

    • uuid

      ID of network to create a port on.

      String value expected.

      Can be updated without replacement.

Note

  • When creating a VM that has multiple NICs, ensure that all subnets used by the NICs are in the same VPC.

  • When changing the subnets of NICs on a VM, ensure that the new subnets must be in the same VPC as the original ones.

Optional Properties

Name

Description

admin_pass

The administrator password for the server.

String value expected.

Can be updated without replacement.

Note

This parameter is invalid in the current version.

For Linux ECSs, if you need to inject passwords, you can only use user_data for injection. For Windows ECSs, if you need to inject passwords, you can only use the metadata admin_pass to inject.

availability_zone

Name of the availability zone for server placement. Obtain the value from Regions and Endpoints.

String value expected.

Updates cause replacement.

Note

Do not update this attribute. Otherwise, the ECS update will fail.

block_device_mapping

Block device mappings for this server.

List value expected.

Updates cause replacement.

List contents:

  • *

    Map value expected.

    Updates cause replacement.

    Map properties:

    • delete_on_termination

      Indicate whether the volume should be deleted when the server is terminated.

      Boolean value expected.

      Updates cause replacement.

    • device_name

      A device name where the volume will be attached in the system at /dev/device_name. This value is typically vda.

      String value expected.

      Updates cause replacement.

    • snapshot_id

      The ID of the snapshot to create a volume from.

      String value expected.

      Updates cause replacement.

      Value must be of type cinder.snapshot

    • volume_id

      The ID of the volume to boot from. Only one of volume_id or snapshot_id should be provided.

      String value expected.

      Updates cause replacement.

      Value must be of type cinder.volume

    • volume_size

      The size of the volume, in GB. It is safe to leave this blank and have the Compute service infer the size.

      Integer value expected.

      Updates cause replacement.

Note

Do not update this attribute. Otherwise, the VM update will fail.

If the template contains information about disks attached to Servers, you are not allowed to update the disks. Otherwise, Servers will be rebuilt.

block_device_mapping_v2

Block device mappings v2 for this server.

List value expected.

Updates cause replacement.

List contents:

  • *

    Map value expected.

    Updates cause replacement.

    Map properties:

    • boot_index

      Integer used for ordering the boot disks.

      Integer value expected.

      Updates cause replacement.

    • delete_on_termination

      Indicate whether the volume should be deleted when the server is terminated.

      Boolean value expected.

      Updates cause replacement.

    • device_name

      A device name where the volume will be attached in the system at /dev/device_name. This value is typically vda.

      String value expected.

      Updates cause replacement.

    • device_type

      Device type: at the moment we can make distinction only between disk and cdrom.

      String value expected.

      Updates cause replacement.

      Allowed values: cdrom, disk

    • disk_bus

      Bus of the device: hypervisor driver chooses a suitable default if omitted.

      String value expected.

      Updates cause replacement.

      Allowed values: ide, lame_bus, scsi, usb, virtio

    • snapshot_id

      The ID of the snapshot to create a volume from.

      String value expected.

      Updates cause replacement.

      Value must be of type cinder.snapshot

    • swap_size

      The size of the swap, in MB.

      Integer value expected.

      Updates cause replacement.

    • volume_id

      The volume_id can be boot or non-boot device to the server.

      String value expected.

      Updates cause replacement.

      Value must be of type cinder.volume

    • volume_size

      Size of the block device in GB. If it is omitted, hypervisor driver calculates size.

      Integer value expected.

      Updates cause replacement.

    • image_id

      The ID of the image to create a volume from.

      String value expected.

      Updates cause replacement.

      Value must be of type glance.image

Note

Do not update this attribute. Otherwise, the VM update will fail.

If the template contains information about disks attached to Servers, you are not allowed to update the disks. Otherwise, Servers will be rebuilt.

config_drive

If True, enable config drive on the server.

Boolean value expected.

Updates cause replacement.

Note

Do not update this attribute. Otherwise, the VM update will fail.

diskConfig

Control how the disk is partitioned when the server is created.

String value expected.

Updates cause replacement.

Allowed values: AUTO, MANUAL

Note

Do not update this attribute. Otherwise, the VM update will fail.

flavor_update_policy

Policy on how to apply a flavor update; either by requesting a server resize or by replacing the entire server.

String value expected.

Can be updated without replacement.

Defaults to "RESIZE".

Allowed values: RESIZE

image

The ID or name of the image to boot with.

String value expected.

Can be updated without replacement.

Value must be of type glance.image

Note

If you use the system volume to create an ECS, this parameter is not required. If you do not use a volume to create an ECS, you must set imageRef to a valid UUID. Otherwise, the API will return error code 400.

image_update_policy

Policy on how to apply an image-id update; either by requesting a server rebuild or by replacing the entire server.

String value expected.

Can be updated without replacement.

Defaults to "REBUILD".

Allowed values: REBUILD

key_name

Name of keypair to inject into the server.

String value expected.

Updates cause replacement.

Value must be of type nova.keypair

Note

Do not update this attribute. Otherwise, the VM update will fail.

metadata

Arbitrary key/value metadata to store for this server. Both keys and values must be 255 characters or less. Non-string values will be serialized to JSON (and the serialized string must be 255 characters or less).

Map value expected.

Can be updated without replacement.

name

Server name.

String value expected.

Can be updated without replacement.

personality

A map of files to create/overwrite on the server upon boot. Keys are file names and values are the file contents.

Map value expected.

Updates cause replacement.

Defaults to "{}".

Note

Do not update this attribute. Otherwise, the VM update will fail.

reservation_id

A UUID for the set of servers being requested.

String value expected.

Updates cause replacement.

Note

Do not update this attribute. Otherwise, the VM update will fail.

scheduler_hints

Arbitrary key-value pairs specified by the client to help boot a server.

Map value expected.

Updates cause replacement.

Note

Do not update this attribute. Otherwise, the VM update will fail.

security_groups

List of security group names or IDs. Cannot be used if neutron ports are associated with this server; assign security groups to the ports instead.

List value expected.

Updates cause replacement.

Defaults to "[]".

Note

Do not update this attribute. Otherwise, the VM update will fail.

software_config_transport

How the server should receive the metadata required for software configuration.

POLL_TEMP_URL will create and populate a Swift TempURL with metadata for polling.

String value expected.

Can be updated without replacement.

Defaults to "POLL_TEMP_URL".

tags

Server tags.

List value expected.

Can be updated without replacement.

List contents:

  • *

    String value expected.

    Can be updated without replacement.

user_data

User data script to be executed by cloud-init.

String value expected.

Can be updated without replacement.

Defaults to "".

Note

You are not advised to update user_data. Otherwise, VMs may be rebuilt.

user_data_format

How the user_data should be formatted for the server.

  • For HEAT_CFNTOOLS, the user_data is bundled as part of the heat-cfntools cloud-init boot configuration data.

  • For RAW the user_data is passed to Nova unmodified.

  • For SOFTWARE_CONFIG user_data is bundled as part of the software config data, and metadata is derived from any associated SoftwareDeployment resources.

String value expected.

Updates cause replacement.

Defaults to "HEAT_CFNTOOLS".

Allowed values: HEAT_CFNTOOLS, RAW, SOFTWARE_CONFIG

Attributes

Name

Description

accessIPv4

The manually assigned alternative public IPv4 address of the server.

accessIPv6

The manually assigned alternative public IPv6 address of the server.

addresses

A dict of all network addresses with corresponding port_id. Each network will have two keys in dict, they are network name and network id. The port ID may be obtained through the following expression: "{get_attr: [<server>, addresses, <network name_or_id>, 0, port]}".

first_address

Convenience attribute to fetch the first assigned network address, or an empty string if nothing has been assigned at this time. Result may not be predictable if the server has addresses from more than one network.

instance_name

Name of the instance.

name

Name of the server.

networks

A dict of assigned network addresses of the form: {"public": [ip1, ip2...], "private": [ip3, ip4], "public_uuid": [ip1, ip2...], "private_uuid": [ip3, ip4]}. Each network will have two keys in dict, they are network name and network id.

show

Detailed information about resource.

HOT Syntax

heat_template_version: 2014-10-16
...
resources:
  ...
  the_resource:
    type: OS::Nova::Server
    properties:
      admin_pass: String
      availability_zone: String
      block_device_mapping: [{"snapshot_id": String, "volume_id": String, "delete_on_termination": Boolean, "volume_size": Integer, "device_name": String}, {"snapshot_id": String, "volume_id": String, "delete_on_termination": Boolean, "volume_size": Integer, "device_name": String}, ...]
      block_device_mapping_v2: [{"disk_bus": String, "swap_size": Integer, "device_name": String, "device_type": String, "delete_on_termination": Boolean, "volume_id": String, "snapshot_id": String, "boot_index": Integer, "image_id": String, "volume_size": Integer}, {"disk_bus": String, "swap_size": Integer, "device_name": String, "device_type": String, "delete_on_termination": Boolean, "volume_id": String, "snapshot_id": String, "boot_index": Integer, "image_id": String, "volume_size": Integer}, ...]
      config_drive: Boolean
      diskConfig: String
      flavor: String
      flavor_update_policy: String
      image: String
      image_update_policy: String
      key_name: String
      metadata: {...}
      name: String
      networks: [{"network": String, "uuid": String, "fixed_ip": String, "port": String, "floating_ip": String, "subnet": String, "port_extra_properties": {"qos_policy": String, "mac_address": String, "binding:vnic_type": String, "admin_state_up": Boolean, "port_security_enabled": Boolean, "allowed_address_pairs": [{"mac_address": String, "ip_address": String}, {"mac_address": String, "ip_address": String}, ...], "value_specs": {...}}}, {"network": String, "uuid": String, "fixed_ip": String, "port": String, "floating_ip": String, "subnet": String, "port_extra_properties": {"qos_policy": String, "mac_address": String, "binding:vnic_type": String, "admin_state_up": Boolean, "port_security_enabled": Boolean, "allowed_address_pairs": [{"mac_address": String, "ip_address": String}, {"mac_address": String, "ip_address": String}, ...], "value_specs": {...}}}, ...]
      personality: {...}
      reservation_id: String
      scheduler_hints: {...}
      security_groups: [Value, Value, ...]
      software_config_transport: String
      user_data: String
      user_data_format: String