Ready to level-up your engineering skills? Join a Pulumi Workshop. Register Now

VirtualMachine

Create a VirtualMachine Resource

new VirtualMachine(name: string, args: VirtualMachineArgs, opts?: CustomResourceOptions);
def VirtualMachine(resource_name: str, opts: Optional[ResourceOptions] = None, alternate_guest_name: Optional[str] = None, annotation: Optional[str] = None, boot_delay: Optional[int] = None, boot_retry_delay: Optional[int] = None, boot_retry_enabled: Optional[bool] = None, cdrom: Optional[VirtualMachineCdromArgs] = None, clone: Optional[VirtualMachineCloneArgs] = None, cpu_hot_add_enabled: Optional[bool] = None, cpu_hot_remove_enabled: Optional[bool] = None, cpu_limit: Optional[int] = None, cpu_performance_counters_enabled: Optional[bool] = None, cpu_reservation: Optional[int] = None, cpu_share_count: Optional[int] = None, cpu_share_level: Optional[str] = None, custom_attributes: Optional[Mapping[str, str]] = None, datacenter_id: Optional[str] = None, datastore_cluster_id: Optional[str] = None, datastore_id: Optional[str] = None, disks: Optional[Sequence[VirtualMachineDiskArgs]] = None, efi_secure_boot_enabled: Optional[bool] = None, enable_disk_uuid: Optional[bool] = None, enable_logging: Optional[bool] = None, ept_rvi_mode: Optional[str] = None, extra_config: Optional[Mapping[str, str]] = None, firmware: Optional[str] = None, folder: Optional[str] = None, force_power_off: Optional[bool] = None, guest_id: Optional[str] = None, hardware_version: Optional[int] = None, host_system_id: Optional[str] = None, hv_mode: Optional[str] = None, ide_controller_count: Optional[int] = None, ignored_guest_ips: Optional[Sequence[str]] = None, latency_sensitivity: Optional[str] = None, memory: Optional[int] = None, memory_hot_add_enabled: Optional[bool] = None, memory_limit: Optional[int] = None, memory_reservation: Optional[int] = None, memory_share_count: Optional[int] = None, memory_share_level: Optional[str] = None, migrate_wait_timeout: Optional[int] = None, name: Optional[str] = None, nested_hv_enabled: Optional[bool] = None, network_interfaces: Optional[Sequence[VirtualMachineNetworkInterfaceArgs]] = None, num_cores_per_socket: Optional[int] = None, num_cpus: Optional[int] = None, ovf_deploy: Optional[VirtualMachineOvfDeployArgs] = None, pci_device_ids: Optional[Sequence[str]] = None, poweron_timeout: Optional[int] = None, resource_pool_id: Optional[str] = None, run_tools_scripts_after_power_on: Optional[bool] = None, run_tools_scripts_after_resume: Optional[bool] = None, run_tools_scripts_before_guest_reboot: Optional[bool] = None, run_tools_scripts_before_guest_shutdown: Optional[bool] = None, run_tools_scripts_before_guest_standby: Optional[bool] = None, sata_controller_count: Optional[int] = None, scsi_bus_sharing: Optional[str] = None, scsi_controller_count: Optional[int] = None, scsi_type: Optional[str] = None, shutdown_wait_timeout: Optional[int] = None, storage_policy_id: Optional[str] = None, swap_placement_policy: Optional[str] = None, sync_time_with_host: Optional[bool] = None, tags: Optional[Sequence[str]] = None, vapp: Optional[VirtualMachineVappArgs] = None, wait_for_guest_ip_timeout: Optional[int] = None, wait_for_guest_net_routable: Optional[bool] = None, wait_for_guest_net_timeout: Optional[int] = None)
func NewVirtualMachine(ctx *Context, name string, args VirtualMachineArgs, opts ...ResourceOption) (*VirtualMachine, error)
public VirtualMachine(string name, VirtualMachineArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args VirtualMachineArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args VirtualMachineArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args VirtualMachineArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

VirtualMachine Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The VirtualMachine resource accepts the following input properties:

ResourcePoolId string

The managed object reference ID of the resource pool to put this virtual machine in. See the section on virtual machine migration for details on changing this value.

AlternateGuestName string

The guest name for the operating system when guest_id is other or other-64.

Annotation string

A user-provided description of the virtual machine. The default is no annotation.

BootDelay int

The number of milliseconds to wait before starting the boot sequence. The default is no delay.

BootRetryDelay int

The number of milliseconds to wait before retrying the boot sequence. This only valid if boot_retry_enabled is true. Default: 10000 (10 seconds).

BootRetryEnabled bool

If set to true, a virtual machine that fails to boot will try again after the delay defined in boot_retry_delay. Default: false.

Cdrom Pulumi.VSphere.Inputs.VirtualMachineCdromArgs

A specification for a CDROM device on this virtual machine. See CDROM options below.

Clone Pulumi.VSphere.Inputs.VirtualMachineCloneArgs

When specified, the VM will be created as a clone of a specified template. Optional customization options can be submitted as well. See creating a virtual machine from a template for more details.

CpuHotAddEnabled bool

Allow CPUs to be added to this virtual machine while it is running.

CpuHotRemoveEnabled bool

Allow CPUs to be removed to this virtual machine while it is running.

CpuLimit int

The maximum amount of CPU (in MHz) that this virtual machine can consume, regardless of available resources. The default is no limit.

CpuPerformanceCountersEnabled bool

Enable CPU performance counters on this virtual machine. Default: false.

CpuReservation int

The amount of CPU (in MHz) that this virtual machine is guaranteed. The default is no reservation.

CpuShareCount int

The number of CPU shares allocated to the virtual machine when the cpu_share_level is custom.

CpuShareLevel string

The allocation level for CPU resources. Can be one of high, low, normal, or custom. Default: custom.

CustomAttributes Dictionary<string, string>

Map of custom attribute ids to attribute value strings to set for virtual machine.

DatacenterId string

The datacenter id. Required only when deploying an ovf template.

DatastoreClusterId string

The managed object reference ID of the datastore cluster ID to use. This setting applies to entire virtual machine and implies that you wish to use Storage DRS with this virtual machine. See the section on virtual machine migration for details on changing this value.

DatastoreId string

The datastore ID that the ISO is located in. Requried for using a datastore ISO. Conflicts with client_device.

Disks List<Pulumi.VSphere.Inputs.VirtualMachineDiskArgs>

A specification for a virtual disk device on this virtual machine. See disk options below.

EfiSecureBootEnabled bool

When the firmware type is set to is efi, this enables EFI secure boot. Default: false.

EnableDiskUuid bool

Expose the UUIDs of attached virtual disks to the virtual machine, allowing access to them in the guest. Default: false.

EnableLogging bool

Enable logging of virtual machine events to a log file stored in the virtual machine directory. Default: false.

EptRviMode string

The EPT/RVI (hardware memory virtualization) setting for this virtual machine. Can be one of automatic, on, or off. Default: automatic.

ExtraConfig Dictionary<string, string>

Extra configuration data for this virtual machine. Can be used to supply advanced parameters not normally in configuration, such as instance metadata.

Firmware string

The firmware interface to use on the virtual machine. Can be one of bios or EFI. Default: bios.

Folder string

The path to the folder to put this virtual machine in, relative to the datacenter that the resource pool is in.

ForcePowerOff bool

If a guest shutdown failed or timed out while updating or destroying (see shutdown_wait_timeout), force the power-off of the virtual machine. Default: true.

GuestId string

The guest ID for the operating system type. For a full list of possible values, see [here][vmware-docs-guest-ids]. Default: other-64.

HardwareVersion int

The hardware version number. Valid range is from 4 to 15. The hardware version cannot be downgraded. See [virtual machine hardware compatibility][virtual-machine-hardware-compatibility] for more details.

HostSystemId string

An optional managed object reference ID of a host to put this virtual machine on. See the section on virtual machine migration for details on changing this value. If a host_system_id is not supplied, vSphere will select a host in the resource pool to place the virtual machine, according to any defaults or DRS policies in place.

HvMode string

The (non-nested) hardware virtualization setting for this virtual machine. Can be one of hvAuto, hvOn, or hvOff. Default: hvAuto.

IdeControllerCount int

The number of IDE controllers that Terraform manages on this virtual machine. This directly affects the amount of disks you can add to the virtual machine and the maximum disk unit number. Note that lowering this value does not remove controllers.

IgnoredGuestIps List<string>

List of IP addresses and CIDR networks to ignore while waiting for an available IP address using either of the waiters. Any IP addresses in this list will be ignored if they show up so that the waiter will continue to wait for a real IP address. Default: [].

LatencySensitivity string

Controls the scheduling delay of the virtual machine. Use a higher sensitivity for applications that require lower latency, such as VOIP, media player applications, or applications that require frequent access to mouse or keyboard devices. Can be one of low, normal, medium, or high.

Memory int

The size of the virtual machine’s memory, in MB. Default: 1024 (1 GB).

MemoryHotAddEnabled bool

Allow memory to be added to this virtual machine while it is running.

MemoryLimit int

The maximum amount of memory (in MB) that this virtual machine can consume, regardless of available resources. The default is no limit.

MemoryReservation int

The amount of memory (in MB) that this virtual machine is guaranteed. The default is no reservation.

MemoryShareCount int

The number of memory shares allocated to the virtual machine when the memory_share_level is custom.

MemoryShareLevel string

The allocation level for memory resources. Can be one of high, low, normal, or custom. Default: custom.

MigrateWaitTimeout int

The amount of time, in minutes, to wait for a virtual machine migration to complete before failing. Default: 10 minutes. Also see the section on virtual machine migration.

Name string

An alias for both label and path, the latter when using attach. Required if not using label.

NestedHvEnabled bool

Enable nested hardware virtualization on this virtual machine, facilitating nested virtualization in the guest. Default: false.

NetworkInterfaces List<Pulumi.VSphere.Inputs.VirtualMachineNetworkInterfaceArgs>

A specification for a virtual NIC on this virtual machine. See network interface options below.

NumCoresPerSocket int

The number of cores per socket in this virtual machine. The number of vCPUs on the virtual machine will be num_cpus divided by num_cores_per_socket. If specified, the value supplied to num_cpus must be evenly divisible by this value. Default: 1.

NumCpus int

The total number of virtual processor cores to assign to this virtual machine. Default: 1.

OvfDeploy Pulumi.VSphere.Inputs.VirtualMachineOvfDeployArgs

When specified, the VM will be deployed from the provided ovf/ova template. See creating a virtual machine from a ovf/ova template for more details.

PciDeviceIds List<string>

List of host PCI device IDs to create PCI passthroughs for.

PoweronTimeout int

The amount of time, in seconds, that we will be trying to power on a VM

RunToolsScriptsAfterPowerOn bool

Enable the execution of post-power-on scripts when VMware tools is installed. Default: true.

RunToolsScriptsAfterResume bool

Enable the execution of post-resume scripts when VMware tools is installed. Default: true.

RunToolsScriptsBeforeGuestReboot bool

Enable the execution of pre-reboot scripts when VMware tools is installed. Default: false.

RunToolsScriptsBeforeGuestShutdown bool

Enable the execution of pre-shutdown scripts when VMware tools is installed. Default: true.

RunToolsScriptsBeforeGuestStandby bool

Enable the execution of pre-standby scripts when VMware tools is installed. Default: true.

SataControllerCount int

The number of SATA controllers that Terraform manages on this virtual machine. This directly affects the amount of disks you can add to the virtual machine and the maximum disk unit number. Note that lowering this value does not remove controllers.

ScsiBusSharing string

Mode for sharing the SCSI bus. The modes are physicalSharing, virtualSharing, and noSharing. Default: noSharing.

ScsiControllerCount int

The number of SCSI controllers that this provider manages on this virtual machine. This directly affects the amount of disks you can add to the virtual machine and the maximum disk unit number. Note that lowering this value does not remove controllers. Default: 1.

ScsiType string

The type of SCSI bus this virtual machine will have. Can be one of lsilogic (LSI Logic Parallel), lsilogic-sas (LSI Logic SAS) or pvscsi (VMware Paravirtual). Defualt: pvscsi.

ShutdownWaitTimeout int

The amount of time, in minutes, to wait for a graceful guest shutdown when making necessary updates to the virtual machine. If force_power_off is set to true, the VM will be force powered-off after this timeout, otherwise an error is returned. Default: 3 minutes.

StoragePolicyId string

The UUID of the storage policy to assign to this disk.

SwapPlacementPolicy string

The swap file placement policy for this virtual machine. Can be one of inherit, hostLocal, or vmDirectory. Default: inherit.

SyncTimeWithHost bool

Enable guest clock synchronization with the host. Requires VMware tools to be installed. Default: false.

Tags List<string>

The IDs of any tags to attach to this resource.

Vapp Pulumi.VSphere.Inputs.VirtualMachineVappArgs

Optional vApp configuration. The only sub-key available is properties, which is a key/value map of properties for virtual machines imported from OVF or OVA files. See Using vApp properties to supply OVF/OVA configuration for more details.

WaitForGuestIpTimeout int

The amount of time, in minutes, to wait for an available guest IP address on this virtual machine. This should only be used if your version of VMware Tools does not allow the wait_for_guest_net_timeout waiter to be used. A value less than 1 disables the waiter. Default: 0.

WaitForGuestNetRoutable bool

Controls whether or not the guest network waiter waits for a routable address. When false, the waiter does not wait for a default gateway, nor are IP addresses checked against any discovered default gateways as part of its success criteria. This property is ignored if the wait_for_guest_ip_timeout waiter is used. Default: true.

WaitForGuestNetTimeout int

The amount of time, in minutes, to wait for an available IP address on this virtual machine’s NICs. Older versions of VMware Tools do not populate this property. In those cases, this waiter can be disabled and the wait_for_guest_ip_timeout waiter can be used instead. A value less than 1 disables the waiter. Default: 5 minutes.

ResourcePoolId string

The managed object reference ID of the resource pool to put this virtual machine in. See the section on virtual machine migration for details on changing this value.

AlternateGuestName string

The guest name for the operating system when guest_id is other or other-64.

Annotation string

A user-provided description of the virtual machine. The default is no annotation.

BootDelay int

The number of milliseconds to wait before starting the boot sequence. The default is no delay.

BootRetryDelay int

The number of milliseconds to wait before retrying the boot sequence. This only valid if boot_retry_enabled is true. Default: 10000 (10 seconds).

BootRetryEnabled bool

If set to true, a virtual machine that fails to boot will try again after the delay defined in boot_retry_delay. Default: false.

Cdrom VirtualMachineCdrom

A specification for a CDROM device on this virtual machine. See CDROM options below.

Clone VirtualMachineClone

When specified, the VM will be created as a clone of a specified template. Optional customization options can be submitted as well. See creating a virtual machine from a template for more details.

CpuHotAddEnabled bool

Allow CPUs to be added to this virtual machine while it is running.

CpuHotRemoveEnabled bool

Allow CPUs to be removed to this virtual machine while it is running.

CpuLimit int

The maximum amount of CPU (in MHz) that this virtual machine can consume, regardless of available resources. The default is no limit.

CpuPerformanceCountersEnabled bool

Enable CPU performance counters on this virtual machine. Default: false.

CpuReservation int

The amount of CPU (in MHz) that this virtual machine is guaranteed. The default is no reservation.

CpuShareCount int

The number of CPU shares allocated to the virtual machine when the cpu_share_level is custom.

CpuShareLevel string

The allocation level for CPU resources. Can be one of high, low, normal, or custom. Default: custom.

CustomAttributes map[string]string

Map of custom attribute ids to attribute value strings to set for virtual machine.

DatacenterId string

The datacenter id. Required only when deploying an ovf template.

DatastoreClusterId string

The managed object reference ID of the datastore cluster ID to use. This setting applies to entire virtual machine and implies that you wish to use Storage DRS with this virtual machine. See the section on virtual machine migration for details on changing this value.

DatastoreId string

The datastore ID that the ISO is located in. Requried for using a datastore ISO. Conflicts with client_device.

Disks []VirtualMachineDisk

A specification for a virtual disk device on this virtual machine. See disk options below.

EfiSecureBootEnabled bool

When the firmware type is set to is efi, this enables EFI secure boot. Default: false.

EnableDiskUuid bool

Expose the UUIDs of attached virtual disks to the virtual machine, allowing access to them in the guest. Default: false.

EnableLogging bool

Enable logging of virtual machine events to a log file stored in the virtual machine directory. Default: false.

EptRviMode string

The EPT/RVI (hardware memory virtualization) setting for this virtual machine. Can be one of automatic, on, or off. Default: automatic.

ExtraConfig map[string]string

Extra configuration data for this virtual machine. Can be used to supply advanced parameters not normally in configuration, such as instance metadata.

Firmware string

The firmware interface to use on the virtual machine. Can be one of bios or EFI. Default: bios.

Folder string

The path to the folder to put this virtual machine in, relative to the datacenter that the resource pool is in.

ForcePowerOff bool

If a guest shutdown failed or timed out while updating or destroying (see shutdown_wait_timeout), force the power-off of the virtual machine. Default: true.

GuestId string

The guest ID for the operating system type. For a full list of possible values, see [here][vmware-docs-guest-ids]. Default: other-64.

HardwareVersion int

The hardware version number. Valid range is from 4 to 15. The hardware version cannot be downgraded. See [virtual machine hardware compatibility][virtual-machine-hardware-compatibility] for more details.

HostSystemId string

An optional managed object reference ID of a host to put this virtual machine on. See the section on virtual machine migration for details on changing this value. If a host_system_id is not supplied, vSphere will select a host in the resource pool to place the virtual machine, according to any defaults or DRS policies in place.

HvMode string

The (non-nested) hardware virtualization setting for this virtual machine. Can be one of hvAuto, hvOn, or hvOff. Default: hvAuto.

IdeControllerCount int

The number of IDE controllers that Terraform manages on this virtual machine. This directly affects the amount of disks you can add to the virtual machine and the maximum disk unit number. Note that lowering this value does not remove controllers.

IgnoredGuestIps []string

List of IP addresses and CIDR networks to ignore while waiting for an available IP address using either of the waiters. Any IP addresses in this list will be ignored if they show up so that the waiter will continue to wait for a real IP address. Default: [].

LatencySensitivity string

Controls the scheduling delay of the virtual machine. Use a higher sensitivity for applications that require lower latency, such as VOIP, media player applications, or applications that require frequent access to mouse or keyboard devices. Can be one of low, normal, medium, or high.

Memory int

The size of the virtual machine’s memory, in MB. Default: 1024 (1 GB).

MemoryHotAddEnabled bool

Allow memory to be added to this virtual machine while it is running.

MemoryLimit int

The maximum amount of memory (in MB) that this virtual machine can consume, regardless of available resources. The default is no limit.

MemoryReservation int

The amount of memory (in MB) that this virtual machine is guaranteed. The default is no reservation.

MemoryShareCount int

The number of memory shares allocated to the virtual machine when the memory_share_level is custom.

MemoryShareLevel string

The allocation level for memory resources. Can be one of high, low, normal, or custom. Default: custom.

MigrateWaitTimeout int

The amount of time, in minutes, to wait for a virtual machine migration to complete before failing. Default: 10 minutes. Also see the section on virtual machine migration.

Name string

An alias for both label and path, the latter when using attach. Required if not using label.

NestedHvEnabled bool

Enable nested hardware virtualization on this virtual machine, facilitating nested virtualization in the guest. Default: false.

NetworkInterfaces []VirtualMachineNetworkInterface

A specification for a virtual NIC on this virtual machine. See network interface options below.

NumCoresPerSocket int

The number of cores per socket in this virtual machine. The number of vCPUs on the virtual machine will be num_cpus divided by num_cores_per_socket. If specified, the value supplied to num_cpus must be evenly divisible by this value. Default: 1.

NumCpus int

The total number of virtual processor cores to assign to this virtual machine. Default: 1.

OvfDeploy VirtualMachineOvfDeploy

When specified, the VM will be deployed from the provided ovf/ova template. See creating a virtual machine from a ovf/ova template for more details.

PciDeviceIds []string

List of host PCI device IDs to create PCI passthroughs for.

PoweronTimeout int

The amount of time, in seconds, that we will be trying to power on a VM

RunToolsScriptsAfterPowerOn bool

Enable the execution of post-power-on scripts when VMware tools is installed. Default: true.

RunToolsScriptsAfterResume bool

Enable the execution of post-resume scripts when VMware tools is installed. Default: true.

RunToolsScriptsBeforeGuestReboot bool

Enable the execution of pre-reboot scripts when VMware tools is installed. Default: false.

RunToolsScriptsBeforeGuestShutdown bool

Enable the execution of pre-shutdown scripts when VMware tools is installed. Default: true.

RunToolsScriptsBeforeGuestStandby bool

Enable the execution of pre-standby scripts when VMware tools is installed. Default: true.

SataControllerCount int

The number of SATA controllers that Terraform manages on this virtual machine. This directly affects the amount of disks you can add to the virtual machine and the maximum disk unit number. Note that lowering this value does not remove controllers.

ScsiBusSharing string

Mode for sharing the SCSI bus. The modes are physicalSharing, virtualSharing, and noSharing. Default: noSharing.

ScsiControllerCount int

The number of SCSI controllers that this provider manages on this virtual machine. This directly affects the amount of disks you can add to the virtual machine and the maximum disk unit number. Note that lowering this value does not remove controllers. Default: 1.

ScsiType string

The type of SCSI bus this virtual machine will have. Can be one of lsilogic (LSI Logic Parallel), lsilogic-sas (LSI Logic SAS) or pvscsi (VMware Paravirtual). Defualt: pvscsi.

ShutdownWaitTimeout int

The amount of time, in minutes, to wait for a graceful guest shutdown when making necessary updates to the virtual machine. If force_power_off is set to true, the VM will be force powered-off after this timeout, otherwise an error is returned. Default: 3 minutes.

StoragePolicyId string

The UUID of the storage policy to assign to this disk.

SwapPlacementPolicy string

The swap file placement policy for this virtual machine. Can be one of inherit, hostLocal, or vmDirectory. Default: inherit.

SyncTimeWithHost bool

Enable guest clock synchronization with the host. Requires VMware tools to be installed. Default: false.

Tags []string

The IDs of any tags to attach to this resource.

Vapp VirtualMachineVapp

Optional vApp configuration. The only sub-key available is properties, which is a key/value map of properties for virtual machines imported from OVF or OVA files. See Using vApp properties to supply OVF/OVA configuration for more details.

WaitForGuestIpTimeout int

The amount of time, in minutes, to wait for an available guest IP address on this virtual machine. This should only be used if your version of VMware Tools does not allow the wait_for_guest_net_timeout waiter to be used. A value less than 1 disables the waiter. Default: 0.

WaitForGuestNetRoutable bool

Controls whether or not the guest network waiter waits for a routable address. When false, the waiter does not wait for a default gateway, nor are IP addresses checked against any discovered default gateways as part of its success criteria. This property is ignored if the wait_for_guest_ip_timeout waiter is used. Default: true.

WaitForGuestNetTimeout int

The amount of time, in minutes, to wait for an available IP address on this virtual machine’s NICs. Older versions of VMware Tools do not populate this property. In those cases, this waiter can be disabled and the wait_for_guest_ip_timeout waiter can be used instead. A value less than 1 disables the waiter. Default: 5 minutes.

resourcePoolId string

The managed object reference ID of the resource pool to put this virtual machine in. See the section on virtual machine migration for details on changing this value.

alternateGuestName string

The guest name for the operating system when guest_id is other or other-64.

annotation string

A user-provided description of the virtual machine. The default is no annotation.

bootDelay number

The number of milliseconds to wait before starting the boot sequence. The default is no delay.

bootRetryDelay number

The number of milliseconds to wait before retrying the boot sequence. This only valid if boot_retry_enabled is true. Default: 10000 (10 seconds).

bootRetryEnabled boolean

If set to true, a virtual machine that fails to boot will try again after the delay defined in boot_retry_delay. Default: false.

cdrom VirtualMachineCdrom

A specification for a CDROM device on this virtual machine. See CDROM options below.

clone VirtualMachineClone

When specified, the VM will be created as a clone of a specified template. Optional customization options can be submitted as well. See creating a virtual machine from a template for more details.

cpuHotAddEnabled boolean

Allow CPUs to be added to this virtual machine while it is running.

cpuHotRemoveEnabled boolean

Allow CPUs to be removed to this virtual machine while it is running.

cpuLimit number

The maximum amount of CPU (in MHz) that this virtual machine can consume, regardless of available resources. The default is no limit.

cpuPerformanceCountersEnabled boolean

Enable CPU performance counters on this virtual machine. Default: false.

cpuReservation number

The amount of CPU (in MHz) that this virtual machine is guaranteed. The default is no reservation.

cpuShareCount number

The number of CPU shares allocated to the virtual machine when the cpu_share_level is custom.

cpuShareLevel string

The allocation level for CPU resources. Can be one of high, low, normal, or custom. Default: custom.

customAttributes {[key: string]: string}

Map of custom attribute ids to attribute value strings to set for virtual machine.

datacenterId string

The datacenter id. Required only when deploying an ovf template.

datastoreClusterId string

The managed object reference ID of the datastore cluster ID to use. This setting applies to entire virtual machine and implies that you wish to use Storage DRS with this virtual machine. See the section on virtual machine migration for details on changing this value.

datastoreId string

The datastore ID that the ISO is located in. Requried for using a datastore ISO. Conflicts with client_device.

disks VirtualMachineDisk[]

A specification for a virtual disk device on this virtual machine. See disk options below.

efiSecureBootEnabled boolean

When the firmware type is set to is efi, this enables EFI secure boot. Default: false.

enableDiskUuid boolean

Expose the UUIDs of attached virtual disks to the virtual machine, allowing access to them in the guest. Default: false.

enableLogging boolean

Enable logging of virtual machine events to a log file stored in the virtual machine directory. Default: false.

eptRviMode string

The EPT/RVI (hardware memory virtualization) setting for this virtual machine. Can be one of automatic, on, or off. Default: automatic.

extraConfig {[key: string]: string}

Extra configuration data for this virtual machine. Can be used to supply advanced parameters not normally in configuration, such as instance metadata.

firmware string

The firmware interface to use on the virtual machine. Can be one of bios or EFI. Default: bios.

folder string

The path to the folder to put this virtual machine in, relative to the datacenter that the resource pool is in.

forcePowerOff boolean

If a guest shutdown failed or timed out while updating or destroying (see shutdown_wait_timeout), force the power-off of the virtual machine. Default: true.

guestId string

The guest ID for the operating system type. For a full list of possible values, see [here][vmware-docs-guest-ids]. Default: other-64.

hardwareVersion number

The hardware version number. Valid range is from 4 to 15. The hardware version cannot be downgraded. See [virtual machine hardware compatibility][virtual-machine-hardware-compatibility] for more details.

hostSystemId string

An optional managed object reference ID of a host to put this virtual machine on. See the section on virtual machine migration for details on changing this value. If a host_system_id is not supplied, vSphere will select a host in the resource pool to place the virtual machine, according to any defaults or DRS policies in place.

hvMode string

The (non-nested) hardware virtualization setting for this virtual machine. Can be one of hvAuto, hvOn, or hvOff. Default: hvAuto.

ideControllerCount number

The number of IDE controllers that Terraform manages on this virtual machine. This directly affects the amount of disks you can add to the virtual machine and the maximum disk unit number. Note that lowering this value does not remove controllers.

ignoredGuestIps string[]

List of IP addresses and CIDR networks to ignore while waiting for an available IP address using either of the waiters. Any IP addresses in this list will be ignored if they show up so that the waiter will continue to wait for a real IP address. Default: [].

latencySensitivity string

Controls the scheduling delay of the virtual machine. Use a higher sensitivity for applications that require lower latency, such as VOIP, media player applications, or applications that require frequent access to mouse or keyboard devices. Can be one of low, normal, medium, or high.

memory number

The size of the virtual machine’s memory, in MB. Default: 1024 (1 GB).

memoryHotAddEnabled boolean

Allow memory to be added to this virtual machine while it is running.

memoryLimit number

The maximum amount of memory (in MB) that this virtual machine can consume, regardless of available resources. The default is no limit.

memoryReservation number

The amount of memory (in MB) that this virtual machine is guaranteed. The default is no reservation.

memoryShareCount number

The number of memory shares allocated to the virtual machine when the memory_share_level is custom.

memoryShareLevel string

The allocation level for memory resources. Can be one of high, low, normal, or custom. Default: custom.

migrateWaitTimeout number

The amount of time, in minutes, to wait for a virtual machine migration to complete before failing. Default: 10 minutes. Also see the section on virtual machine migration.

name string

An alias for both label and path, the latter when using attach. Required if not using label.

nestedHvEnabled boolean

Enable nested hardware virtualization on this virtual machine, facilitating nested virtualization in the guest. Default: false.

networkInterfaces VirtualMachineNetworkInterface[]

A specification for a virtual NIC on this virtual machine. See network interface options below.

numCoresPerSocket number

The number of cores per socket in this virtual machine. The number of vCPUs on the virtual machine will be num_cpus divided by num_cores_per_socket. If specified, the value supplied to num_cpus must be evenly divisible by this value. Default: 1.

numCpus number

The total number of virtual processor cores to assign to this virtual machine. Default: 1.

ovfDeploy VirtualMachineOvfDeploy

When specified, the VM will be deployed from the provided ovf/ova template. See creating a virtual machine from a ovf/ova template for more details.

pciDeviceIds string[]

List of host PCI device IDs to create PCI passthroughs for.

poweronTimeout number

The amount of time, in seconds, that we will be trying to power on a VM

runToolsScriptsAfterPowerOn boolean

Enable the execution of post-power-on scripts when VMware tools is installed. Default: true.

runToolsScriptsAfterResume boolean

Enable the execution of post-resume scripts when VMware tools is installed. Default: true.

runToolsScriptsBeforeGuestReboot boolean

Enable the execution of pre-reboot scripts when VMware tools is installed. Default: false.

runToolsScriptsBeforeGuestShutdown boolean

Enable the execution of pre-shutdown scripts when VMware tools is installed. Default: true.

runToolsScriptsBeforeGuestStandby boolean

Enable the execution of pre-standby scripts when VMware tools is installed. Default: true.

sataControllerCount number

The number of SATA controllers that Terraform manages on this virtual machine. This directly affects the amount of disks you can add to the virtual machine and the maximum disk unit number. Note that lowering this value does not remove controllers.

scsiBusSharing string

Mode for sharing the SCSI bus. The modes are physicalSharing, virtualSharing, and noSharing. Default: noSharing.

scsiControllerCount number

The number of SCSI controllers that this provider manages on this virtual machine. This directly affects the amount of disks you can add to the virtual machine and the maximum disk unit number. Note that lowering this value does not remove controllers. Default: 1.

scsiType string

The type of SCSI bus this virtual machine will have. Can be one of lsilogic (LSI Logic Parallel), lsilogic-sas (LSI Logic SAS) or pvscsi (VMware Paravirtual). Defualt: pvscsi.

shutdownWaitTimeout number

The amount of time, in minutes, to wait for a graceful guest shutdown when making necessary updates to the virtual machine. If force_power_off is set to true, the VM will be force powered-off after this timeout, otherwise an error is returned. Default: 3 minutes.

storagePolicyId string

The UUID of the storage policy to assign to this disk.

swapPlacementPolicy string

The swap file placement policy for this virtual machine. Can be one of inherit, hostLocal, or vmDirectory. Default: inherit.

syncTimeWithHost boolean

Enable guest clock synchronization with the host. Requires VMware tools to be installed. Default: false.

tags string[]

The IDs of any tags to attach to this resource.

vapp VirtualMachineVapp

Optional vApp configuration. The only sub-key available is properties, which is a key/value map of properties for virtual machines imported from OVF or OVA files. See Using vApp properties to supply OVF/OVA configuration for more details.

waitForGuestIpTimeout number

The amount of time, in minutes, to wait for an available guest IP address on this virtual machine. This should only be used if your version of VMware Tools does not allow the wait_for_guest_net_timeout waiter to be used. A value less than 1 disables the waiter. Default: 0.

waitForGuestNetRoutable boolean

Controls whether or not the guest network waiter waits for a routable address. When false, the waiter does not wait for a default gateway, nor are IP addresses checked against any discovered default gateways as part of its success criteria. This property is ignored if the wait_for_guest_ip_timeout waiter is used. Default: true.

waitForGuestNetTimeout number

The amount of time, in minutes, to wait for an available IP address on this virtual machine’s NICs. Older versions of VMware Tools do not populate this property. In those cases, this waiter can be disabled and the wait_for_guest_ip_timeout waiter can be used instead. A value less than 1 disables the waiter. Default: 5 minutes.

resource_pool_id str

The managed object reference ID of the resource pool to put this virtual machine in. See the section on virtual machine migration for details on changing this value.

alternate_guest_name str

The guest name for the operating system when guest_id is other or other-64.

annotation str

A user-provided description of the virtual machine. The default is no annotation.

boot_delay int

The number of milliseconds to wait before starting the boot sequence. The default is no delay.

boot_retry_delay int

The number of milliseconds to wait before retrying the boot sequence. This only valid if boot_retry_enabled is true. Default: 10000 (10 seconds).

boot_retry_enabled bool

If set to true, a virtual machine that fails to boot will try again after the delay defined in boot_retry_delay. Default: false.

cdrom VirtualMachineCdromArgs

A specification for a CDROM device on this virtual machine. See CDROM options below.

clone VirtualMachineCloneArgs

When specified, the VM will be created as a clone of a specified template. Optional customization options can be submitted as well. See creating a virtual machine from a template for more details.

cpu_hot_add_enabled bool

Allow CPUs to be added to this virtual machine while it is running.

cpu_hot_remove_enabled bool

Allow CPUs to be removed to this virtual machine while it is running.

cpu_limit int

The maximum amount of CPU (in MHz) that this virtual machine can consume, regardless of available resources. The default is no limit.

cpu_performance_counters_enabled bool

Enable CPU performance counters on this virtual machine. Default: false.

cpu_reservation int

The amount of CPU (in MHz) that this virtual machine is guaranteed. The default is no reservation.

cpu_share_count int

The number of CPU shares allocated to the virtual machine when the cpu_share_level is custom.

cpu_share_level str

The allocation level for CPU resources. Can be one of high, low, normal, or custom. Default: custom.

custom_attributes Mapping[str, str]

Map of custom attribute ids to attribute value strings to set for virtual machine.

datacenter_id str

The datacenter id. Required only when deploying an ovf template.

datastore_cluster_id str

The managed object reference ID of the datastore cluster ID to use. This setting applies to entire virtual machine and implies that you wish to use Storage DRS with this virtual machine. See the section on virtual machine migration for details on changing this value.

datastore_id str

The datastore ID that the ISO is located in. Requried for using a datastore ISO. Conflicts with client_device.

disks Sequence[VirtualMachineDiskArgs]

A specification for a virtual disk device on this virtual machine. See disk options below.

efi_secure_boot_enabled bool

When the firmware type is set to is efi, this enables EFI secure boot. Default: false.

enable_disk_uuid bool

Expose the UUIDs of attached virtual disks to the virtual machine, allowing access to them in the guest. Default: false.

enable_logging bool

Enable logging of virtual machine events to a log file stored in the virtual machine directory. Default: false.

ept_rvi_mode str

The EPT/RVI (hardware memory virtualization) setting for this virtual machine. Can be one of automatic, on, or off. Default: automatic.

extra_config Mapping[str, str]

Extra configuration data for this virtual machine. Can be used to supply advanced parameters not normally in configuration, such as instance metadata.

firmware str

The firmware interface to use on the virtual machine. Can be one of bios or EFI. Default: bios.

folder str

The path to the folder to put this virtual machine in, relative to the datacenter that the resource pool is in.

force_power_off bool

If a guest shutdown failed or timed out while updating or destroying (see shutdown_wait_timeout), force the power-off of the virtual machine. Default: true.

guest_id str

The guest ID for the operating system type. For a full list of possible values, see [here][vmware-docs-guest-ids]. Default: other-64.

hardware_version int

The hardware version number. Valid range is from 4 to 15. The hardware version cannot be downgraded. See [virtual machine hardware compatibility][virtual-machine-hardware-compatibility] for more details.

host_system_id str

An optional managed object reference ID of a host to put this virtual machine on. See the section on virtual machine migration for details on changing this value. If a host_system_id is not supplied, vSphere will select a host in the resource pool to place the virtual machine, according to any defaults or DRS policies in place.

hv_mode str

The (non-nested) hardware virtualization setting for this virtual machine. Can be one of hvAuto, hvOn, or hvOff. Default: hvAuto.

ide_controller_count int

The number of IDE controllers that Terraform manages on this virtual machine. This directly affects the amount of disks you can add to the virtual machine and the maximum disk unit number. Note that lowering this value does not remove controllers.

ignored_guest_ips Sequence[str]

List of IP addresses and CIDR networks to ignore while waiting for an available IP address using either of the waiters. Any IP addresses in this list will be ignored if they show up so that the waiter will continue to wait for a real IP address. Default: [].

latency_sensitivity str

Controls the scheduling delay of the virtual machine. Use a higher sensitivity for applications that require lower latency, such as VOIP, media player applications, or applications that require frequent access to mouse or keyboard devices. Can be one of low, normal, medium, or high.

memory int

The size of the virtual machine’s memory, in MB. Default: 1024 (1 GB).

memory_hot_add_enabled bool

Allow memory to be added to this virtual machine while it is running.

memory_limit int

The maximum amount of memory (in MB) that this virtual machine can consume, regardless of available resources. The default is no limit.

memory_reservation int

The amount of memory (in MB) that this virtual machine is guaranteed. The default is no reservation.

memory_share_count int

The number of memory shares allocated to the virtual machine when the memory_share_level is custom.

memory_share_level str

The allocation level for memory resources. Can be one of high, low, normal, or custom. Default: custom.

migrate_wait_timeout int

The amount of time, in minutes, to wait for a virtual machine migration to complete before failing. Default: 10 minutes. Also see the section on virtual machine migration.

name str

An alias for both label and path, the latter when using attach. Required if not using label.

nested_hv_enabled bool

Enable nested hardware virtualization on this virtual machine, facilitating nested virtualization in the guest. Default: false.

network_interfaces Sequence[VirtualMachineNetworkInterfaceArgs]

A specification for a virtual NIC on this virtual machine. See network interface options below.

num_cores_per_socket int

The number of cores per socket in this virtual machine. The number of vCPUs on the virtual machine will be num_cpus divided by num_cores_per_socket. If specified, the value supplied to num_cpus must be evenly divisible by this value. Default: 1.

num_cpus int

The total number of virtual processor cores to assign to this virtual machine. Default: 1.

ovf_deploy VirtualMachineOvfDeployArgs

When specified, the VM will be deployed from the provided ovf/ova template. See creating a virtual machine from a ovf/ova template for more details.

pci_device_ids Sequence[str]

List of host PCI device IDs to create PCI passthroughs for.

poweron_timeout int

The amount of time, in seconds, that we will be trying to power on a VM

run_tools_scripts_after_power_on bool

Enable the execution of post-power-on scripts when VMware tools is installed. Default: true.

run_tools_scripts_after_resume bool

Enable the execution of post-resume scripts when VMware tools is installed. Default: true.

run_tools_scripts_before_guest_reboot bool

Enable the execution of pre-reboot scripts when VMware tools is installed. Default: false.

run_tools_scripts_before_guest_shutdown bool

Enable the execution of pre-shutdown scripts when VMware tools is installed. Default: true.

run_tools_scripts_before_guest_standby bool

Enable the execution of pre-standby scripts when VMware tools is installed. Default: true.

sata_controller_count int

The number of SATA controllers that Terraform manages on this virtual machine. This directly affects the amount of disks you can add to the virtual machine and the maximum disk unit number. Note that lowering this value does not remove controllers.

scsi_bus_sharing str

Mode for sharing the SCSI bus. The modes are physicalSharing, virtualSharing, and noSharing. Default: noSharing.

scsi_controller_count int

The number of SCSI controllers that this provider manages on this virtual machine. This directly affects the amount of disks you can add to the virtual machine and the maximum disk unit number. Note that lowering this value does not remove controllers. Default: 1.

scsi_type str

The type of SCSI bus this virtual machine will have. Can be one of lsilogic (LSI Logic Parallel), lsilogic-sas (LSI Logic SAS) or pvscsi (VMware Paravirtual). Defualt: pvscsi.

shutdown_wait_timeout int

The amount of time, in minutes, to wait for a graceful guest shutdown when making necessary updates to the virtual machine. If force_power_off is set to true, the VM will be force powered-off after this timeout, otherwise an error is returned. Default: 3 minutes.

storage_policy_id str

The UUID of the storage policy to assign to this disk.

swap_placement_policy str

The swap file placement policy for this virtual machine. Can be one of inherit, hostLocal, or vmDirectory. Default: inherit.

sync_time_with_host bool

Enable guest clock synchronization with the host. Requires VMware tools to be installed. Default: false.

tags Sequence[str]

The IDs of any tags to attach to this resource.

vapp VirtualMachineVappArgs

Optional vApp configuration. The only sub-key available is properties, which is a key/value map of properties for virtual machines imported from OVF or OVA files. See Using vApp properties to supply OVF/OVA configuration for more details.

wait_for_guest_ip_timeout int

The amount of time, in minutes, to wait for an available guest IP address on this virtual machine. This should only be used if your version of VMware Tools does not allow the wait_for_guest_net_timeout waiter to be used. A value less than 1 disables the waiter. Default: 0.

wait_for_guest_net_routable bool

Controls whether or not the guest network waiter waits for a routable address. When false, the waiter does not wait for a default gateway, nor are IP addresses checked against any discovered default gateways as part of its success criteria. This property is ignored if the wait_for_guest_ip_timeout waiter is used. Default: true.

wait_for_guest_net_timeout int

The amount of time, in minutes, to wait for an available IP address on this virtual machine’s NICs. Older versions of VMware Tools do not populate this property. In those cases, this waiter can be disabled and the wait_for_guest_ip_timeout waiter can be used instead. A value less than 1 disables the waiter. Default: 5 minutes.

Outputs

All input properties are implicitly available as output properties. Additionally, the VirtualMachine resource produces the following output properties:

ChangeVersion string

A unique identifier for a given version of the last configuration applied, such the timestamp of the last update to the configuration.

DefaultIpAddress string

The IP address selected by the provider to be used with any provisioners configured on this resource. Whenever possible, this is the first IPv4 address that is reachable through the default gateway configured on the machine, then the first reachable IPv6 address, and then the first general discovered address if neither exist. If VMware tools is not running on the virtual machine, or if the VM is powered off, this value will be blank.

GuestIpAddresses List<string>

The current list of IP addresses on this machine, including the value of default_ip_address. If VMware tools is not running on the virtual machine, or if the VM is powered off, this list will be empty. * moid: The managed object reference ID of the created virtual machine.

Id string
The provider-assigned unique ID for this managed resource.
Imported bool

This is flagged if the virtual machine has been imported, or the state has been migrated from a previous version of the resource. It influences the behavior of the first post-import apply operation. See the section on importing below.

Moid string

The machine object ID from VMWare

RebootRequired bool

Value internal to the provider used to determine if a configuration set change requires a reboot. This value is only useful during an update process and gets reset on refresh.

Uuid string

The UUID of the virtual disk’s VMDK file. This is used to track the virtual disk on the virtual machine.

VappTransports List<string>

Computed value which is only valid for cloned virtual machines. A list of vApp transport methods supported by the source virtual machine or template.

VmwareToolsStatus string

The state of VMware tools in the guest. This will determine the proper course of action for some device operations.

VmxPath string

The path of the virtual machine’s configuration file in the VM’s datastore.

ChangeVersion string

A unique identifier for a given version of the last configuration applied, such the timestamp of the last update to the configuration.

DefaultIpAddress string

The IP address selected by the provider to be used with any provisioners configured on this resource. Whenever possible, this is the first IPv4 address that is reachable through the default gateway configured on the machine, then the first reachable IPv6 address, and then the first general discovered address if neither exist. If VMware tools is not running on the virtual machine, or if the VM is powered off, this value will be blank.

GuestIpAddresses []string

The current list of IP addresses on this machine, including the value of default_ip_address. If VMware tools is not running on the virtual machine, or if the VM is powered off, this list will be empty. * moid: The managed object reference ID of the created virtual machine.

Id string
The provider-assigned unique ID for this managed resource.
Imported bool

This is flagged if the virtual machine has been imported, or the state has been migrated from a previous version of the resource. It influences the behavior of the first post-import apply operation. See the section on importing below.

Moid string

The machine object ID from VMWare

RebootRequired bool

Value internal to the provider used to determine if a configuration set change requires a reboot. This value is only useful during an update process and gets reset on refresh.

Uuid string

The UUID of the virtual disk’s VMDK file. This is used to track the virtual disk on the virtual machine.

VappTransports []string

Computed value which is only valid for cloned virtual machines. A list of vApp transport methods supported by the source virtual machine or template.

VmwareToolsStatus string

The state of VMware tools in the guest. This will determine the proper course of action for some device operations.

VmxPath string

The path of the virtual machine’s configuration file in the VM’s datastore.

changeVersion string

A unique identifier for a given version of the last configuration applied, such the timestamp of the last update to the configuration.

defaultIpAddress string

The IP address selected by the provider to be used with any provisioners configured on this resource. Whenever possible, this is the first IPv4 address that is reachable through the default gateway configured on the machine, then the first reachable IPv6 address, and then the first general discovered address if neither exist. If VMware tools is not running on the virtual machine, or if the VM is powered off, this value will be blank.

guestIpAddresses string[]

The current list of IP addresses on this machine, including the value of default_ip_address. If VMware tools is not running on the virtual machine, or if the VM is powered off, this list will be empty. * moid: The managed object reference ID of the created virtual machine.

id string
The provider-assigned unique ID for this managed resource.
imported boolean

This is flagged if the virtual machine has been imported, or the state has been migrated from a previous version of the resource. It influences the behavior of the first post-import apply operation. See the section on importing below.

moid string

The machine object ID from VMWare

rebootRequired boolean

Value internal to the provider used to determine if a configuration set change requires a reboot. This value is only useful during an update process and gets reset on refresh.

uuid string

The UUID of the virtual disk’s VMDK file. This is used to track the virtual disk on the virtual machine.

vappTransports string[]

Computed value which is only valid for cloned virtual machines. A list of vApp transport methods supported by the source virtual machine or template.

vmwareToolsStatus string

The state of VMware tools in the guest. This will determine the proper course of action for some device operations.

vmxPath string

The path of the virtual machine’s configuration file in the VM’s datastore.

change_version str

A unique identifier for a given version of the last configuration applied, such the timestamp of the last update to the configuration.

default_ip_address str

The IP address selected by the provider to be used with any provisioners configured on this resource. Whenever possible, this is the first IPv4 address that is reachable through the default gateway configured on the machine, then the first reachable IPv6 address, and then the first general discovered address if neither exist. If VMware tools is not running on the virtual machine, or if the VM is powered off, this value will be blank.

guest_ip_addresses Sequence[str]

The current list of IP addresses on this machine, including the value of default_ip_address. If VMware tools is not running on the virtual machine, or if the VM is powered off, this list will be empty. * moid: The managed object reference ID of the created virtual machine.

id str
The provider-assigned unique ID for this managed resource.
imported bool

This is flagged if the virtual machine has been imported, or the state has been migrated from a previous version of the resource. It influences the behavior of the first post-import apply operation. See the section on importing below.

moid str

The machine object ID from VMWare

reboot_required bool

Value internal to the provider used to determine if a configuration set change requires a reboot. This value is only useful during an update process and gets reset on refresh.

uuid str

The UUID of the virtual disk’s VMDK file. This is used to track the virtual disk on the virtual machine.

vapp_transports Sequence[str]

Computed value which is only valid for cloned virtual machines. A list of vApp transport methods supported by the source virtual machine or template.

vmware_tools_status str

The state of VMware tools in the guest. This will determine the proper course of action for some device operations.

vmx_path str

The path of the virtual machine’s configuration file in the VM’s datastore.

Look up an Existing VirtualMachine Resource

Get an existing VirtualMachine resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: VirtualMachineState, opts?: CustomResourceOptions): VirtualMachine
@staticmethod
def get(resource_name: str, id: str, opts: Optional[ResourceOptions] = None, alternate_guest_name: Optional[str] = None, annotation: Optional[str] = None, boot_delay: Optional[int] = None, boot_retry_delay: Optional[int] = None, boot_retry_enabled: Optional[bool] = None, cdrom: Optional[VirtualMachineCdromArgs] = None, change_version: Optional[str] = None, clone: Optional[VirtualMachineCloneArgs] = None, cpu_hot_add_enabled: Optional[bool] = None, cpu_hot_remove_enabled: Optional[bool] = None, cpu_limit: Optional[int] = None, cpu_performance_counters_enabled: Optional[bool] = None, cpu_reservation: Optional[int] = None, cpu_share_count: Optional[int] = None, cpu_share_level: Optional[str] = None, custom_attributes: Optional[Mapping[str, str]] = None, datacenter_id: Optional[str] = None, datastore_cluster_id: Optional[str] = None, datastore_id: Optional[str] = None, default_ip_address: Optional[str] = None, disks: Optional[Sequence[VirtualMachineDiskArgs]] = None, efi_secure_boot_enabled: Optional[bool] = None, enable_disk_uuid: Optional[bool] = None, enable_logging: Optional[bool] = None, ept_rvi_mode: Optional[str] = None, extra_config: Optional[Mapping[str, str]] = None, firmware: Optional[str] = None, folder: Optional[str] = None, force_power_off: Optional[bool] = None, guest_id: Optional[str] = None, guest_ip_addresses: Optional[Sequence[str]] = None, hardware_version: Optional[int] = None, host_system_id: Optional[str] = None, hv_mode: Optional[str] = None, ide_controller_count: Optional[int] = None, ignored_guest_ips: Optional[Sequence[str]] = None, imported: Optional[bool] = None, latency_sensitivity: Optional[str] = None, memory: Optional[int] = None, memory_hot_add_enabled: Optional[bool] = None, memory_limit: Optional[int] = None, memory_reservation: Optional[int] = None, memory_share_count: Optional[int] = None, memory_share_level: Optional[str] = None, migrate_wait_timeout: Optional[int] = None, moid: Optional[str] = None, name: Optional[str] = None, nested_hv_enabled: Optional[bool] = None, network_interfaces: Optional[Sequence[VirtualMachineNetworkInterfaceArgs]] = None, num_cores_per_socket: Optional[int] = None, num_cpus: Optional[int] = None, ovf_deploy: Optional[VirtualMachineOvfDeployArgs] = None, pci_device_ids: Optional[Sequence[str]] = None, poweron_timeout: Optional[int] = None, reboot_required: Optional[bool] = None, resource_pool_id: Optional[str] = None, run_tools_scripts_after_power_on: Optional[bool] = None, run_tools_scripts_after_resume: Optional[bool] = None, run_tools_scripts_before_guest_reboot: Optional[bool] = None, run_tools_scripts_before_guest_shutdown: Optional[bool] = None, run_tools_scripts_before_guest_standby: Optional[bool] = None, sata_controller_count: Optional[int] = None, scsi_bus_sharing: Optional[str] = None, scsi_controller_count: Optional[int] = None, scsi_type: Optional[str] = None, shutdown_wait_timeout: Optional[int] = None, storage_policy_id: Optional[str] = None, swap_placement_policy: Optional[str] = None, sync_time_with_host: Optional[bool] = None, tags: Optional[Sequence[str]] = None, uuid: Optional[str] = None, vapp: Optional[VirtualMachineVappArgs] = None, vapp_transports: Optional[Sequence[str]] = None, vmware_tools_status: Optional[str] = None, vmx_path: Optional[str] = None, wait_for_guest_ip_timeout: Optional[int] = None, wait_for_guest_net_routable: Optional[bool] = None, wait_for_guest_net_timeout: Optional[int] = None) -> VirtualMachine
func GetVirtualMachine(ctx *Context, name string, id IDInput, state *VirtualMachineState, opts ...ResourceOption) (*VirtualMachine, error)
public static VirtualMachine Get(string name, Input<string> id, VirtualMachineState? state, CustomResourceOptions? opts = null)
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.

