» nutanix_virtual_machine

Describes a Virtual Machine

» Example Usage

data "nutanix_clusters" "clusters" {
 metadata = {
  length = 2
 }
}

output "cluster" {
 value = "${data.nutanix_clusters.clusters.entities.0.metadata.uuid}"
}

resource "nutanix_virtual_machine" "vm1" {
 name = "test-dou-%d"
 cluster_uuid= "${data.nutanix_clusters.clusters.entities.0.metadata.uuid}"

 num_vcpus_per_socket = 1
 num_sockets     = 1
 memory_size_mib   = 2048
 power_state     = "ON"
}

data "nutanix_virtual_machine" "nutanix_virtual_machine" {
 vm_id = "${nutanix_virtual_machine.vm1.id}"
}

» Argument Reference

The following arguments are supported:

  • vm_id: Represents virtual machine UUID

» Attribute Reference

The following attributes are exported:

» Disk List

The disk_list attribute supports the following:

» Device Properties

The device_properties attribute supports the following.

» Sysprep

The guest_customization_sysprep attribute supports the following:

  • install_type: - Whether the guest will be freshly installed using this unattend configuration, or whether this unattend configuration will be applied to a pre-prepared image. Default is \"PREPARED\".
  • unattend_xml: - Generic key value pair used for custom attributes.

» Disk Address

The boot_device_disk_address attribute supports the following:

» GPU List

The gpu_list attribute supports the following:

» Nutanix Guest Tools

The nutanix_guest_tools attribute supports the following:

» NIC List

The nic_list attribute supports the following:

  • nic_type: - The type of this NIC. Defaults to NORMAL_NIC. (Options : NORMAL_NIC , DIRECT_NIC , NETWORK_FUNCTION_NIC).
  • uuid: - The NIC's UUID, which is used to uniquely identify this particular NIC. This UUID may be used to refer to the NIC outside the context of the particular VM it is attached to.
  • floating_ip: - The Floating IP associated with the vnic.
  • model: - The model of this NIC. (Options : VIRTIO , E1000).
  • network_function_nic_type: - The type of this Network function NIC. Defaults to INGRESS. (Options : INGRESS , EGRESS , TAP).
  • mac_address: - The MAC address for the adapter.
  • ip_endpoint_list: - IP endpoints for the adapter. Currently, IPv4 addresses are supported.
  • network_function_chain_reference: - The reference to a network_function_chain.
  • subnet_uuid: - The reference to a subnet.
  • subnet_name: - The name of the subnet reference to.

» Serial Port List

The serial_port_list attribute supports the following:

  • index: - Index of the serial port (int).
  • is_connected: - Indicates whether the serial port connection is connected or not (true or false).

» ip_endpoint_list

The following attributes are exported:

  • ip: - Address string.
  • type: - Address type. It can only be "ASSIGNED" in the spec. If no type is specified in the spec, the default type is set to "ASSIGNED". (Options : ASSIGNED , LEARNED)

» Metadata

The metadata attribute exports the following:

  • last_update_time: - UTC date and time in RFC-3339 format when vm was last updated.
  • UUID: - vm UUID.
  • creation_time: - UTC date and time in RFC-3339 format when vm was created.
  • spec_version: - Version number of the latest spec.
  • spec_hash: - Hash of the spec. This will be returned from server.
  • name: - vm name.

» Categories

The categories attribute supports the following:

  • name: - the key name.
  • value: - value of the key.

» Reference

The project_reference, owner_reference, availability_zone_reference, network_function_chain_reference, data_source_reference, volume_group_reference attributes supports the following:

  • kind: - The kind name (Default value: project).
  • name: - the name.
  • uud: - the UUID.

See detailed information in Nutanix Virtual Machine.