The following state arguments are supported:

AlternateGuestName string

The guest name for the operating system when guest_id is other or other-64.

Annotation string

A user-provided description of the virtual machine. The default is no annotation.

BootDelay int

The number of milliseconds to wait before starting the boot sequence. The default is no delay.

BootRetryDelay int

The number of milliseconds to wait before retrying the boot sequence. This only valid if boot_retry_enabled is true. Default: 10000 (10 seconds).

BootRetryEnabled bool

If set to true, a virtual machine that fails to boot will try again after the delay defined in boot_retry_delay. Default: false.

Cdrom Pulumi.VSphere.Inputs.VirtualMachineCdromArgs

A specification for a CDROM device on this virtual machine. See CDROM options below.

ChangeVersion string

A unique identifier for a given version of the last configuration applied, such the timestamp of the last update to the configuration.

Clone Pulumi.VSphere.Inputs.VirtualMachineCloneArgs

When specified, the VM will be created as a clone of a specified template. Optional customization options can be submitted as well. See creating a virtual machine from a template for more details.

CpuHotAddEnabled bool

Allow CPUs to be added to this virtual machine while it is running.

CpuHotRemoveEnabled bool

Allow CPUs to be removed to this virtual machine while it is running.

CpuLimit int

The maximum amount of CPU (in MHz) that this virtual machine can consume, regardless of available resources. The default is no limit.

CpuPerformanceCountersEnabled bool

Enable CPU performance counters on this virtual machine. Default: false.

CpuReservation int

The amount of CPU (in MHz) that this virtual machine is guaranteed. The default is no reservation.

CpuShareCount int

The number of CPU shares allocated to the virtual machine when the cpu_share_level is custom.

CpuShareLevel string

The allocation level for CPU resources. Can be one of high, low, normal, or custom. Default: custom.

CustomAttributes Dictionary<string, string>

Map of custom attribute ids to attribute value strings to set for virtual machine.

DatacenterId string

The datacenter id. Required only when deploying an ovf template.

DatastoreClusterId string

The managed object reference ID of the datastore cluster ID to use. This setting applies to entire virtual machine and implies that you wish to use Storage DRS with this virtual machine. See the section on virtual machine migration for details on changing this value.

DatastoreId string

The datastore ID that the ISO is located in. Requried for using a datastore ISO. Conflicts with client_device.

DefaultIpAddress string

The IP address selected by the provider to be used with any provisioners configured on this resource. Whenever possible, this is the first IPv4 address that is reachable through the default gateway configured on the machine, then the first reachable IPv6 address, and then the first general discovered address if neither exist. If VMware tools is not running on the virtual machine, or if the VM is powered off, this value will be blank.

Disks List<Pulumi.VSphere.Inputs.VirtualMachineDiskArgs>

A specification for a virtual disk device on this virtual machine. See disk options below.

EfiSecureBootEnabled bool

When the firmware type is set to is efi, this enables EFI secure boot. Default: false.

EnableDiskUuid bool

Expose the UUIDs of attached virtual disks to the virtual machine, allowing access to them in the guest. Default: false.

EnableLogging bool

Enable logging of virtual machine events to a log file stored in the virtual machine directory. Default: false.

EptRviMode string

The EPT/RVI (hardware memory virtualization) setting for this virtual machine. Can be one of automatic, on, or off. Default: automatic.

ExtraConfig Dictionary<string, string>

Extra configuration data for this virtual machine. Can be used to supply advanced parameters not normally in configuration, such as instance metadata.

Firmware string

The firmware interface to use on the virtual machine. Can be one of bios or EFI. Default: bios.

Folder string

The path to the folder to put this virtual machine in, relative to the datacenter that the resource pool is in.

ForcePowerOff bool

If a guest shutdown failed or timed out while updating or destroying (see shutdown_wait_timeout), force the power-off of the virtual machine. Default: true.

GuestId string

The guest ID for the operating system type. For a full list of possible values, see [here][vmware-docs-guest-ids]. Default: other-64.

GuestIpAddresses List<string>

The current list of IP addresses on this machine, including the value of default_ip_address. If VMware tools is not running on the virtual machine, or if the VM is powered off, this list will be empty. * moid: The managed object reference ID of the created virtual machine.

HardwareVersion int

The hardware version number. Valid range is from 4 to 15. The hardware version cannot be downgraded. See [virtual machine hardware compatibility][virtual-machine-hardware-compatibility] for more details.

HostSystemId string

An optional managed object reference ID of a host to put this virtual machine on. See the section on virtual machine migration for details on changing this value. If a host_system_id is not supplied, vSphere will select a host in the resource pool to place the virtual machine, according to any defaults or DRS policies in place.

HvMode string

The (non-nested) hardware virtualization setting for this virtual machine. Can be one of hvAuto, hvOn, or hvOff. Default: hvAuto.

IdeControllerCount int

The number of IDE controllers that Terraform manages on this virtual machine. This directly affects the amount of disks you can add to the virtual machine and the maximum disk unit number. Note that lowering this value does not remove controllers.

IgnoredGuestIps List<string>

List of IP addresses and CIDR networks to ignore while waiting for an available IP address using either of the waiters. Any IP addresses in this list will be ignored if they show up so that the waiter will continue to wait for a real IP address. Default: [].

Imported bool

This is flagged if the virtual machine has been imported, or the state has been migrated from a previous version of the resource. It influences the behavior of the first post-import apply operation. See the section on importing below.

LatencySensitivity string

Controls the scheduling delay of the virtual machine. Use a higher sensitivity for applications that require lower latency, such as VOIP, media player applications, or applications that require frequent access to mouse or keyboard devices. Can be one of low, normal, medium, or high.

Memory int

The size of the virtual machine’s memory, in MB. Default: 1024 (1 GB).

MemoryHotAddEnabled bool

Allow memory to be added to this virtual machine while it is running.

MemoryLimit int

The maximum amount of memory (in MB) that this virtual machine can consume, regardless of available resources. The default is no limit.

MemoryReservation int

The amount of memory (in MB) that this virtual machine is guaranteed. The default is no reservation.

MemoryShareCount int

The number of memory shares allocated to the virtual machine when the memory_share_level is custom.

MemoryShareLevel string

The allocation level for memory resources. Can be one of high, low, normal, or custom. Default: custom.

MigrateWaitTimeout int

The amount of time, in minutes, to wait for a virtual machine migration to complete before failing. Default: 10 minutes. Also see the section on virtual machine migration.

Moid string

The machine object ID from VMWare

Name string

An alias for both label and path, the latter when using attach. Required if not using label.

NestedHvEnabled bool

Enable nested hardware virtualization on this virtual machine, facilitating nested virtualization in the guest. Default: false.

NetworkInterfaces List<Pulumi.VSphere.Inputs.VirtualMachineNetworkInterfaceArgs>

A specification for a virtual NIC on this virtual machine. See network interface options below.

NumCoresPerSocket int

The number of cores per socket in this virtual machine. The number of vCPUs on the virtual machine will be num_cpus divided by num_cores_per_socket. If specified, the value supplied to num_cpus must be evenly divisible by this value. Default: 1.

NumCpus int

The total number of virtual processor cores to assign to this virtual machine. Default: 1.

OvfDeploy Pulumi.VSphere.Inputs.VirtualMachineOvfDeployArgs

When specified, the VM will be deployed from the provided ovf/ova template. See creating a virtual machine from a ovf/ova template for more details.

PciDeviceIds List<string>

List of host PCI device IDs to create PCI passthroughs for.

PoweronTimeout int

The amount of time, in seconds, that we will be trying to power on a VM

RebootRequired bool

Value internal to the provider used to determine if a configuration set change requires a reboot. This value is only useful during an update process and gets reset on refresh.

ResourcePoolId string

The managed object reference ID of the resource pool to put this virtual machine in. See the section on virtual machine migration for details on changing this value.

RunToolsScriptsAfterPowerOn bool

Enable the execution of post-power-on scripts when VMware tools is installed. Default: true.

RunToolsScriptsAfterResume bool

Enable the execution of post-resume scripts when VMware tools is installed. Default: true.

RunToolsScriptsBeforeGuestReboot bool

Enable the execution of pre-reboot scripts when VMware tools is installed. Default: false.

RunToolsScriptsBeforeGuestShutdown bool

Enable the execution of pre-shutdown scripts when VMware tools is installed. Default: true.

RunToolsScriptsBeforeGuestStandby bool

Enable the execution of pre-standby scripts when VMware tools is installed. Default: true.

SataControllerCount int

The number of SATA controllers that Terraform manages on this virtual machine. This directly affects the amount of disks you can add to the virtual machine and the maximum disk unit number. Note that lowering this value does not remove controllers.

ScsiBusSharing string

Mode for sharing the SCSI bus. The modes are physicalSharing, virtualSharing, and noSharing. Default: noSharing.

ScsiControllerCount int

The number of SCSI controllers that this provider manages on this virtual machine. This directly affects the amount of disks you can add to the virtual machine and the maximum disk unit number. Note that lowering this value does not remove controllers. Default: 1.

ScsiType string

The type of SCSI bus this virtual machine will have. Can be one of lsilogic (LSI Logic Parallel), lsilogic-sas (LSI Logic SAS) or pvscsi (VMware Paravirtual). Defualt: pvscsi.

ShutdownWaitTimeout int

The amount of time, in minutes, to wait for a graceful guest shutdown when making necessary updates to the virtual machine. If force_power_off is set to true, the VM will be force powered-off after this timeout, otherwise an error is returned. Default: 3 minutes.

StoragePolicyId string

The UUID of the storage policy to assign to this disk.

SwapPlacementPolicy string

The swap file placement policy for this virtual machine. Can be one of inherit, hostLocal, or vmDirectory. Default: inherit.

SyncTimeWithHost bool

Enable guest clock synchronization with the host. Requires VMware tools to be installed. Default: false.

Tags List<string>

The IDs of any tags to attach to this resource.

Uuid string

The UUID of the virtual disk’s VMDK file. This is used to track the virtual disk on the virtual machine.

Vapp Pulumi.VSphere.Inputs.VirtualMachineVappArgs

Optional vApp configuration. The only sub-key available is properties, which is a key/value map of properties for virtual machines imported from OVF or OVA files. See Using vApp properties to supply OVF/OVA configuration for more details.

VappTransports List<string>

Computed value which is only valid for cloned virtual machines. A list of vApp transport methods supported by the source virtual machine or template.

VmwareToolsStatus string

The state of VMware tools in the guest. This will determine the proper course of action for some device operations.

VmxPath string

The path of the virtual machine’s configuration file in the VM’s datastore.

WaitForGuestIpTimeout int

The amount of time, in minutes, to wait for an available guest IP address on this virtual machine. This should only be used if your version of VMware Tools does not allow the wait_for_guest_net_timeout waiter to be used. A value less than 1 disables the waiter. Default: 0.

WaitForGuestNetRoutable bool

Controls whether or not the guest network waiter waits for a routable address. When false, the waiter does not wait for a default gateway, nor are IP addresses checked against any discovered default gateways as part of its success criteria. This property is ignored if the wait_for_guest_ip_timeout waiter is used. Default: true.

WaitForGuestNetTimeout int

The amount of time, in minutes, to wait for an available IP address on this virtual machine’s NICs. Older versions of VMware Tools do not populate this property. In those cases, this waiter can be disabled and the wait_for_guest_ip_timeout waiter can be used instead. A value less than 1 disables the waiter. Default: 5 minutes.

AlternateGuestName string

The guest name for the operating system when guest_id is other or other-64.

Annotation string

A user-provided description of the virtual machine. The default is no annotation.

BootDelay int

The number of milliseconds to wait before starting the boot sequence. The default is no delay.

BootRetryDelay int

The number of milliseconds to wait before retrying the boot sequence. This only valid if boot_retry_enabled is true. Default: 10000 (10 seconds).

BootRetryEnabled bool

If set to true, a virtual machine that fails to boot will try again after the delay defined in boot_retry_delay. Default: false.

Cdrom VirtualMachineCdrom

A specification for a CDROM device on this virtual machine. See CDROM options below.

ChangeVersion string

A unique identifier for a given version of the last configuration applied, such the timestamp of the last update to the configuration.

Clone VirtualMachineClone

When specified, the VM will be created as a clone of a specified template. Optional customization options can be submitted as well. See creating a virtual machine from a template for more details.

CpuHotAddEnabled bool

Allow CPUs to be added to this virtual machine while it is running.

CpuHotRemoveEnabled bool

Allow CPUs to be removed to this virtual machine while it is running.

CpuLimit int

The maximum amount of CPU (in MHz) that this virtual machine can consume, regardless of available resources. The default is no limit.

CpuPerformanceCountersEnabled bool

Enable CPU performance counters on this virtual machine. Default: false.

CpuReservation int

The amount of CPU (in MHz) that this virtual machine is guaranteed. The default is no reservation.

CpuShareCount int

The number of CPU shares allocated to the virtual machine when the cpu_share_level is custom.

CpuShareLevel string

The allocation level for CPU resources. Can be one of high, low, normal, or custom. Default: custom.

CustomAttributes map[string]string

Map of custom attribute ids to attribute value strings to set for virtual machine.

DatacenterId string

The datacenter id. Required only when deploying an ovf template.

DatastoreClusterId string

The managed object reference ID of the datastore cluster ID to use. This setting applies to entire virtual machine and implies that you wish to use Storage DRS with this virtual machine. See the section on virtual machine migration for details on changing this value.

DatastoreId string

The datastore ID that the ISO is located in. Requried for using a datastore ISO. Conflicts with client_device.

DefaultIpAddress string

The IP address selected by the provider to be used with any provisioners configured on this resource. Whenever possible, this is the first IPv4 address that is reachable through the default gateway configured on the machine, then the first reachable IPv6 address, and then the first general discovered address if neither exist. If VMware tools is not running on the virtual machine, or if the VM is powered off, this value will be blank.

Disks []VirtualMachineDisk

A specification for a virtual disk device on this virtual machine. See disk options below.

EfiSecureBootEnabled bool

When the firmware type is set to is efi, this enables EFI secure boot. Default: false.

EnableDiskUuid bool

Expose the UUIDs of attached virtual disks to the virtual machine, allowing access to them in the guest. Default: false.

EnableLogging bool

Enable logging of virtual machine events to a log file stored in the virtual machine directory. Default: false.

EptRviMode string

The EPT/RVI (hardware memory virtualization) setting for this virtual machine. Can be one of automatic, on, or off. Default: automatic.

ExtraConfig map[string]string

Extra configuration data for this virtual machine. Can be used to supply advanced parameters not normally in configuration, such as instance metadata.

Firmware string

The firmware interface to use on the virtual machine. Can be one of bios or EFI. Default: bios.

Folder string

The path to the folder to put this virtual machine in, relative to the datacenter that the resource pool is in.

ForcePowerOff bool

If a guest shutdown failed or timed out while updating or destroying (see shutdown_wait_timeout), force the power-off of the virtual machine. Default: true.

GuestId string

The guest ID for the operating system type. For a full list of possible values, see [here][vmware-docs-guest-ids]. Default: other-64.

GuestIpAddresses []string

The current list of IP addresses on this machine, including the value of default_ip_address. If VMware tools is not running on the virtual machine, or if the VM is powered off, this list will be empty. * moid: The managed object reference ID of the created virtual machine.

HardwareVersion int

The hardware version number. Valid range is from 4 to 15. The hardware version cannot be downgraded. See [virtual machine hardware compatibility][virtual-machine-hardware-compatibility] for more details.

HostSystemId string

An optional managed object reference ID of a host to put this virtual machine on. See the section on virtual machine migration for details on changing this value. If a host_system_id is not supplied, vSphere will select a host in the resource pool to place the virtual machine, according to any defaults or DRS policies in place.

HvMode string

The (non-nested) hardware virtualization setting for this virtual machine. Can be one of hvAuto, hvOn, or hvOff. Default: hvAuto.

IdeControllerCount int

The number of IDE controllers that Terraform manages on this virtual machine. This directly affects the amount of disks you can add to the virtual machine and the maximum disk unit number. Note that lowering this value does not remove controllers.

IgnoredGuestIps []string

List of IP addresses and CIDR networks to ignore while waiting for an available IP address using either of the waiters. Any IP addresses in this list will be ignored if they show up so that the waiter will continue to wait for a real IP address. Default: [].

Imported bool

This is flagged if the virtual machine has been imported, or the state has been migrated from a previous version of the resource. It influences the behavior of the first post-import apply operation. See the section on importing below.

LatencySensitivity string

Controls the scheduling delay of the virtual machine. Use a higher sensitivity for applications that require lower latency, such as VOIP, media player applications, or applications that require frequent access to mouse or keyboard devices. Can be one of low, normal, medium, or high.

Memory int

The size of the virtual machine’s memory, in MB. Default: 1024 (1 GB).

MemoryHotAddEnabled bool

Allow memory to be added to this virtual machine while it is running.

MemoryLimit int

The maximum amount of memory (in MB) that this virtual machine can consume, regardless of available resources. The default is no limit.

MemoryReservation int

The amount of memory (in MB) that this virtual machine is guaranteed. The default is no reservation.

MemoryShareCount int

The number of memory shares allocated to the virtual machine when the memory_share_level is custom.

MemoryShareLevel string

The allocation level for memory resources. Can be one of high, low, normal, or custom. Default: custom.

MigrateWaitTimeout int

The amount of time, in minutes, to wait for a virtual machine migration to complete before failing. Default: 10 minutes. Also see the section on virtual machine migration.

Moid string

The machine object ID from VMWare

Name string

An alias for both label and path, the latter when using attach. Required if not using label.

NestedHvEnabled bool

Enable nested hardware virtualization on this virtual machine, facilitating nested virtualization in the guest. Default: false.

NetworkInterfaces []VirtualMachineNetworkInterface

A specification for a virtual NIC on this virtual machine. See network interface options below.

NumCoresPerSocket int

The number of cores per socket in this virtual machine. The number of vCPUs on the virtual machine will be num_cpus divided by num_cores_per_socket. If specified, the value supplied to num_cpus must be evenly divisible by this value. Default: 1.

NumCpus int

The total number of virtual processor cores to assign to this virtual machine. Default: 1.

OvfDeploy VirtualMachineOvfDeploy

When specified, the VM will be deployed from the provided ovf/ova template. See creating a virtual machine from a ovf/ova template for more details.

PciDeviceIds []string

List of host PCI device IDs to create PCI passthroughs for.

PoweronTimeout int

The amount of time, in seconds, that we will be trying to power on a VM

RebootRequired bool

Value internal to the provider used to determine if a configuration set change requires a reboot. This value is only useful during an update process and gets reset on refresh.

ResourcePoolId string

The managed object reference ID of the resource pool to put this virtual machine in. See the section on virtual machine migration for details on changing this value.

RunToolsScriptsAfterPowerOn bool

Enable the execution of post-power-on scripts when VMware tools is installed. Default: true.

RunToolsScriptsAfterResume bool

Enable the execution of post-resume scripts when VMware tools is installed. Default: true.

RunToolsScriptsBeforeGuestReboot bool

Enable the execution of pre-reboot scripts when VMware tools is installed. Default: false.

RunToolsScriptsBeforeGuestShutdown bool

Enable the execution of pre-shutdown scripts when VMware tools is installed. Default: true.

RunToolsScriptsBeforeGuestStandby bool

Enable the execution of pre-standby scripts when VMware tools is installed. Default: true.

SataControllerCount int

The number of SATA controllers that Terraform manages on this virtual machine. This directly affects the amount of disks you can add to the virtual machine and the maximum disk unit number. Note that lowering this value does not remove controllers.

ScsiBusSharing string

Mode for sharing the SCSI bus. The modes are physicalSharing, virtualSharing, and noSharing. Default: noSharing.

ScsiControllerCount int

The number of SCSI controllers that this provider manages on this virtual machine. This directly affects the amount of disks you can add to the virtual machine and the maximum disk unit number. Note that lowering this value does not remove controllers. Default: 1.

ScsiType string

The type of SCSI bus this virtual machine will have. Can be one of lsilogic (LSI Logic Parallel), lsilogic-sas (LSI Logic SAS) or pvscsi (VMware Paravirtual). Defualt: pvscsi.

ShutdownWaitTimeout int

The amount of time, in minutes, to wait for a graceful guest shutdown when making necessary updates to the virtual machine. If force_power_off is set to true, the VM will be force powered-off after this timeout, otherwise an error is returned. Default: 3 minutes.

StoragePolicyId string

The UUID of the storage policy to assign to this disk.

SwapPlacementPolicy string

The swap file placement policy for this virtual machine. Can be one of inherit, hostLocal, or vmDirectory. Default: inherit.

SyncTimeWithHost bool

Enable guest clock synchronization with the host. Requires VMware tools to be installed. Default: false.

Tags []string

The IDs of any tags to attach to this resource.

Uuid string

The UUID of the virtual disk’s VMDK file. This is used to track the virtual disk on the virtual machine.

Vapp VirtualMachineVapp

Optional vApp configuration. The only sub-key available is properties, which is a key/value map of properties for virtual machines imported from OVF or OVA files. See Using vApp properties to supply OVF/OVA configuration for more details.

VappTransports []string

Computed value which is only valid for cloned virtual machines. A list of vApp transport methods supported by the source virtual machine or template.

VmwareToolsStatus string

The state of VMware tools in the guest. This will determine the proper course of action for some device operations.

VmxPath string

The path of the virtual machine’s configuration file in the VM’s datastore.

WaitForGuestIpTimeout int

The amount of time, in minutes, to wait for an available guest IP address on this virtual machine. This should only be used if your version of VMware Tools does not allow the wait_for_guest_net_timeout waiter to be used. A value less than 1 disables the waiter. Default: 0.

WaitForGuestNetRoutable bool

Controls whether or not the guest network waiter waits for a routable address. When false, the waiter does not wait for a default gateway, nor are IP addresses checked against any discovered default gateways as part of its success criteria. This property is ignored if the wait_for_guest_ip_timeout waiter is used. Default: true.

WaitForGuestNetTimeout int

The amount of time, in minutes, to wait for an available IP address on this virtual machine’s NICs. Older versions of VMware Tools do not populate this property. In those cases, this waiter can be disabled and the wait_for_guest_ip_timeout waiter can be used instead. A value less than 1 disables the waiter. Default: 5 minutes.

alternateGuestName string

The guest name for the operating system when guest_id is other or other-64.

annotation string

A user-provided description of the virtual machine. The default is no annotation.

bootDelay number

The number of milliseconds to wait before starting the boot sequence. The default is no delay.

bootRetryDelay number

The number of milliseconds to wait before retrying the boot sequence. This only valid if boot_retry_enabled is true. Default: 10000 (10 seconds).

bootRetryEnabled boolean

If set to true, a virtual machine that fails to boot will try again after the delay defined in boot_retry_delay. Default: false.

cdrom VirtualMachineCdrom

A specification for a CDROM device on this virtual machine. See CDROM options below.

changeVersion string

A unique identifier for a given version of the last configuration applied, such the timestamp of the last update to the configuration.

clone VirtualMachineClone

When specified, the VM will be created as a clone of a specified template. Optional customization options can be submitted as well. See creating a virtual machine from a template for more details.

cpuHotAddEnabled boolean

Allow CPUs to be added to this virtual machine while it is running.

cpuHotRemoveEnabled boolean

Allow CPUs to be removed to this virtual machine while it is running.

cpuLimit number

The maximum amount of CPU (in MHz) that this virtual machine can consume, regardless of available resources. The default is no limit.

cpuPerformanceCountersEnabled boolean

Enable CPU performance counters on this virtual machine. Default: false.

cpuReservation number

The amount of CPU (in MHz) that this virtual machine is guaranteed. The default is no reservation.

cpuShareCount number

The number of CPU shares allocated to the virtual machine when the cpu_share_level is custom.

cpuShareLevel string

The allocation level for CPU resources. Can be one of high, low, normal, or custom. Default: custom.

customAttributes {[key: string]: string}

Map of custom attribute ids to attribute value strings to set for virtual machine.

datacenterId string

The datacenter id. Required only when deploying an ovf template.

datastoreClusterId string

The managed object reference ID of the datastore cluster ID to use. This setting applies to entire virtual machine and implies that you wish to use Storage DRS with this virtual machine. See the section on virtual machine migration for details on changing this value.

datastoreId string

The datastore ID that the ISO is located in. Requried for using a datastore ISO. Conflicts with client_device.

defaultIpAddress string

The IP address selected by the provider to be used with any provisioners configured on this resource. Whenever possible, this is the first IPv4 address that is reachable through the default gateway configured on the machine, then the first reachable IPv6 address, and then the first general discovered address if neither exist. If VMware tools is not running on the virtual machine, or if the VM is powered off, this value will be blank.

disks VirtualMachineDisk[]

A specification for a virtual disk device on this virtual machine. See disk options below.

efiSecureBootEnabled boolean

When the firmware type is set to is efi, this enables EFI secure boot. Default: false.

enableDiskUuid boolean

Expose the UUIDs of attached virtual disks to the virtual machine, allowing access to them in the guest. Default: false.

enableLogging boolean

Enable logging of virtual machine events to a log file stored in the virtual machine directory. Default: false.

eptRviMode string

The EPT/RVI (hardware memory virtualization) setting for this virtual machine. Can be one of automatic, on, or off. Default: automatic.

extraConfig {[key: string]: string}

Extra configuration data for this virtual machine. Can be used to supply advanced parameters not normally in configuration, such as instance metadata.

firmware string

The firmware interface to use on the virtual machine. Can be one of bios or EFI. Default: bios.

folder string

The path to the folder to put this virtual machine in, relative to the datacenter that the resource pool is in.

forcePowerOff boolean

If a guest shutdown failed or timed out while updating or destroying (see shutdown_wait_timeout), force the power-off of the virtual machine. Default: true.

guestId string

The guest ID for the operating system type. For a full list of possible values, see [here][vmware-docs-guest-ids]. Default: other-64.

guestIpAddresses string[]

The current list of IP addresses on this machine, including the value of default_ip_address. If VMware tools is not running on the virtual machine, or if the VM is powered off, this list will be empty. * moid: The managed object reference ID of the created virtual machine.

hardwareVersion number

The hardware version number. Valid range is from 4 to 15. The hardware version cannot be downgraded. See [virtual machine hardware compatibility][virtual-machine-hardware-compatibility] for more details.

hostSystemId string

An optional managed object reference ID of a host to put this virtual machine on. See the section on virtual machine migration for details on changing this value. If a host_system_id is not supplied, vSphere will select a host in the resource pool to place the virtual machine, according to any defaults or DRS policies in place.

hvMode string

The (non-nested) hardware virtualization setting for this virtual machine. Can be one of hvAuto, hvOn, or hvOff. Default: hvAuto.

ideControllerCount number

The number of IDE controllers that Terraform manages on this virtual machine. This directly affects the amount of disks you can add to the virtual machine and the maximum disk unit number. Note that lowering this value does not remove controllers.

ignoredGuestIps string[]

List of IP addresses and CIDR networks to ignore while waiting for an available IP address using either of the waiters. Any IP addresses in this list will be ignored if they show up so that the waiter will continue to wait for a real IP address. Default: [].

imported boolean

This is flagged if the virtual machine has been imported, or the state has been migrated from a previous version of the resource. It influences the behavior of the first post-import apply operation. See the section on importing below.

latencySensitivity string

Controls the scheduling delay of the virtual machine. Use a higher sensitivity for applications that require lower latency, such as VOIP, media player applications, or applications that require frequent access to mouse or keyboard devices. Can be one of low, normal, medium, or high.

memory number

The size of the virtual machine’s memory, in MB. Default: 1024 (1 GB).

memoryHotAddEnabled boolean

Allow memory to be added to this virtual machine while it is running.

memoryLimit number

The maximum amount of memory (in MB) that this virtual machine can consume, regardless of available resources. The default is no limit.

memoryReservation number

The amount of memory (in MB) that this virtual machine is guaranteed. The default is no reservation.

memoryShareCount number

The number of memory shares allocated to the virtual machine when the memory_share_level is custom.

memoryShareLevel string

The allocation level for memory resources. Can be one of high, low, normal, or custom. Default: custom.

migrateWaitTimeout number

The amount of time, in minutes, to wait for a virtual machine migration to complete before failing. Default: 10 minutes. Also see the section on virtual machine migration.

moid string

The machine object ID from VMWare

name string

An alias for both label and path, the latter when using attach. Required if not using label.

nestedHvEnabled boolean

Enable nested hardware virtualization on this virtual machine, facilitating nested virtualization in the guest. Default: false.

networkInterfaces VirtualMachineNetworkInterface[]

A specification for a virtual NIC on this virtual machine. See network interface options below.

numCoresPerSocket number

The number of cores per socket in this virtual machine. The number of vCPUs on the virtual machine will be num_cpus divided by num_cores_per_socket. If specified, the value supplied to num_cpus must be evenly divisible by this value. Default: 1.

numCpus number

The total number of virtual processor cores to assign to this virtual machine. Default: 1.

ovfDeploy VirtualMachineOvfDeploy

When specified, the VM will be deployed from the provided ovf/ova template. See creating a virtual machine from a ovf/ova template for more details.

pciDeviceIds string[]

List of host PCI device IDs to create PCI passthroughs for.

poweronTimeout number

The amount of time, in seconds, that we will be trying to power on a VM

rebootRequired boolean

Value internal to the provider used to determine if a configuration set change requires a reboot. This value is only useful during an update process and gets reset on refresh.

resourcePoolId string

The managed object reference ID of the resource pool to put this virtual machine in. See the section on virtual machine migration for details on changing this value.

runToolsScriptsAfterPowerOn boolean

Enable the execution of post-power-on scripts when VMware tools is installed. Default: true.

runToolsScriptsAfterResume boolean

Enable the execution of post-resume scripts when VMware tools is installed. Default: true.

runToolsScriptsBeforeGuestReboot boolean

Enable the execution of pre-reboot scripts when VMware tools is installed. Default: false.

runToolsScriptsBeforeGuestShutdown boolean

Enable the execution of pre-shutdown scripts when VMware tools is installed. Default: true.

runToolsScriptsBeforeGuestStandby boolean

Enable the execution of pre-standby scripts when VMware tools is installed. Default: true.

sataControllerCount number

The number of SATA controllers that Terraform manages on this virtual machine. This directly affects the amount of disks you can add to the virtual machine and the maximum disk unit number. Note that lowering this value does not remove controllers.

scsiBusSharing string

Mode for sharing the SCSI bus. The modes are physicalSharing, virtualSharing, and noSharing. Default: noSharing.

scsiControllerCount number

The number of SCSI controllers that this provider manages on this virtual machine. This directly affects the amount of disks you can add to the virtual machine and the maximum disk unit number. Note that lowering this value does not remove controllers. Default: 1.

scsiType string

The type of SCSI bus this virtual machine will have. Can be one of lsilogic (LSI Logic Parallel), lsilogic-sas (LSI Logic SAS) or pvscsi (VMware Paravirtual). Defualt: pvscsi.

shutdownWaitTimeout number

The amount of time, in minutes, to wait for a graceful guest shutdown when making necessary updates to the virtual machine. If force_power_off is set to true, the VM will be force powered-off after this timeout, otherwise an error is returned. Default: 3 minutes.

storagePolicyId string

The UUID of the storage policy to assign to this disk.

swapPlacementPolicy string

The swap file placement policy for this virtual machine. Can be one of inherit, hostLocal, or vmDirectory. Default: inherit.

syncTimeWithHost boolean

Enable guest clock synchronization with the host. Requires VMware tools to be installed. Default: false.

tags string[]

The IDs of any tags to attach to this resource.

uuid string

The UUID of the virtual disk’s VMDK file. This is used to track the virtual disk on the virtual machine.

vapp VirtualMachineVapp

Optional vApp configuration. The only sub-key available is properties, which is a key/value map of properties for virtual machines imported from OVF or OVA files. See Using vApp properties to supply OVF/OVA configuration for more details.

vappTransports string[]

Computed value which is only valid for cloned virtual machines. A list of vApp transport methods supported by the source virtual machine or template.

vmwareToolsStatus string

The state of VMware tools in the guest. This will determine the proper course of action for some device operations.

vmxPath string

The path of the virtual machine’s configuration file in the VM’s datastore.

waitForGuestIpTimeout number

The amount of time, in minutes, to wait for an available guest IP address on this virtual machine. This should only be used if your version of VMware Tools does not allow the wait_for_guest_net_timeout waiter to be used. A value less than 1 disables the waiter. Default: 0.

waitForGuestNetRoutable boolean

Controls whether or not the guest network waiter waits for a routable address. When false, the waiter does not wait for a default gateway, nor are IP addresses checked against any discovered default gateways as part of its success criteria. This property is ignored if the wait_for_guest_ip_timeout waiter is used. Default: true.

waitForGuestNetTimeout number

The amount of time, in minutes, to wait for an available IP address on this virtual machine’s NICs. Older versions of VMware Tools do not populate this property. In those cases, this waiter can be disabled and the wait_for_guest_ip_timeout waiter can be used instead. A value less than 1 disables the waiter. Default: 5 minutes.

alternate_guest_name str

The guest name for the operating system when guest_id is other or other-64.

annotation str

A user-provided description of the virtual machine. The default is no annotation.

boot_delay int

The number of milliseconds to wait before starting the boot sequence. The default is no delay.

boot_retry_delay int

The number of milliseconds to wait before retrying the boot sequence. This only valid if boot_retry_enabled is true. Default: 10000 (10 seconds).

boot_retry_enabled bool

If set to true, a virtual machine that fails to boot will try again after the delay defined in boot_retry_delay. Default: false.

cdrom VirtualMachineCdromArgs

A specification for a CDROM device on this virtual machine. See CDROM options below.

change_version str

A unique identifier for a given version of the last configuration applied, such the timestamp of the last update to the configuration.

clone VirtualMachineCloneArgs

When specified, the VM will be created as a clone of a specified template. Optional customization options can be submitted as well. See creating a virtual machine from a template for more details.

cpu_hot_add_enabled bool

Allow CPUs to be added to this virtual machine while it is running.

cpu_hot_remove_enabled bool

Allow CPUs to be removed to this virtual machine while it is running.

cpu_limit int

The maximum amount of CPU (in MHz) that this virtual machine can consume, regardless of available resources. The default is no limit.

cpu_performance_counters_enabled bool

Enable CPU performance counters on this virtual machine. Default: false.

cpu_reservation int

The amount of CPU (in MHz) that this virtual machine is guaranteed. The default is no reservation.

cpu_share_count int

The number of CPU shares allocated to the virtual machine when the cpu_share_level is custom.

cpu_share_level str

The allocation level for CPU resources. Can be one of high, low, normal, or custom. Default: custom.

custom_attributes Mapping[str, str]

Map of custom attribute ids to attribute value strings to set for virtual machine.

datacenter_id str

The datacenter id. Required only when deploying an ovf template.

datastore_cluster_id str

The managed object reference ID of the datastore cluster ID to use. This setting applies to entire virtual machine and implies that you wish to use Storage DRS with this virtual machine. See the section on virtual machine migration for details on changing this value.

datastore_id str

The datastore ID that the ISO is located in. Requried for using a datastore ISO. Conflicts with client_device.

default_ip_address str

The IP address selected by the provider to be used with any provisioners configured on this resource. Whenever possible, this is the first IPv4 address that is reachable through the default gateway configured on the machine, then the first reachable IPv6 address, and then the first general discovered address if neither exist. If VMware tools is not running on the virtual machine, or if the VM is powered off, this value will be blank.

disks Sequence[VirtualMachineDiskArgs]

A specification for a virtual disk device on this virtual machine. See disk options below.

efi_secure_boot_enabled bool

When the firmware type is set to is efi, this enables EFI secure boot. Default: false.

enable_disk_uuid bool

Expose the UUIDs of attached virtual disks to the virtual machine, allowing access to them in the guest. Default: false.

enable_logging bool

Enable logging of virtual machine events to a log file stored in the virtual machine directory. Default: false.

ept_rvi_mode str

The EPT/RVI (hardware memory virtualization) setting for this virtual machine. Can be one of automatic, on, or off. Default: automatic.

extra_config Mapping[str, str]

Extra configuration data for this virtual machine. Can be used to supply advanced parameters not normally in configuration, such as instance metadata.

firmware str

The firmware interface to use on the virtual machine. Can be one of bios or EFI. Default: bios.

folder str

The path to the folder to put this virtual machine in, relative to the datacenter that the resource pool is in.

force_power_off bool

If a guest shutdown failed or timed out while updating or destroying (see shutdown_wait_timeout), force the power-off of the virtual machine. Default: true.

guest_id str

The guest ID for the operating system type. For a full list of possible values, see [here][vmware-docs-guest-ids]. Default: other-64.

guest_ip_addresses Sequence[str]

The current list of IP addresses on this machine, including the value of default_ip_address. If VMware tools is not running on the virtual machine, or if the VM is powered off, this list will be empty. * moid: The managed object reference ID of the created virtual machine.

hardware_version int

The hardware version number. Valid range is from 4 to 15. The hardware version cannot be downgraded. See [virtual machine hardware compatibility][virtual-machine-hardware-compatibility] for more details.

host_system_id str

An optional managed object reference ID of a host to put this virtual machine on. See the section on virtual machine migration for details on changing this value. If a host_system_id is not supplied, vSphere will select a host in the resource pool to place the virtual machine, according to any defaults or DRS policies in place.

hv_mode str

The (non-nested) hardware virtualization setting for this virtual machine. Can be one of hvAuto, hvOn, or hvOff. Default: hvAuto.

ide_controller_count int

The number of IDE controllers that Terraform manages on this virtual machine. This directly affects the amount of disks you can add to the virtual machine and the maximum disk unit number. Note that lowering this value does not remove controllers.

ignored_guest_ips Sequence[str]

List of IP addresses and CIDR networks to ignore while waiting for an available IP address using either of the waiters. Any IP addresses in this list will be ignored if they show up so that the waiter will continue to wait for a real IP address. Default: [].

imported bool

This is flagged if the virtual machine has been imported, or the state has been migrated from a previous version of the resource. It influences the behavior of the first post-import apply operation. See the section on importing below.

latency_sensitivity str

Controls the scheduling delay of the virtual machine. Use a higher sensitivity for applications that require lower latency, such as VOIP, media player applications, or applications that require frequent access to mouse or keyboard devices. Can be one of low, normal, medium, or high.

memory int

The size of the virtual machine’s memory, in MB. Default: 1024 (1 GB).

memory_hot_add_enabled bool

Allow memory to be added to this virtual machine while it is running.

memory_limit int

The maximum amount of memory (in MB) that this virtual machine can consume, regardless of available resources. The default is no limit.

memory_reservation int

The amount of memory (in MB) that this virtual machine is guaranteed. The default is no reservation.

memory_share_count int

The number of memory shares allocated to the virtual machine when the memory_share_level is custom.

memory_share_level str

The allocation level for memory resources. Can be one of high, low, normal, or custom. Default: custom.

migrate_wait_timeout int

The amount of time, in minutes, to wait for a virtual machine migration to complete before failing. Default: 10 minutes. Also see the section on virtual machine migration.

moid str

The machine object ID from VMWare

name str

An alias for both label and path, the latter when using attach. Required if not using label.

nested_hv_enabled bool

Enable nested hardware virtualization on this virtual machine, facilitating nested virtualization in the guest. Default: false.

network_interfaces Sequence[VirtualMachineNetworkInterfaceArgs]

A specification for a virtual NIC on this virtual machine. See network interface options below.

num_cores_per_socket int

The number of cores per socket in this virtual machine. The number of vCPUs on the virtual machine will be num_cpus divided by num_cores_per_socket. If specified, the value supplied to num_cpus must be evenly divisible by this value. Default: 1.

num_cpus int

The total number of virtual processor cores to assign to this virtual machine. Default: 1.

ovf_deploy VirtualMachineOvfDeployArgs

When specified, the VM will be deployed from the provided ovf/ova template. See creating a virtual machine from a ovf/ova template for more details.

pci_device_ids Sequence[str]

List of host PCI device IDs to create PCI passthroughs for.

poweron_timeout int

The amount of time, in seconds, that we will be trying to power on a VM

reboot_required bool

Value internal to the provider used to determine if a configuration set change requires a reboot. This value is only useful during an update process and gets reset on refresh.

resource_pool_id str

The managed object reference ID of the resource pool to put this virtual machine in. See the section on virtual machine migration for details on changing this value.

run_tools_scripts_after_power_on bool

Enable the execution of post-power-on scripts when VMware tools is installed. Default: true.

run_tools_scripts_after_resume bool

Enable the execution of post-resume scripts when VMware tools is installed. Default: true.

run_tools_scripts_before_guest_reboot bool

Enable the execution of pre-reboot scripts when VMware tools is installed. Default: false.

run_tools_scripts_before_guest_shutdown bool

Enable the execution of pre-shutdown scripts when VMware tools is installed. Default: true.

run_tools_scripts_before_guest_standby bool

Enable the execution of pre-standby scripts when VMware tools is installed. Default: true.

sata_controller_count int

The number of SATA controllers that Terraform manages on this virtual machine. This directly affects the amount of disks you can add to the virtual machine and the maximum disk unit number. Note that lowering this value does not remove controllers.

scsi_bus_sharing str

Mode for sharing the SCSI bus. The modes are physicalSharing, virtualSharing, and noSharing. Default: noSharing.

scsi_controller_count int

The number of SCSI controllers that this provider manages on this virtual machine. This directly affects the amount of disks you can add to the virtual machine and the maximum disk unit number. Note that lowering this value does not remove controllers. Default: 1.

scsi_type str

The type of SCSI bus this virtual machine will have. Can be one of lsilogic (LSI Logic Parallel), lsilogic-sas (LSI Logic SAS) or pvscsi (VMware Paravirtual). Defualt: pvscsi.

shutdown_wait_timeout int

The amount of time, in minutes, to wait for a graceful guest shutdown when making necessary updates to the virtual machine. If force_power_off is set to true, the VM will be force powered-off after this timeout, otherwise an error is returned. Default: 3 minutes.

storage_policy_id str

The UUID of the storage policy to assign to this disk.

swap_placement_policy str

The swap file placement policy for this virtual machine. Can be one of inherit, hostLocal, or vmDirectory. Default: inherit.

sync_time_with_host bool

Enable guest clock synchronization with the host. Requires VMware tools to be installed. Default: false.

tags Sequence[str]

The IDs of any tags to attach to this resource.

uuid str

The UUID of the virtual disk’s VMDK file. This is used to track the virtual disk on the virtual machine.

vapp VirtualMachineVappArgs

Optional vApp configuration. The only sub-key available is properties, which is a key/value map of properties for virtual machines imported from OVF or OVA files. See Using vApp properties to supply OVF/OVA configuration for more details.

vapp_transports Sequence[str]

Computed value which is only valid for cloned virtual machines. A list of vApp transport methods supported by the source virtual machine or template.

vmware_tools_status str

The state of VMware tools in the guest. This will determine the proper course of action for some device operations.

vmx_path str

The path of the virtual machine’s configuration file in the VM’s datastore.

wait_for_guest_ip_timeout int

The amount of time, in minutes, to wait for an available guest IP address on this virtual machine. This should only be used if your version of VMware Tools does not allow the wait_for_guest_net_timeout waiter to be used. A value less than 1 disables the waiter. Default: 0.

wait_for_guest_net_routable bool

Controls whether or not the guest network waiter waits for a routable address. When false, the waiter does not wait for a default gateway, nor are IP addresses checked against any discovered default gateways as part of its success criteria. This property is ignored if the wait_for_guest_ip_timeout waiter is used. Default: true.

wait_for_guest_net_timeout int

The amount of time, in minutes, to wait for an available IP address on this virtual machine’s NICs. Older versions of VMware Tools do not populate this property. In those cases, this waiter can be disabled and the wait_for_guest_ip_timeout waiter can be used instead. A value less than 1 disables the waiter. Default: 5 minutes.

Supporting Types

VirtualMachineCdrom

ClientDevice bool

Indicates whether the device should be backed by remote client device. Conflicts with datastore_id and path.

DatastoreId string

The datastore ID that the ISO is located in. Requried for using a datastore ISO. Conflicts with client_device.

DeviceAddress string

An address internal to this provider that helps locate the device when key is unavailable. This follows a convention of CONTROLLER_TYPE:BUS_NUMBER:UNIT_NUMBER. Example: scsi:0:1 means device unit 1 on SCSI bus 0.

Key int

The ID of the device within the virtual machine.

Path string

The path to the ISO file. Required for using a datastore ISO. Conflicts with client_device.

ClientDevice bool

Indicates whether the device should be backed by remote client device. Conflicts with datastore_id and path.

DatastoreId string

The datastore ID that the ISO is located in. Requried for using a datastore ISO. Conflicts with client_device.

DeviceAddress string

An address internal to this provider that helps locate the device when key is unavailable. This follows a convention of CONTROLLER_TYPE:BUS_NUMBER:UNIT_NUMBER. Example: scsi:0:1 means device unit 1 on SCSI bus 0.

Key int

The ID of the device within the virtual machine.

Path string

The path to the ISO file. Required for using a datastore ISO. Conflicts with client_device.

clientDevice boolean

Indicates whether the device should be backed by remote client device. Conflicts with datastore_id and path.

datastoreId string

The datastore ID that the ISO is located in. Requried for using a datastore ISO. Conflicts with client_device.

deviceAddress string

An address internal to this provider that helps locate the device when key is unavailable. This follows a convention of CONTROLLER_TYPE:BUS_NUMBER:UNIT_NUMBER. Example: scsi:0:1 means device unit 1 on SCSI bus 0.

key number

The ID of the device within the virtual machine.

path string

The path to the ISO file. Required for using a datastore ISO. Conflicts with client_device.

client_device bool

Indicates whether the device should be backed by remote client device. Conflicts with datastore_id and path.

datastore_id str

The datastore ID that the ISO is located in. Requried for using a datastore ISO. Conflicts with client_device.

device_address str

An address internal to this provider that helps locate the device when key is unavailable. This follows a convention of CONTROLLER_TYPE:BUS_NUMBER:UNIT_NUMBER. Example: scsi:0:1 means device unit 1 on SCSI bus 0.

key int

The ID of the device within the virtual machine.

path str

The path to the ISO file. Required for using a datastore ISO. Conflicts with client_device.

VirtualMachineClone

templateUuid string
customize VirtualMachineCloneCustomize
linkedClone boolean
ovfNetworkMap {[key: string]: string}
ovfStorageMap {[key: string]: string}
timeout number

VirtualMachineCloneCustomize

VirtualMachineCloneCustomizeLinuxOptions

Domain string
HostName string
HwClockUtc bool
TimeZone string
Domain string
HostName string
HwClockUtc bool
TimeZone string
domain string
hostName string
hwClockUtc boolean
timeZone string

VirtualMachineCloneCustomizeNetworkInterface

VirtualMachineCloneCustomizeWindowsOptions

VirtualMachineDisk

Attach bool

Attach an external disk instead of creating a new one. Implies and conflicts with keep_on_remove. If set, you cannot set size, eagerly_scrub, or thin_provisioned. Must set path if used.

ControllerType string

The type of storage controller to attach the disk to. Can be scsi, sata, or ide. You must have the appropriate number of controllers enabled for the selected type. Default scsi.

DatastoreId string

The datastore ID that the ISO is located in. Requried for using a datastore ISO. Conflicts with client_device.

DeviceAddress string

An address internal to this provider that helps locate the device when key is unavailable. This follows a convention of CONTROLLER_TYPE:BUS_NUMBER:UNIT_NUMBER. Example: scsi:0:1 means device unit 1 on SCSI bus 0.

DiskMode string

The mode of this this virtual disk for purposes of writes and snapshotting. Can be one of append, independent_nonpersistent, independent_persistent, nonpersistent, persistent, or undoable. Default: persistent. For an explanation of options, click [here][vmware-docs-disk-mode].

DiskSharing string

The sharing mode of this virtual disk. Can be one of sharingMultiWriter or sharingNone. Default: sharingNone.

EagerlyScrub bool

If set to true, the disk space is zeroed out on VM creation. This will delay the creation of the disk or virtual machine. Cannot be set to true when thin_provisioned is true. See the section on picking a disk type. Default: false.

IoLimit int

The upper limit of IOPS that this disk can use. The default is no limit.

IoReservation int

The I/O reservation (guarantee) that this disk has, in IOPS. The default is no reservation.

IoShareCount int

The share count for this disk when the share level is custom.

IoShareLevel string

The share allocation level for this disk. Can be one of low, normal, high, or custom. Default: normal.

KeepOnRemove bool

Keep this disk when removing the device or destroying the virtual machine. Default: false.

Key int

The ID of the device within the virtual machine.

Label string

A label for the disk. Forces a new disk if changed.

Name string

An alias for both label and path, the latter when using attach. Required if not using label.

Deprecated:

The name attribute for virtual disks will be removed in favor of "label" in future releases. To transition existing disks, rename the "name" attribute to "label". When doing so, ensure the value of the attribute stays the same.

Note that "label" does not control the name of a VMDK and does not need to bear the name of one on new disks or virtual machines. For more information, see the documentation for the label attribute at:

https://www.terraform.io/docs/providers/vsphere/r/virtual_machine.html#label

Path string

The path to the ISO file. Required for using a datastore ISO. Conflicts with client_device.

Size int

The size of the disk, in GB.

StoragePolicyId string

The UUID of the storage policy to assign to this disk.

ThinProvisioned bool

If true, this disk is thin provisioned, with space for the file being allocated on an as-needed basis. Cannot be set to true when eagerly_scrub is true. See the section on picking a disk type. Default: true.

UnitNumber int

The disk number on the storage bus. The maximum value for this setting is the value of the controller count times the controller capacity (15 for SCSI, 30 for SATA, and 2 for IDE). The default is 0, for which one disk must be set to. Duplicate unit numbers are not allowed.

Uuid string

The UUID of the virtual disk’s VMDK file. This is used to track the virtual disk on the virtual machine.

WriteThrough bool

If true, writes for this disk are sent directly to the filesystem immediately instead of being buffered. Default: false.

Attach bool

Attach an external disk instead of creating a new one. Implies and conflicts with keep_on_remove. If set, you cannot set size, eagerly_scrub, or thin_provisioned. Must set path if used.

ControllerType string

The type of storage controller to attach the disk to. Can be scsi, sata, or ide. You must have the appropriate number of controllers enabled for the selected type. Default scsi.

DatastoreId string

The datastore ID that the ISO is located in. Requried for using a datastore ISO. Conflicts with client_device.

DeviceAddress string

An address internal to this provider that helps locate the device when key is unavailable. This follows a convention of CONTROLLER_TYPE:BUS_NUMBER:UNIT_NUMBER. Example: scsi:0:1 means device unit 1 on SCSI bus 0.

DiskMode string

The mode of this this virtual disk for purposes of writes and snapshotting. Can be one of append, independent_nonpersistent, independent_persistent, nonpersistent, persistent, or undoable. Default: persistent. For an explanation of options, click [here][vmware-docs-disk-mode].

DiskSharing string

The sharing mode of this virtual disk. Can be one of sharingMultiWriter or sharingNone. Default: sharingNone.

EagerlyScrub bool

If set to true, the disk space is zeroed out on VM creation. This will delay the creation of the disk or virtual machine. Cannot be set to true when thin_provisioned is true. See the section on picking a disk type. Default: false.

IoLimit int

The upper limit of IOPS that this disk can use. The default is no limit.

IoReservation int

The I/O reservation (guarantee) that this disk has, in IOPS. The default is no reservation.

IoShareCount int

The share count for this disk when the share level is custom.

IoShareLevel string

The share allocation level for this disk. Can be one of low, normal, high, or custom. Default: normal.

KeepOnRemove bool

Keep this disk when removing the device or destroying the virtual machine. Default: false.

Key int

The ID of the device within the virtual machine.

Label string

A label for the disk. Forces a new disk if changed.

Name string

An alias for both label and path, the latter when using attach. Required if not using label.

Deprecated:

The name attribute for virtual disks will be removed in favor of "label" in future releases. To transition existing disks, rename the "name" attribute to "label". When doing so, ensure the value of the attribute stays the same.

Note that "label" does not control the name of a VMDK and does not need to bear the name of one on new disks or virtual machines. For more information, see the documentation for the label attribute at:

https://www.terraform.io/docs/providers/vsphere/r/virtual_machine.html#label

Path string

The path to the ISO file. Required for using a datastore ISO. Conflicts with client_device.

Size int

The size of the disk, in GB.

StoragePolicyId string

The UUID of the storage policy to assign to this disk.

ThinProvisioned bool

If true, this disk is thin provisioned, with space for the file being allocated on an as-needed basis. Cannot be set to true when eagerly_scrub is true. See the section on picking a disk type. Default: true.

UnitNumber int

The disk number on the storage bus. The maximum value for this setting is the value of the controller count times the controller capacity (15 for SCSI, 30 for SATA, and 2 for IDE). The default is 0, for which one disk must be set to. Duplicate unit numbers are not allowed.

Uuid string

The UUID of the virtual disk’s VMDK file. This is used to track the virtual disk on the virtual machine.

WriteThrough bool

If true, writes for this disk are sent directly to the filesystem immediately instead of being buffered. Default: false.

attach boolean

Attach an external disk instead of creating a new one. Implies and conflicts with keep_on_remove. If set, you cannot set size, eagerly_scrub, or thin_provisioned. Must set path if used.

controllerType string

The type of storage controller to attach the disk to. Can be scsi, sata, or ide. You must have the appropriate number of controllers enabled for the selected type. Default scsi.

datastoreId string

The datastore ID that the ISO is located in. Requried for using a datastore ISO. Conflicts with client_device.

deviceAddress string

An address internal to this provider that helps locate the device when key is unavailable. This follows a convention of CONTROLLER_TYPE:BUS_NUMBER:UNIT_NUMBER. Example: scsi:0:1 means device unit 1 on SCSI bus 0.

diskMode string

The mode of this this virtual disk for purposes of writes and snapshotting. Can be one of append, independent_nonpersistent, independent_persistent, nonpersistent, persistent, or undoable. Default: persistent. For an explanation of options, click [here][vmware-docs-disk-mode].

diskSharing string

The sharing mode of this virtual disk. Can be one of sharingMultiWriter or sharingNone. Default: sharingNone.

eagerlyScrub boolean

If set to true, the disk space is zeroed out on VM creation. This will delay the creation of the disk or virtual machine. Cannot be set to true when thin_provisioned is true. See the section on picking a disk type. Default: false.

ioLimit number

The upper limit of IOPS that this disk can use. The default is no limit.

ioReservation number

The I/O reservation (guarantee) that this disk has, in IOPS. The default is no reservation.

ioShareCount number

The share count for this disk when the share level is custom.

ioShareLevel string

The share allocation level for this disk. Can be one of low, normal, high, or custom. Default: normal.

keepOnRemove boolean

Keep this disk when removing the device or destroying the virtual machine. Default: false.

key number

The ID of the device within the virtual machine.

label string

A label for the disk. Forces a new disk if changed.

name string

An alias for both label and path, the latter when using attach. Required if not using label.

Deprecated:

The name attribute for virtual disks will be removed in favor of "label" in future releases. To transition existing disks, rename the "name" attribute to "label". When doing so, ensure the value of the attribute stays the same.

Note that "label" does not control the name of a VMDK and does not need to bear the name of one on new disks or virtual machines. For more information, see the documentation for the label attribute at:

https://www.terraform.io/docs/providers/vsphere/r/virtual_machine.html#label

path string

The path to the ISO file. Required for using a datastore ISO. Conflicts with client_device.

size number

The size of the disk, in GB.

storagePolicyId string

The UUID of the storage policy to assign to this disk.

thinProvisioned boolean

If true, this disk is thin provisioned, with space for the file being allocated on an as-needed basis. Cannot be set to true when eagerly_scrub is true. See the section on picking a disk type. Default: true.

unitNumber number

The disk number on the storage bus. The maximum value for this setting is the value of the controller count times the controller capacity (15 for SCSI, 30 for SATA, and 2 for IDE). The default is 0, for which one disk must be set to. Duplicate unit numbers are not allowed.

uuid string

The UUID of the virtual disk’s VMDK file. This is used to track the virtual disk on the virtual machine.

writeThrough boolean

If true, writes for this disk are sent directly to the filesystem immediately instead of being buffered. Default: false.

attach bool

Attach an external disk instead of creating a new one. Implies and conflicts with keep_on_remove. If set, you cannot set size, eagerly_scrub, or thin_provisioned. Must set path if used.

controller_type str

The type of storage controller to attach the disk to. Can be scsi, sata, or ide. You must have the appropriate number of controllers enabled for the selected type. Default scsi.

datastore_id str

The datastore ID that the ISO is located in. Requried for using a datastore ISO. Conflicts with client_device.

device_address str

An address internal to this provider that helps locate the device when key is unavailable. This follows a convention of CONTROLLER_TYPE:BUS_NUMBER:UNIT_NUMBER. Example: scsi:0:1 means device unit 1 on SCSI bus 0.

disk_mode str

The mode of this this virtual disk for purposes of writes and snapshotting. Can be one of append, independent_nonpersistent, independent_persistent, nonpersistent, persistent, or undoable. Default: persistent. For an explanation of options, click [here][vmware-docs-disk-mode].

disk_sharing str

The sharing mode of this virtual disk. Can be one of sharingMultiWriter or sharingNone. Default: sharingNone.

eagerly_scrub bool

If set to true, the disk space is zeroed out on VM creation. This will delay the creation of the disk or virtual machine. Cannot be set to true when thin_provisioned is true. See the section on picking a disk type. Default: false.

io_limit int

The upper limit of IOPS that this disk can use. The default is no limit.

io_reservation int

The I/O reservation (guarantee) that this disk has, in IOPS. The default is no reservation.

io_share_count int

The share count for this disk when the share level is custom.

io_share_level str

The share allocation level for this disk. Can be one of low, normal, high, or custom. Default: normal.

keep_on_remove bool

Keep this disk when removing the device or destroying the virtual machine. Default: false.

key int

The ID of the device within the virtual machine.

label str

A label for the disk. Forces a new disk if changed.

name str

An alias for both label and path, the latter when using attach. Required if not using label.

Deprecated:

The name attribute for virtual disks will be removed in favor of "label" in future releases. To transition existing disks, rename the "name" attribute to "label". When doing so, ensure the value of the attribute stays the same.

Note that "label" does not control the name of a VMDK and does not need to bear the name of one on new disks or virtual machines. For more information, see the documentation for the label attribute at:

https://www.terraform.io/docs/providers/vsphere/r/virtual_machine.html#label

path str

The path to the ISO file. Required for using a datastore ISO. Conflicts with client_device.

size int

The size of the disk, in GB.

storage_policy_id str

The UUID of the storage policy to assign to this disk.

thin_provisioned bool

If true, this disk is thin provisioned, with space for the file being allocated on an as-needed basis. Cannot be set to true when eagerly_scrub is true. See the section on picking a disk type. Default: true.

unit_number int

The disk number on the storage bus. The maximum value for this setting is the value of the controller count times the controller capacity (15 for SCSI, 30 for SATA, and 2 for IDE). The default is 0, for which one disk must be set to. Duplicate unit numbers are not allowed.

uuid str

The UUID of the virtual disk’s VMDK file. This is used to track the virtual disk on the virtual machine.

write_through bool

If true, writes for this disk are sent directly to the filesystem immediately instead of being buffered. Default: false.

VirtualMachineNetworkInterface

NetworkId string

The managed object reference ID of the network to connect this interface to.

AdapterType string

The network interface type. Can be one of e1000, e1000e, or vmxnet3. Default: vmxnet3.

BandwidthLimit int

The upper bandwidth limit of this network interface, in Mbits/sec. The default is no limit.

BandwidthReservation int

The bandwidth reservation of this network interface, in Mbits/sec. The default is no reservation.

BandwidthShareCount int

The share count for this network interface when the share level is custom.

BandwidthShareLevel string

The bandwidth share allocation level for this interface. Can be one of low, normal, high, or custom. Default: normal.

DeviceAddress string

An address internal to this provider that helps locate the device when key is unavailable. This follows a convention of CONTROLLER_TYPE:BUS_NUMBER:UNIT_NUMBER. Example: scsi:0:1 means device unit 1 on SCSI bus 0.

Key int

The ID of the device within the virtual machine.

MacAddress string

The MAC address of this network interface. Can only be manually set if use_static_mac is true, otherwise this is a computed value that gives the current MAC address of this interface.

OvfMapping string

Specifies which OVF NIC the network_interface should be associated with. Only applies at creation and only when deploying from an OVF source.

UseStaticMac bool

If true, the mac_address field is treated as a static MAC address and set accordingly. Setting this to true requires mac_address to be set. Default: false.

NetworkId string

The managed object reference ID of the network to connect this interface to.

AdapterType string

The network interface type. Can be one of e1000, e1000e, or vmxnet3. Default: vmxnet3.

BandwidthLimit int

The upper bandwidth limit of this network interface, in Mbits/sec. The default is no limit.

BandwidthReservation int

The bandwidth reservation of this network interface, in Mbits/sec. The default is no reservation.

BandwidthShareCount int

The share count for this network interface when the share level is custom.

BandwidthShareLevel string

The bandwidth share allocation level for this interface. Can be one of low, normal, high, or custom. Default: normal.

DeviceAddress string

An address internal to this provider that helps locate the device when key is unavailable. This follows a convention of CONTROLLER_TYPE:BUS_NUMBER:UNIT_NUMBER. Example: scsi:0:1 means device unit 1 on SCSI bus 0.

Key int

The ID of the device within the virtual machine.

MacAddress string

The MAC address of this network interface. Can only be manually set if use_static_mac is true, otherwise this is a computed value that gives the current MAC address of this interface.

OvfMapping string

Specifies which OVF NIC the network_interface should be associated with. Only applies at creation and only when deploying from an OVF source.

UseStaticMac bool

If true, the mac_address field is treated as a static MAC address and set accordingly. Setting this to true requires mac_address to be set. Default: false.

networkId string

The managed object reference ID of the network to connect this interface to.

adapterType string

The network interface type. Can be one of e1000, e1000e, or vmxnet3. Default: vmxnet3.

bandwidthLimit number

The upper bandwidth limit of this network interface, in Mbits/sec. The default is no limit.

bandwidthReservation number

The bandwidth reservation of this network interface, in Mbits/sec. The default is no reservation.

bandwidthShareCount number

The share count for this network interface when the share level is custom.

bandwidthShareLevel string

The bandwidth share allocation level for this interface. Can be one of low, normal, high, or custom. Default: normal.

deviceAddress string

An address internal to this provider that helps locate the device when key is unavailable. This follows a convention of CONTROLLER_TYPE:BUS_NUMBER:UNIT_NUMBER. Example: scsi:0:1 means device unit 1 on SCSI bus 0.

key number

The ID of the device within the virtual machine.

macAddress string

The MAC address of this network interface. Can only be manually set if use_static_mac is true, otherwise this is a computed value that gives the current MAC address of this interface.

ovfMapping string

Specifies which OVF NIC the network_interface should be associated with. Only applies at creation and only when deploying from an OVF source.

useStaticMac boolean

If true, the mac_address field is treated as a static MAC address and set accordingly. Setting this to true requires mac_address to be set. Default: false.

network_id str

The managed object reference ID of the network to connect this interface to.

adapter_type str

The network interface type. Can be one of e1000, e1000e, or vmxnet3. Default: vmxnet3.

bandwidth_limit int

The upper bandwidth limit of this network interface, in Mbits/sec. The default is no limit.

bandwidth_reservation int

The bandwidth reservation of this network interface, in Mbits/sec. The default is no reservation.

bandwidth_share_count int

The share count for this network interface when the share level is custom.

bandwidth_share_level str

The bandwidth share allocation level for this interface. Can be one of low, normal, high, or custom. Default: normal.

device_address str

An address internal to this provider that helps locate the device when key is unavailable. This follows a convention of CONTROLLER_TYPE:BUS_NUMBER:UNIT_NUMBER. Example: scsi:0:1 means device unit 1 on SCSI bus 0.

key int

The ID of the device within the virtual machine.

mac_address str

The MAC address of this network interface. Can only be manually set if use_static_mac is true, otherwise this is a computed value that gives the current MAC address of this interface.

ovf_mapping str

Specifies which OVF NIC the network_interface should be associated with. Only applies at creation and only when deploying from an OVF source.

use_static_mac bool

If true, the mac_address field is treated as a static MAC address and set accordingly. Setting this to true requires mac_address to be set. Default: false.

VirtualMachineOvfDeploy

VirtualMachineVapp

Properties Dictionary<string, string>
Properties map[string]string
properties {[key: string]: string}
properties Mapping[str, str]

Package Details

Repository
https://github.com/pulumi/pulumi-vsphere
License
Apache-2.0
Notes
This Pulumi package is based on the vsphere Terraform Provider.