vsphere.VirtualMachine
Explore with Pulumi AI
Create VirtualMachine Resource
new VirtualMachine(name: string, args: VirtualMachineArgs, opts?: CustomResourceOptions);
@overload
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,
cdroms: Optional[Sequence[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,
extra_config_reboot_required: Optional[bool] = 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,
replace_trigger: Optional[str] = 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,
sync_time_with_host_periodically: Optional[bool] = None,
tags: Optional[Sequence[str]] = None,
tools_upgrade_policy: Optional[str] = None,
vapp: Optional[VirtualMachineVappArgs] = None,
vbs_enabled: Optional[bool] = None,
vvtd_enabled: Optional[bool] = 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)
@overload
def VirtualMachine(resource_name: str,
args: VirtualMachineArgs,
opts: Optional[ResourceOptions] = None)
func NewVirtualMachine(ctx *Context, name string, args VirtualMachineArgs, opts ...ResourceOption) (*VirtualMachine, error)
public VirtualMachine(string name, VirtualMachineArgs args, CustomResourceOptions? opts = null)
public VirtualMachine(String name, VirtualMachineArgs args)
public VirtualMachine(String name, VirtualMachineArgs args, CustomResourceOptions options)
type: vsphere:VirtualMachine
properties: # The arguments to resource properties.
options: # 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.
- resource_name str
- The unique name of the resource.
- args VirtualMachineArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control 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.
- name String
- The unique name of the resource.
- args VirtualMachineArgs
- The arguments to resource properties.
- options 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 Architecture and Concepts docs.
Inputs
The VirtualMachine resource accepts the following input properties:
- Resource
Pool stringId The managed object reference ID of the resource pool in which to place the virtual machine. See the Virtual Machine Migration section for more information on modifying this value.
NOTE: All clusters and standalone hosts have a default root resource pool. This resource argument does not directly accept the cluster or standalone host resource. For more information, see the section on specifying the Root Resource Pool in the
vsphere.ResourcePool
data source documentation on using the root resource pool.- Alternate
Guest stringName The guest name for the operating system when
guest_id
isotherGuest
orotherGuest64
.- Annotation string
A user-provided description of the virtual machine.
- Boot
Delay int The number of milliseconds to wait before starting the boot sequence. The default is no delay.
- Boot
Retry intDelay The number of milliseconds to wait before retrying the boot sequence. This option is only valid if
boot_retry_enabled
istrue
. Default:10000
(10 seconds).- Boot
Retry boolEnabled If set to
true
, a virtual machine that fails to boot will try again after the delay defined inboot_retry_delay
. Default:false
.- Cdroms
List<Pulumi.
VSphere. Inputs. Virtual Machine Cdrom> A specification for a CD-ROM device on the virtual machine. See CD-ROM options for more information.
- Clone
Pulumi.
VSphere. Inputs. Virtual Machine Clone When specified, the virtual machine will be created as a clone of a specified template. Optional customization options can be submitted for the resource. See creating a virtual machine from a template for more information.
- Cpu
Hot boolAdd Enabled Allow CPUs to be added to the virtual machine while it is powered on.
- Cpu
Hot boolRemove Enabled Allow CPUs to be removed to the virtual machine while it is powered on.
- Cpu
Limit int The maximum amount of CPU (in MHz) that the virtual machine can consume, regardless of available resources. The default is no limit.
- Cpu
Performance boolCounters Enabled Enable CPU performance counters on the virtual machine. Default:
false
.- Cpu
Reservation int The amount of CPU (in MHz) that the virtual machine is guaranteed. The default is no reservation.
- int
The number of CPU shares allocated to the virtual machine when the
cpu_share_level
iscustom
.- string
The allocation level for the virtual machine CPU resources. One of
high
,low
,normal
, orcustom
. Default:custom
.- Custom
Attributes Dictionary<string, string> Map of custom attribute ids to attribute value strings to set for virtual machine. Please refer to the
vsphere_custom_attributes
resource for more information on setting custom attributes.NOTE: Custom attributes requires vCenter Server and is not supported on direct ESXi host connections.
- Datacenter
Id string The datacenter ID. Required only when deploying an OVF/OVA template.
- Datastore
Cluster stringId The managed object reference ID of the datastore cluster in which to place the virtual machine. This setting applies to entire virtual machine and implies that you wish to use vSphere Storage DRS with the virtual machine. See the section on virtual machine migration for more information on modifying this value.
NOTE: One of
datastore_id
ordatastore_cluster_id
must be specified.NOTE: Use of
datastore_cluster_id
requires vSphere Storage DRS to be enabled on the specified datastore cluster.NOTE: The
datastore_cluster_id
setting applies to the entire virtual machine resource. You cannot assign individual individual disks to datastore clusters. In addition, you cannot use theattach
setting to attach external disks on virtual machines that are assigned to datastore clusters.- Datastore
Id string The datastore ID that on which the ISO is located. Required for using a datastore ISO. Conflicts with
client_device
.- Disks
List<Pulumi.
VSphere. Inputs. Virtual Machine Disk> A specification for a virtual disk device on the virtual machine. See disk options for more information.
- Efi
Secure boolBoot Enabled Use this option to enable EFI secure boot when the
firmware
type is set to isefi
. Default:false
.NOTE: EFI secure boot is only available on vSphere 6.5 and later.
- Enable
Disk boolUuid 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 stringMode The EPT/RVI (hardware memory virtualization) setting for the virtual machine. One of
automatic
,on
, oroff
. Default:automatic
.- Extra
Config Dictionary<string, string> Extra configuration data for the virtual machine. Can be used to supply advanced parameters not normally in configuration, such as instance metadata and userdata.
NOTE: Do not use
extra_config
when working with a template imported from OVF/OVA as your settings may be ignored. Use thevapp
blockproperties
section as described in Using vApp Properties for OVF/OVA Configuration.- Extra
Config boolReboot Required Allow the virtual machine to be rebooted when a change to
extra_config
occurs. Default:true
.- Firmware string
The firmware for the virtual machine. One of
bios
orefi
.- Folder string
The path to the virtual machine folder in which to place the virtual machine, relative to the datacenter path (
/<datacenter-name>/vm
). For example,/dc-01/vm/foo
- Force
Power boolOff If a guest shutdown failed or times out while updating or destroying (see
shutdown_wait_timeout
), force the power-off of the virtual machine. Default:true
.- Guest
Id string The guest ID for the operating system type. For a full list of possible values, see here. Default:
otherGuest64
.- Hardware
Version int The hardware version number. Valid range is from 4 to 21. The hardware version cannot be downgraded. See virtual machine hardware versions and compatibility for more information on supported settings.
- Host
System stringId The managed object reference ID of a host on which to place the virtual machine. See the section on virtual machine migration for more information on modifying this value. When using a vSphere cluster, if a
host_system_id
is not supplied, vSphere will select a host in the cluster to place the virtual machine, according to any defaults or vSphere DRS placement policies.- Hv
Mode string The hardware virtualization (non-nested) setting for the virtual machine. One of
hvAuto
,hvOn
, orhvOff
. Default:hvAuto
.- Ide
Controller intCount The number of IDE controllers that the virtual machine. This directly affects the number 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:
2
.- Ignored
Guest List<string>Ips 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 so that the waiter will continue to wait for a valid IP address. Default:
[]
.- Latency
Sensitivity 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. One of
low
,normal
,medium
, orhigh
.NOTE: On higher sensitivities, you may need to adjust the
memory_reservation
to the full amount of memory provisioned for the virtual machine.- Memory int
The memory size to assign to the virtual machine, in MB. Default:
1024
(1 GB).- Memory
Hot boolAdd Enabled Allow memory to be added to the virtual machine while it is powered on.
NOTE: CPU and memory hot add options are not available on all guest operating systems. Please refer to the VMware Guest OS Compatibility Guide to which settings are allow for your guest operating system. In addition, at least one
pulumi up
must be run before you are able to use CPU and memory hot add.NOTE: For Linux 64-bit guest operating systems with less than or equal to 3GB, the virtual machine must powered off to add memory beyond 3GB. Subsequent hot add of memory does not require the virtual machine to be powered-off to apply the plan. Please refer to VMware KB 2008405.
- Memory
Limit int The maximum amount of memory (in MB) that th virtual machine can consume, regardless of available resources. The default is no limit.
- Memory
Reservation int The amount of memory (in MB) that the virtual machine is guaranteed. The default is no reservation.
- int
The number of memory shares allocated to the virtual machine when the
memory_share_level
iscustom
.- string
The allocation level for the virtual machine memory resources. One of
high
,low
,normal
, orcustom
. Default:custom
.- Migrate
Wait intTimeout The amount of time, in minutes, to wait for a virtual machine migration to complete before failing. Default:
10
minutes. See the section on virtual machine migration for more information.- Name string
The name of the virtual machine.
- Nested
Hv boolEnabled Enable nested hardware virtualization on the virtual machine, facilitating nested virtualization in the guest operating system. Default:
false
.- Network
Interfaces List<Pulumi.VSphere. Inputs. Virtual Machine Network Interface> A specification for a virtual NIC on the virtual machine. See network interface options for more information.
- Num
Cores intPer Socket The number of cores per socket in the virtual machine. The number of vCPUs on the virtual machine will be
num_cpus
divided bynum_cores_per_socket
. If specified, the value supplied tonum_cpus
must be evenly divisible by this value. Default:1
.- Num
Cpus int The total number of virtual processor cores to assign to the virtual machine. Default:
1
.- Ovf
Deploy Pulumi.VSphere. Inputs. Virtual Machine Ovf Deploy When specified, the virtual machine will be deployed from the provided OVF/OVA template. See creating a virtual machine from an OVF/OVA template for more information.
- Pci
Device List<string>Ids List of host PCI device IDs in which to create PCI passthroughs.
NOTE: Cloning requires vCenter Server and is not supported on direct ESXi host connections.
- Poweron
Timeout int The amount of time, in seconds, that we will be trying to power on a VM
- Replace
Trigger string Triggers replacement of resource whenever it changes.
For example,
replace_trigger = sha256(format("%s-%s",data.template_file.cloud_init_metadata.rendered,data.template_file.cloud_init_userdata.rendered))
will fingerprint the changes in cloud-init metadata and userdata templates. This will enable a replacement of the resource whenever the dependant template renders a new configuration. (Forces a replacement.)- Run
Tools boolScripts After Power On Enable post-power-on scripts to run when VMware Tools is installed. Default:
true
.- Run
Tools boolScripts After Resume Enable ost-resume scripts to run when VMware Tools is installed. Default:
true
.- Run
Tools boolScripts Before Guest Reboot Enable pre-reboot scripts to run when VMware Tools is installed. Default:
false
.- Run
Tools boolScripts Before Guest Shutdown Enable pre-shutdown scripts to run when VMware Tools is installed. Default:
true
.- Run
Tools boolScripts Before Guest Standby Enable pre-standby scripts to run when VMware Tools is installed. Default:
true
.- Sata
Controller intCount 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 stringSharing The type of SCSI bus sharing for the virtual machine SCSI controller. One of
physicalSharing
,virtualSharing
, andnoSharing
. Default:noSharing
.- Scsi
Controller intCount The number of SCSI 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
Type string The SCSI controller type for the virtual machine. One of
lsilogic
(LSI Logic Parallel),lsilogic-sas
(LSI Logic SAS) orpvscsi
(VMware Paravirtual). Default:pvscsi
.- Shutdown
Wait intTimeout 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 totrue
, the virtual machine will be forced to power-off after the timeout, otherwise an error is returned. Default:3
minutes.- Storage
Policy stringId The UUID of the storage policy to assign to the virtual disk.
- Swap
Placement stringPolicy The swap file placement policy for the virtual machine. One of
inherit
,hostLocal
, orvmDirectory
. Default:inherit
.- Sync
Time boolWith Host Enable the guest operating system to synchronization its clock with the host when the virtual machine is powered on or resumed. Requires vSphere 7.0 Update 1 and later. Requires VMware Tools to be installed. Default:
false
.- Sync
Time boolWith Host Periodically Enable the guest operating system to periodically synchronize its clock with the host. Requires vSphere 7.0 Update 1 and later. On previous versions, setting
sync_time_with_host
is will enable periodic synchronization. Requires VMware Tools to be installed. Default:false
.- List<string>
The IDs of any tags to attach to this resource. Please refer to the
vsphere.Tag
resource for more information on applying tags to virtual machine resources.NOTE: Tagging support is unsupported on direct ESXi host connections and requires vCenter Server instance.
- Tools
Upgrade stringPolicy Enable automatic upgrade of the VMware Tools version when the virtual machine is rebooted. If necessary, VMware Tools is upgraded to the latest version supported by the host on which the virtual machine is running. Requires VMware Tools to be installed. One of
manual
orupgradeAtPowerCycle
. Default:manual
.- Vapp
Pulumi.
VSphere. Inputs. Virtual Machine Vapp Used for vApp configurations. The only sub-key available is
properties
, which is a key/value map of properties for virtual machines imported from and OVF/OVA. See Using vApp Properties for OVF/OVA Configuration for more information.- Vbs
Enabled bool Enable Virtualization Based Security. Requires
firmware
to beefi
. In addition,vvtd_enabled
,nested_hv_enabled
, andefi_secure_boot_enabled
must all have a value oftrue
. Supported on vSphere 6.7 and later. Default:false
.- Vvtd
Enabled bool Enable Intel Virtualization Technology for Directed I/O for the virtual machine (I/O MMU in the vSphere Client). Supported on vSphere 6.7 and later. Default:
false
.- Wait
For intGuest Ip Timeout The amount of time, in minutes, to wait for an available guest IP address on the virtual machine. This should only be used if the version VMware Tools does not allow the
wait_for_guest_net_timeout
waiter to be used. A value less than1
disables the waiter. Default:0
.- Wait
For boolGuest Net Routable 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 thewait_for_guest_ip_timeout
waiter is used. Default:true
.- Wait
For intGuest Net Timeout The amount of time, in minutes, to wait for an available guest IP address on the virtual machine. 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 than1
disables the waiter. Default:5
minutes.
- Resource
Pool stringId The managed object reference ID of the resource pool in which to place the virtual machine. See the Virtual Machine Migration section for more information on modifying this value.
NOTE: All clusters and standalone hosts have a default root resource pool. This resource argument does not directly accept the cluster or standalone host resource. For more information, see the section on specifying the Root Resource Pool in the
vsphere.ResourcePool
data source documentation on using the root resource pool.- Alternate
Guest stringName The guest name for the operating system when
guest_id
isotherGuest
orotherGuest64
.- Annotation string
A user-provided description of the virtual machine.
- Boot
Delay int The number of milliseconds to wait before starting the boot sequence. The default is no delay.
- Boot
Retry intDelay The number of milliseconds to wait before retrying the boot sequence. This option is only valid if
boot_retry_enabled
istrue
. Default:10000
(10 seconds).- Boot
Retry boolEnabled If set to
true
, a virtual machine that fails to boot will try again after the delay defined inboot_retry_delay
. Default:false
.- Cdroms
[]Virtual
Machine Cdrom Args A specification for a CD-ROM device on the virtual machine. See CD-ROM options for more information.
- Clone
Virtual
Machine Clone Args When specified, the virtual machine will be created as a clone of a specified template. Optional customization options can be submitted for the resource. See creating a virtual machine from a template for more information.
- Cpu
Hot boolAdd Enabled Allow CPUs to be added to the virtual machine while it is powered on.
- Cpu
Hot boolRemove Enabled Allow CPUs to be removed to the virtual machine while it is powered on.
- Cpu
Limit int The maximum amount of CPU (in MHz) that the virtual machine can consume, regardless of available resources. The default is no limit.
- Cpu
Performance boolCounters Enabled Enable CPU performance counters on the virtual machine. Default:
false
.- Cpu
Reservation int The amount of CPU (in MHz) that the virtual machine is guaranteed. The default is no reservation.
- int
The number of CPU shares allocated to the virtual machine when the
cpu_share_level
iscustom
.- string
The allocation level for the virtual machine CPU resources. One of
high
,low
,normal
, orcustom
. Default:custom
.- Custom
Attributes map[string]string Map of custom attribute ids to attribute value strings to set for virtual machine. Please refer to the
vsphere_custom_attributes
resource for more information on setting custom attributes.NOTE: Custom attributes requires vCenter Server and is not supported on direct ESXi host connections.
- Datacenter
Id string The datacenter ID. Required only when deploying an OVF/OVA template.
- Datastore
Cluster stringId The managed object reference ID of the datastore cluster in which to place the virtual machine. This setting applies to entire virtual machine and implies that you wish to use vSphere Storage DRS with the virtual machine. See the section on virtual machine migration for more information on modifying this value.
NOTE: One of
datastore_id
ordatastore_cluster_id
must be specified.NOTE: Use of
datastore_cluster_id
requires vSphere Storage DRS to be enabled on the specified datastore cluster.NOTE: The
datastore_cluster_id
setting applies to the entire virtual machine resource. You cannot assign individual individual disks to datastore clusters. In addition, you cannot use theattach
setting to attach external disks on virtual machines that are assigned to datastore clusters.- Datastore
Id string The datastore ID that on which the ISO is located. Required for using a datastore ISO. Conflicts with
client_device
.- Disks
[]Virtual
Machine Disk Args A specification for a virtual disk device on the virtual machine. See disk options for more information.
- Efi
Secure boolBoot Enabled Use this option to enable EFI secure boot when the
firmware
type is set to isefi
. Default:false
.NOTE: EFI secure boot is only available on vSphere 6.5 and later.
- Enable
Disk boolUuid 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 stringMode The EPT/RVI (hardware memory virtualization) setting for the virtual machine. One of
automatic
,on
, oroff
. Default:automatic
.- Extra
Config map[string]string Extra configuration data for the virtual machine. Can be used to supply advanced parameters not normally in configuration, such as instance metadata and userdata.
NOTE: Do not use
extra_config
when working with a template imported from OVF/OVA as your settings may be ignored. Use thevapp
blockproperties
section as described in Using vApp Properties for OVF/OVA Configuration.- Extra
Config boolReboot Required Allow the virtual machine to be rebooted when a change to
extra_config
occurs. Default:true
.- Firmware string
The firmware for the virtual machine. One of
bios
orefi
.- Folder string
The path to the virtual machine folder in which to place the virtual machine, relative to the datacenter path (
/<datacenter-name>/vm
). For example,/dc-01/vm/foo
- Force
Power boolOff If a guest shutdown failed or times out while updating or destroying (see
shutdown_wait_timeout
), force the power-off of the virtual machine. Default:true
.- Guest
Id string The guest ID for the operating system type. For a full list of possible values, see here. Default:
otherGuest64
.- Hardware
Version int The hardware version number. Valid range is from 4 to 21. The hardware version cannot be downgraded. See virtual machine hardware versions and compatibility for more information on supported settings.
- Host
System stringId The managed object reference ID of a host on which to place the virtual machine. See the section on virtual machine migration for more information on modifying this value. When using a vSphere cluster, if a
host_system_id
is not supplied, vSphere will select a host in the cluster to place the virtual machine, according to any defaults or vSphere DRS placement policies.- Hv
Mode string The hardware virtualization (non-nested) setting for the virtual machine. One of
hvAuto
,hvOn
, orhvOff
. Default:hvAuto
.- Ide
Controller intCount The number of IDE controllers that the virtual machine. This directly affects the number 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:
2
.- Ignored
Guest []stringIps 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 so that the waiter will continue to wait for a valid IP address. Default:
[]
.- Latency
Sensitivity 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. One of
low
,normal
,medium
, orhigh
.NOTE: On higher sensitivities, you may need to adjust the
memory_reservation
to the full amount of memory provisioned for the virtual machine.- Memory int
The memory size to assign to the virtual machine, in MB. Default:
1024
(1 GB).- Memory
Hot boolAdd Enabled Allow memory to be added to the virtual machine while it is powered on.
NOTE: CPU and memory hot add options are not available on all guest operating systems. Please refer to the VMware Guest OS Compatibility Guide to which settings are allow for your guest operating system. In addition, at least one
pulumi up
must be run before you are able to use CPU and memory hot add.NOTE: For Linux 64-bit guest operating systems with less than or equal to 3GB, the virtual machine must powered off to add memory beyond 3GB. Subsequent hot add of memory does not require the virtual machine to be powered-off to apply the plan. Please refer to VMware KB 2008405.
- Memory
Limit int The maximum amount of memory (in MB) that th virtual machine can consume, regardless of available resources. The default is no limit.
- Memory
Reservation int The amount of memory (in MB) that the virtual machine is guaranteed. The default is no reservation.
- int
The number of memory shares allocated to the virtual machine when the
memory_share_level
iscustom
.- string
The allocation level for the virtual machine memory resources. One of
high
,low
,normal
, orcustom
. Default:custom
.- Migrate
Wait intTimeout The amount of time, in minutes, to wait for a virtual machine migration to complete before failing. Default:
10
minutes. See the section on virtual machine migration for more information.- Name string
The name of the virtual machine.
- Nested
Hv boolEnabled Enable nested hardware virtualization on the virtual machine, facilitating nested virtualization in the guest operating system. Default:
false
.- Network
Interfaces []VirtualMachine Network Interface Args A specification for a virtual NIC on the virtual machine. See network interface options for more information.
- Num
Cores intPer Socket The number of cores per socket in the virtual machine. The number of vCPUs on the virtual machine will be
num_cpus
divided bynum_cores_per_socket
. If specified, the value supplied tonum_cpus
must be evenly divisible by this value. Default:1
.- Num
Cpus int The total number of virtual processor cores to assign to the virtual machine. Default:
1
.- Ovf
Deploy VirtualMachine Ovf Deploy Args When specified, the virtual machine will be deployed from the provided OVF/OVA template. See creating a virtual machine from an OVF/OVA template for more information.
- Pci
Device []stringIds List of host PCI device IDs in which to create PCI passthroughs.
NOTE: Cloning requires vCenter Server and is not supported on direct ESXi host connections.
- Poweron
Timeout int The amount of time, in seconds, that we will be trying to power on a VM
- Replace
Trigger string Triggers replacement of resource whenever it changes.
For example,
replace_trigger = sha256(format("%s-%s",data.template_file.cloud_init_metadata.rendered,data.template_file.cloud_init_userdata.rendered))
will fingerprint the changes in cloud-init metadata and userdata templates. This will enable a replacement of the resource whenever the dependant template renders a new configuration. (Forces a replacement.)- Run
Tools boolScripts After Power On Enable post-power-on scripts to run when VMware Tools is installed. Default:
true
.- Run
Tools boolScripts After Resume Enable ost-resume scripts to run when VMware Tools is installed. Default:
true
.- Run
Tools boolScripts Before Guest Reboot Enable pre-reboot scripts to run when VMware Tools is installed. Default:
false
.- Run
Tools boolScripts Before Guest Shutdown Enable pre-shutdown scripts to run when VMware Tools is installed. Default:
true
.- Run
Tools boolScripts Before Guest Standby Enable pre-standby scripts to run when VMware Tools is installed. Default:
true
.- Sata
Controller intCount 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 stringSharing The type of SCSI bus sharing for the virtual machine SCSI controller. One of
physicalSharing
,virtualSharing
, andnoSharing
. Default:noSharing
.- Scsi
Controller intCount The number of SCSI 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
Type string The SCSI controller type for the virtual machine. One of
lsilogic
(LSI Logic Parallel),lsilogic-sas
(LSI Logic SAS) orpvscsi
(VMware Paravirtual). Default:pvscsi
.- Shutdown
Wait intTimeout 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 totrue
, the virtual machine will be forced to power-off after the timeout, otherwise an error is returned. Default:3
minutes.- Storage
Policy stringId The UUID of the storage policy to assign to the virtual disk.
- Swap
Placement stringPolicy The swap file placement policy for the virtual machine. One of
inherit
,hostLocal
, orvmDirectory
. Default:inherit
.- Sync
Time boolWith Host Enable the guest operating system to synchronization its clock with the host when the virtual machine is powered on or resumed. Requires vSphere 7.0 Update 1 and later. Requires VMware Tools to be installed. Default:
false
.- Sync
Time boolWith Host Periodically Enable the guest operating system to periodically synchronize its clock with the host. Requires vSphere 7.0 Update 1 and later. On previous versions, setting
sync_time_with_host
is will enable periodic synchronization. Requires VMware Tools to be installed. Default:false
.- []string
The IDs of any tags to attach to this resource. Please refer to the
vsphere.Tag
resource for more information on applying tags to virtual machine resources.NOTE: Tagging support is unsupported on direct ESXi host connections and requires vCenter Server instance.
- Tools
Upgrade stringPolicy Enable automatic upgrade of the VMware Tools version when the virtual machine is rebooted. If necessary, VMware Tools is upgraded to the latest version supported by the host on which the virtual machine is running. Requires VMware Tools to be installed. One of
manual
orupgradeAtPowerCycle
. Default:manual
.- Vapp
Virtual
Machine Vapp Args Used for vApp configurations. The only sub-key available is
properties
, which is a key/value map of properties for virtual machines imported from and OVF/OVA. See Using vApp Properties for OVF/OVA Configuration for more information.- Vbs
Enabled bool Enable Virtualization Based Security. Requires
firmware
to beefi
. In addition,vvtd_enabled
,nested_hv_enabled
, andefi_secure_boot_enabled
must all have a value oftrue
. Supported on vSphere 6.7 and later. Default:false
.- Vvtd
Enabled bool Enable Intel Virtualization Technology for Directed I/O for the virtual machine (I/O MMU in the vSphere Client). Supported on vSphere 6.7 and later. Default:
false
.- Wait
For intGuest Ip Timeout The amount of time, in minutes, to wait for an available guest IP address on the virtual machine. This should only be used if the version VMware Tools does not allow the
wait_for_guest_net_timeout
waiter to be used. A value less than1
disables the waiter. Default:0
.- Wait
For boolGuest Net Routable 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 thewait_for_guest_ip_timeout
waiter is used. Default:true
.- Wait
For intGuest Net Timeout The amount of time, in minutes, to wait for an available guest IP address on the virtual machine. 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 than1
disables the waiter. Default:5
minutes.
- resource
Pool StringId The managed object reference ID of the resource pool in which to place the virtual machine. See the Virtual Machine Migration section for more information on modifying this value.
NOTE: All clusters and standalone hosts have a default root resource pool. This resource argument does not directly accept the cluster or standalone host resource. For more information, see the section on specifying the Root Resource Pool in the
vsphere.ResourcePool
data source documentation on using the root resource pool.- alternate
Guest StringName The guest name for the operating system when
guest_id
isotherGuest
orotherGuest64
.- annotation String
A user-provided description of the virtual machine.
- boot
Delay Integer The number of milliseconds to wait before starting the boot sequence. The default is no delay.
- boot
Retry IntegerDelay The number of milliseconds to wait before retrying the boot sequence. This option is only valid if
boot_retry_enabled
istrue
. Default:10000
(10 seconds).- boot
Retry BooleanEnabled If set to
true
, a virtual machine that fails to boot will try again after the delay defined inboot_retry_delay
. Default:false
.- cdroms
List<Virtual
Machine Cdrom> A specification for a CD-ROM device on the virtual machine. See CD-ROM options for more information.
- clone_
Virtual
Machine Clone When specified, the virtual machine will be created as a clone of a specified template. Optional customization options can be submitted for the resource. See creating a virtual machine from a template for more information.
- cpu
Hot BooleanAdd Enabled Allow CPUs to be added to the virtual machine while it is powered on.
- cpu
Hot BooleanRemove Enabled Allow CPUs to be removed to the virtual machine while it is powered on.
- cpu
Limit Integer The maximum amount of CPU (in MHz) that the virtual machine can consume, regardless of available resources. The default is no limit.
- cpu
Performance BooleanCounters Enabled Enable CPU performance counters on the virtual machine. Default:
false
.- cpu
Reservation Integer The amount of CPU (in MHz) that the virtual machine is guaranteed. The default is no reservation.
- Integer
The number of CPU shares allocated to the virtual machine when the
cpu_share_level
iscustom
.- String
The allocation level for the virtual machine CPU resources. One of
high
,low
,normal
, orcustom
. Default:custom
.- custom
Attributes Map<String,String> Map of custom attribute ids to attribute value strings to set for virtual machine. Please refer to the
vsphere_custom_attributes
resource for more information on setting custom attributes.NOTE: Custom attributes requires vCenter Server and is not supported on direct ESXi host connections.
- datacenter
Id String The datacenter ID. Required only when deploying an OVF/OVA template.
- datastore
Cluster StringId The managed object reference ID of the datastore cluster in which to place the virtual machine. This setting applies to entire virtual machine and implies that you wish to use vSphere Storage DRS with the virtual machine. See the section on virtual machine migration for more information on modifying this value.
NOTE: One of
datastore_id
ordatastore_cluster_id
must be specified.NOTE: Use of
datastore_cluster_id
requires vSphere Storage DRS to be enabled on the specified datastore cluster.NOTE: The
datastore_cluster_id
setting applies to the entire virtual machine resource. You cannot assign individual individual disks to datastore clusters. In addition, you cannot use theattach
setting to attach external disks on virtual machines that are assigned to datastore clusters.- datastore
Id String The datastore ID that on which the ISO is located. Required for using a datastore ISO. Conflicts with
client_device
.- disks
List<Virtual
Machine Disk> A specification for a virtual disk device on the virtual machine. See disk options for more information.
- efi
Secure BooleanBoot Enabled Use this option to enable EFI secure boot when the
firmware
type is set to isefi
. Default:false
.NOTE: EFI secure boot is only available on vSphere 6.5 and later.
- enable
Disk BooleanUuid Expose the UUIDs of attached virtual disks to the virtual machine, allowing access to them in the guest. Default:
false
.- enable
Logging Boolean Enable logging of virtual machine events to a log file stored in the virtual machine directory. Default:
false
.- ept
Rvi StringMode The EPT/RVI (hardware memory virtualization) setting for the virtual machine. One of
automatic
,on
, oroff
. Default:automatic
.- extra
Config Map<String,String> Extra configuration data for the virtual machine. Can be used to supply advanced parameters not normally in configuration, such as instance metadata and userdata.
NOTE: Do not use
extra_config
when working with a template imported from OVF/OVA as your settings may be ignored. Use thevapp
blockproperties
section as described in Using vApp Properties for OVF/OVA Configuration.- extra
Config BooleanReboot Required Allow the virtual machine to be rebooted when a change to
extra_config
occurs. Default:true
.- firmware String
The firmware for the virtual machine. One of
bios
orefi
.- folder String
The path to the virtual machine folder in which to place the virtual machine, relative to the datacenter path (
/<datacenter-name>/vm
). For example,/dc-01/vm/foo
- force
Power BooleanOff If a guest shutdown failed or times out while updating or destroying (see
shutdown_wait_timeout
), force the power-off of the virtual machine. Default:true
.- guest
Id String The guest ID for the operating system type. For a full list of possible values, see here. Default:
otherGuest64
.- hardware
Version Integer The hardware version number. Valid range is from 4 to 21. The hardware version cannot be downgraded. See virtual machine hardware versions and compatibility for more information on supported settings.
- host
System StringId The managed object reference ID of a host on which to place the virtual machine. See the section on virtual machine migration for more information on modifying this value. When using a vSphere cluster, if a
host_system_id
is not supplied, vSphere will select a host in the cluster to place the virtual machine, according to any defaults or vSphere DRS placement policies.- hv
Mode String The hardware virtualization (non-nested) setting for the virtual machine. One of
hvAuto
,hvOn
, orhvOff
. Default:hvAuto
.- ide
Controller IntegerCount The number of IDE controllers that the virtual machine. This directly affects the number 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:
2
.- ignored
Guest List<String>Ips 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 so that the waiter will continue to wait for a valid IP address. Default:
[]
.- latency
Sensitivity 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. One of
low
,normal
,medium
, orhigh
.NOTE: On higher sensitivities, you may need to adjust the
memory_reservation
to the full amount of memory provisioned for the virtual machine.- memory Integer
The memory size to assign to the virtual machine, in MB. Default:
1024
(1 GB).- memory
Hot BooleanAdd Enabled Allow memory to be added to the virtual machine while it is powered on.
NOTE: CPU and memory hot add options are not available on all guest operating systems. Please refer to the VMware Guest OS Compatibility Guide to which settings are allow for your guest operating system. In addition, at least one
pulumi up
must be run before you are able to use CPU and memory hot add.NOTE: For Linux 64-bit guest operating systems with less than or equal to 3GB, the virtual machine must powered off to add memory beyond 3GB. Subsequent hot add of memory does not require the virtual machine to be powered-off to apply the plan. Please refer to VMware KB 2008405.
- memory
Limit Integer The maximum amount of memory (in MB) that th virtual machine can consume, regardless of available resources. The default is no limit.
- memory
Reservation Integer The amount of memory (in MB) that the virtual machine is guaranteed. The default is no reservation.
- Integer
The number of memory shares allocated to the virtual machine when the
memory_share_level
iscustom
.- String
The allocation level for the virtual machine memory resources. One of
high
,low
,normal
, orcustom
. Default:custom
.- migrate
Wait IntegerTimeout The amount of time, in minutes, to wait for a virtual machine migration to complete before failing. Default:
10
minutes. See the section on virtual machine migration for more information.- name String
The name of the virtual machine.
- nested
Hv BooleanEnabled Enable nested hardware virtualization on the virtual machine, facilitating nested virtualization in the guest operating system. Default:
false
.- network
Interfaces List<VirtualMachine Network Interface> A specification for a virtual NIC on the virtual machine. See network interface options for more information.
- num
Cores IntegerPer Socket The number of cores per socket in the virtual machine. The number of vCPUs on the virtual machine will be
num_cpus
divided bynum_cores_per_socket
. If specified, the value supplied tonum_cpus
must be evenly divisible by this value. Default:1
.- num
Cpus Integer The total number of virtual processor cores to assign to the virtual machine. Default:
1
.- ovf
Deploy VirtualMachine Ovf Deploy When specified, the virtual machine will be deployed from the provided OVF/OVA template. See creating a virtual machine from an OVF/OVA template for more information.
- pci
Device List<String>Ids List of host PCI device IDs in which to create PCI passthroughs.
NOTE: Cloning requires vCenter Server and is not supported on direct ESXi host connections.
- poweron
Timeout Integer The amount of time, in seconds, that we will be trying to power on a VM
- replace
Trigger String Triggers replacement of resource whenever it changes.
For example,
replace_trigger = sha256(format("%s-%s",data.template_file.cloud_init_metadata.rendered,data.template_file.cloud_init_userdata.rendered))
will fingerprint the changes in cloud-init metadata and userdata templates. This will enable a replacement of the resource whenever the dependant template renders a new configuration. (Forces a replacement.)- run
Tools BooleanScripts After Power On Enable post-power-on scripts to run when VMware Tools is installed. Default:
true
.- run
Tools BooleanScripts After Resume Enable ost-resume scripts to run when VMware Tools is installed. Default:
true
.- run
Tools BooleanScripts Before Guest Reboot Enable pre-reboot scripts to run when VMware Tools is installed. Default:
false
.- run
Tools BooleanScripts Before Guest Shutdown Enable pre-shutdown scripts to run when VMware Tools is installed. Default:
true
.- run
Tools BooleanScripts Before Guest Standby Enable pre-standby scripts to run when VMware Tools is installed. Default:
true
.- sata
Controller IntegerCount 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 StringSharing The type of SCSI bus sharing for the virtual machine SCSI controller. One of
physicalSharing
,virtualSharing
, andnoSharing
. Default:noSharing
.- scsi
Controller IntegerCount The number of SCSI 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
Type String The SCSI controller type for the virtual machine. One of
lsilogic
(LSI Logic Parallel),lsilogic-sas
(LSI Logic SAS) orpvscsi
(VMware Paravirtual). Default:pvscsi
.- shutdown
Wait IntegerTimeout 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 totrue
, the virtual machine will be forced to power-off after the timeout, otherwise an error is returned. Default:3
minutes.- storage
Policy StringId The UUID of the storage policy to assign to the virtual disk.
- swap
Placement StringPolicy The swap file placement policy for the virtual machine. One of
inherit
,hostLocal
, orvmDirectory
. Default:inherit
.- sync
Time BooleanWith Host Enable the guest operating system to synchronization its clock with the host when the virtual machine is powered on or resumed. Requires vSphere 7.0 Update 1 and later. Requires VMware Tools to be installed. Default:
false
.- sync
Time BooleanWith Host Periodically Enable the guest operating system to periodically synchronize its clock with the host. Requires vSphere 7.0 Update 1 and later. On previous versions, setting
sync_time_with_host
is will enable periodic synchronization. Requires VMware Tools to be installed. Default:false
.- List<String>
The IDs of any tags to attach to this resource. Please refer to the
vsphere.Tag
resource for more information on applying tags to virtual machine resources.NOTE: Tagging support is unsupported on direct ESXi host connections and requires vCenter Server instance.
- tools
Upgrade StringPolicy Enable automatic upgrade of the VMware Tools version when the virtual machine is rebooted. If necessary, VMware Tools is upgraded to the latest version supported by the host on which the virtual machine is running. Requires VMware Tools to be installed. One of
manual
orupgradeAtPowerCycle
. Default:manual
.- vapp
Virtual
Machine Vapp Used for vApp configurations. The only sub-key available is
properties
, which is a key/value map of properties for virtual machines imported from and OVF/OVA. See Using vApp Properties for OVF/OVA Configuration for more information.- vbs
Enabled Boolean Enable Virtualization Based Security. Requires
firmware
to beefi
. In addition,vvtd_enabled
,nested_hv_enabled
, andefi_secure_boot_enabled
must all have a value oftrue
. Supported on vSphere 6.7 and later. Default:false
.- vvtd
Enabled Boolean Enable Intel Virtualization Technology for Directed I/O for the virtual machine (I/O MMU in the vSphere Client). Supported on vSphere 6.7 and later. Default:
false
.- wait
For IntegerGuest Ip Timeout The amount of time, in minutes, to wait for an available guest IP address on the virtual machine. This should only be used if the version VMware Tools does not allow the
wait_for_guest_net_timeout
waiter to be used. A value less than1
disables the waiter. Default:0
.- wait
For BooleanGuest Net Routable 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 thewait_for_guest_ip_timeout
waiter is used. Default:true
.- wait
For IntegerGuest Net Timeout The amount of time, in minutes, to wait for an available guest IP address on the virtual machine. 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 than1
disables the waiter. Default:5
minutes.
- resource
Pool stringId The managed object reference ID of the resource pool in which to place the virtual machine. See the Virtual Machine Migration section for more information on modifying this value.
NOTE: All clusters and standalone hosts have a default root resource pool. This resource argument does not directly accept the cluster or standalone host resource. For more information, see the section on specifying the Root Resource Pool in the
vsphere.ResourcePool
data source documentation on using the root resource pool.- alternate
Guest stringName The guest name for the operating system when
guest_id
isotherGuest
orotherGuest64
.- annotation string
A user-provided description of the virtual machine.
- boot
Delay number The number of milliseconds to wait before starting the boot sequence. The default is no delay.
- boot
Retry numberDelay The number of milliseconds to wait before retrying the boot sequence. This option is only valid if
boot_retry_enabled
istrue
. Default:10000
(10 seconds).- boot
Retry booleanEnabled If set to
true
, a virtual machine that fails to boot will try again after the delay defined inboot_retry_delay
. Default:false
.- cdroms
Virtual
Machine Cdrom[] A specification for a CD-ROM device on the virtual machine. See CD-ROM options for more information.
- clone
Virtual
Machine Clone When specified, the virtual machine will be created as a clone of a specified template. Optional customization options can be submitted for the resource. See creating a virtual machine from a template for more information.
- cpu
Hot booleanAdd Enabled Allow CPUs to be added to the virtual machine while it is powered on.
- cpu
Hot booleanRemove Enabled Allow CPUs to be removed to the virtual machine while it is powered on.
- cpu
Limit number The maximum amount of CPU (in MHz) that the virtual machine can consume, regardless of available resources. The default is no limit.
- cpu
Performance booleanCounters Enabled Enable CPU performance counters on the virtual machine. Default:
false
.- cpu
Reservation number The amount of CPU (in MHz) that the virtual machine is guaranteed. The default is no reservation.
- number
The number of CPU shares allocated to the virtual machine when the
cpu_share_level
iscustom
.- string
The allocation level for the virtual machine CPU resources. One of
high
,low
,normal
, orcustom
. Default:custom
.- custom
Attributes {[key: string]: string} Map of custom attribute ids to attribute value strings to set for virtual machine. Please refer to the
vsphere_custom_attributes
resource for more information on setting custom attributes.NOTE: Custom attributes requires vCenter Server and is not supported on direct ESXi host connections.
- datacenter
Id string The datacenter ID. Required only when deploying an OVF/OVA template.
- datastore
Cluster stringId The managed object reference ID of the datastore cluster in which to place the virtual machine. This setting applies to entire virtual machine and implies that you wish to use vSphere Storage DRS with the virtual machine. See the section on virtual machine migration for more information on modifying this value.
NOTE: One of
datastore_id
ordatastore_cluster_id
must be specified.NOTE: Use of
datastore_cluster_id
requires vSphere Storage DRS to be enabled on the specified datastore cluster.NOTE: The
datastore_cluster_id
setting applies to the entire virtual machine resource. You cannot assign individual individual disks to datastore clusters. In addition, you cannot use theattach
setting to attach external disks on virtual machines that are assigned to datastore clusters.- datastore
Id string The datastore ID that on which the ISO is located. Required for using a datastore ISO. Conflicts with
client_device
.- disks
Virtual
Machine Disk[] A specification for a virtual disk device on the virtual machine. See disk options for more information.
- efi
Secure booleanBoot Enabled Use this option to enable EFI secure boot when the
firmware
type is set to isefi
. Default:false
.NOTE: EFI secure boot is only available on vSphere 6.5 and later.
- enable
Disk booleanUuid Expose the UUIDs of attached virtual disks to the virtual machine, allowing access to them in the guest. Default:
false
.- enable
Logging boolean Enable logging of virtual machine events to a log file stored in the virtual machine directory. Default:
false
.- ept
Rvi stringMode The EPT/RVI (hardware memory virtualization) setting for the virtual machine. One of
automatic
,on
, oroff
. Default:automatic
.- extra
Config {[key: string]: string} Extra configuration data for the virtual machine. Can be used to supply advanced parameters not normally in configuration, such as instance metadata and userdata.
NOTE: Do not use
extra_config
when working with a template imported from OVF/OVA as your settings may be ignored. Use thevapp
blockproperties
section as described in Using vApp Properties for OVF/OVA Configuration.- extra
Config booleanReboot Required Allow the virtual machine to be rebooted when a change to
extra_config
occurs. Default:true
.- firmware string
The firmware for the virtual machine. One of
bios
orefi
.- folder string
The path to the virtual machine folder in which to place the virtual machine, relative to the datacenter path (
/<datacenter-name>/vm
). For example,/dc-01/vm/foo
- force
Power booleanOff If a guest shutdown failed or times out while updating or destroying (see
shutdown_wait_timeout
), force the power-off of the virtual machine. Default:true
.- guest
Id string The guest ID for the operating system type. For a full list of possible values, see here. Default:
otherGuest64
.- hardware
Version number The hardware version number. Valid range is from 4 to 21. The hardware version cannot be downgraded. See virtual machine hardware versions and compatibility for more information on supported settings.
- host
System stringId The managed object reference ID of a host on which to place the virtual machine. See the section on virtual machine migration for more information on modifying this value. When using a vSphere cluster, if a
host_system_id
is not supplied, vSphere will select a host in the cluster to place the virtual machine, according to any defaults or vSphere DRS placement policies.- hv
Mode string The hardware virtualization (non-nested) setting for the virtual machine. One of
hvAuto
,hvOn
, orhvOff
. Default:hvAuto
.- ide
Controller numberCount The number of IDE controllers that the virtual machine. This directly affects the number 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:
2
.- ignored
Guest string[]Ips 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 so that the waiter will continue to wait for a valid IP address. Default:
[]
.- latency
Sensitivity 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. One of
low
,normal
,medium
, orhigh
.NOTE: On higher sensitivities, you may need to adjust the
memory_reservation
to the full amount of memory provisioned for the virtual machine.- memory number
The memory size to assign to the virtual machine, in MB. Default:
1024
(1 GB).- memory
Hot booleanAdd Enabled Allow memory to be added to the virtual machine while it is powered on.
NOTE: CPU and memory hot add options are not available on all guest operating systems. Please refer to the VMware Guest OS Compatibility Guide to which settings are allow for your guest operating system. In addition, at least one
pulumi up
must be run before you are able to use CPU and memory hot add.NOTE: For Linux 64-bit guest operating systems with less than or equal to 3GB, the virtual machine must powered off to add memory beyond 3GB. Subsequent hot add of memory does not require the virtual machine to be powered-off to apply the plan. Please refer to VMware KB 2008405.
- memory
Limit number The maximum amount of memory (in MB) that th virtual machine can consume, regardless of available resources. The default is no limit.
- memory
Reservation number The amount of memory (in MB) that the virtual machine is guaranteed. The default is no reservation.
- number
The number of memory shares allocated to the virtual machine when the
memory_share_level
iscustom
.- string
The allocation level for the virtual machine memory resources. One of
high
,low
,normal
, orcustom
. Default:custom
.- migrate
Wait numberTimeout The amount of time, in minutes, to wait for a virtual machine migration to complete before failing. Default:
10
minutes. See the section on virtual machine migration for more information.- name string
The name of the virtual machine.
- nested
Hv booleanEnabled Enable nested hardware virtualization on the virtual machine, facilitating nested virtualization in the guest operating system. Default:
false
.- network
Interfaces VirtualMachine Network Interface[] A specification for a virtual NIC on the virtual machine. See network interface options for more information.
- num
Cores numberPer Socket The number of cores per socket in the virtual machine. The number of vCPUs on the virtual machine will be
num_cpus
divided bynum_cores_per_socket
. If specified, the value supplied tonum_cpus
must be evenly divisible by this value. Default:1
.- num
Cpus number The total number of virtual processor cores to assign to the virtual machine. Default:
1
.- ovf
Deploy VirtualMachine Ovf Deploy When specified, the virtual machine will be deployed from the provided OVF/OVA template. See creating a virtual machine from an OVF/OVA template for more information.
- pci
Device string[]Ids List of host PCI device IDs in which to create PCI passthroughs.
NOTE: Cloning requires vCenter Server and is not supported on direct ESXi host connections.
- poweron
Timeout number The amount of time, in seconds, that we will be trying to power on a VM
- replace
Trigger string Triggers replacement of resource whenever it changes.
For example,
replace_trigger = sha256(format("%s-%s",data.template_file.cloud_init_metadata.rendered,data.template_file.cloud_init_userdata.rendered))
will fingerprint the changes in cloud-init metadata and userdata templates. This will enable a replacement of the resource whenever the dependant template renders a new configuration. (Forces a replacement.)- run
Tools booleanScripts After Power On Enable post-power-on scripts to run when VMware Tools is installed. Default:
true
.- run
Tools booleanScripts After Resume Enable ost-resume scripts to run when VMware Tools is installed. Default:
true
.- run
Tools booleanScripts Before Guest Reboot Enable pre-reboot scripts to run when VMware Tools is installed. Default:
false
.- run
Tools booleanScripts Before Guest Shutdown Enable pre-shutdown scripts to run when VMware Tools is installed. Default:
true
.- run
Tools booleanScripts Before Guest Standby Enable pre-standby scripts to run when VMware Tools is installed. Default:
true
.- sata
Controller numberCount 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 stringSharing The type of SCSI bus sharing for the virtual machine SCSI controller. One of
physicalSharing
,virtualSharing
, andnoSharing
. Default:noSharing
.- scsi
Controller numberCount The number of SCSI 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
Type string The SCSI controller type for the virtual machine. One of
lsilogic
(LSI Logic Parallel),lsilogic-sas
(LSI Logic SAS) orpvscsi
(VMware Paravirtual). Default:pvscsi
.- shutdown
Wait numberTimeout 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 totrue
, the virtual machine will be forced to power-off after the timeout, otherwise an error is returned. Default:3
minutes.- storage
Policy stringId The UUID of the storage policy to assign to the virtual disk.
- swap
Placement stringPolicy The swap file placement policy for the virtual machine. One of
inherit
,hostLocal
, orvmDirectory
. Default:inherit
.- sync
Time booleanWith Host Enable the guest operating system to synchronization its clock with the host when the virtual machine is powered on or resumed. Requires vSphere 7.0 Update 1 and later. Requires VMware Tools to be installed. Default:
false
.- sync
Time booleanWith Host Periodically Enable the guest operating system to periodically synchronize its clock with the host. Requires vSphere 7.0 Update 1 and later. On previous versions, setting
sync_time_with_host
is will enable periodic synchronization. Requires VMware Tools to be installed. Default:false
.- string[]
The IDs of any tags to attach to this resource. Please refer to the
vsphere.Tag
resource for more information on applying tags to virtual machine resources.NOTE: Tagging support is unsupported on direct ESXi host connections and requires vCenter Server instance.
- tools
Upgrade stringPolicy Enable automatic upgrade of the VMware Tools version when the virtual machine is rebooted. If necessary, VMware Tools is upgraded to the latest version supported by the host on which the virtual machine is running. Requires VMware Tools to be installed. One of
manual
orupgradeAtPowerCycle
. Default:manual
.- vapp
Virtual
Machine Vapp Used for vApp configurations. The only sub-key available is
properties
, which is a key/value map of properties for virtual machines imported from and OVF/OVA. See Using vApp Properties for OVF/OVA Configuration for more information.- vbs
Enabled boolean Enable Virtualization Based Security. Requires
firmware
to beefi
. In addition,vvtd_enabled
,nested_hv_enabled
, andefi_secure_boot_enabled
must all have a value oftrue
. Supported on vSphere 6.7 and later. Default:false
.- vvtd
Enabled boolean Enable Intel Virtualization Technology for Directed I/O for the virtual machine (I/O MMU in the vSphere Client). Supported on vSphere 6.7 and later. Default:
false
.- wait
For numberGuest Ip Timeout The amount of time, in minutes, to wait for an available guest IP address on the virtual machine. This should only be used if the version VMware Tools does not allow the
wait_for_guest_net_timeout
waiter to be used. A value less than1
disables the waiter. Default:0
.- wait
For booleanGuest Net Routable 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 thewait_for_guest_ip_timeout
waiter is used. Default:true
.- wait
For numberGuest Net Timeout The amount of time, in minutes, to wait for an available guest IP address on the virtual machine. 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 than1
disables the waiter. Default:5
minutes.
- resource_
pool_ strid The managed object reference ID of the resource pool in which to place the virtual machine. See the Virtual Machine Migration section for more information on modifying this value.
NOTE: All clusters and standalone hosts have a default root resource pool. This resource argument does not directly accept the cluster or standalone host resource. For more information, see the section on specifying the Root Resource Pool in the
vsphere.ResourcePool
data source documentation on using the root resource pool.- alternate_
guest_ strname The guest name for the operating system when
guest_id
isotherGuest
orotherGuest64
.- annotation str
A user-provided description of the virtual machine.
- boot_
delay int The number of milliseconds to wait before starting the boot sequence. The default is no delay.
- boot_
retry_ intdelay The number of milliseconds to wait before retrying the boot sequence. This option is only valid if
boot_retry_enabled
istrue
. Default:10000
(10 seconds).- boot_
retry_ boolenabled If set to
true
, a virtual machine that fails to boot will try again after the delay defined inboot_retry_delay
. Default:false
.- cdroms
Sequence[Virtual
Machine Cdrom Args] A specification for a CD-ROM device on the virtual machine. See CD-ROM options for more information.
- clone
Virtual
Machine Clone Args When specified, the virtual machine will be created as a clone of a specified template. Optional customization options can be submitted for the resource. See creating a virtual machine from a template for more information.
- cpu_
hot_ booladd_ enabled Allow CPUs to be added to the virtual machine while it is powered on.
- cpu_
hot_ boolremove_ enabled Allow CPUs to be removed to the virtual machine while it is powered on.
- cpu_
limit int The maximum amount of CPU (in MHz) that the virtual machine can consume, regardless of available resources. The default is no limit.
- cpu_
performance_ boolcounters_ enabled Enable CPU performance counters on the virtual machine. Default:
false
.- cpu_
reservation int The amount of CPU (in MHz) that the virtual machine is guaranteed. The default is no reservation.
- int
The number of CPU shares allocated to the virtual machine when the
cpu_share_level
iscustom
.- str
The allocation level for the virtual machine CPU resources. One of
high
,low
,normal
, orcustom
. Default:custom
.- custom_
attributes Mapping[str, str] Map of custom attribute ids to attribute value strings to set for virtual machine. Please refer to the
vsphere_custom_attributes
resource for more information on setting custom attributes.NOTE: Custom attributes requires vCenter Server and is not supported on direct ESXi host connections.
- datacenter_
id str The datacenter ID. Required only when deploying an OVF/OVA template.
- datastore_
cluster_ strid The managed object reference ID of the datastore cluster in which to place the virtual machine. This setting applies to entire virtual machine and implies that you wish to use vSphere Storage DRS with the virtual machine. See the section on virtual machine migration for more information on modifying this value.
NOTE: One of
datastore_id
ordatastore_cluster_id
must be specified.NOTE: Use of
datastore_cluster_id
requires vSphere Storage DRS to be enabled on the specified datastore cluster.NOTE: The
datastore_cluster_id
setting applies to the entire virtual machine resource. You cannot assign individual individual disks to datastore clusters. In addition, you cannot use theattach
setting to attach external disks on virtual machines that are assigned to datastore clusters.- datastore_
id str The datastore ID that on which the ISO is located. Required for using a datastore ISO. Conflicts with
client_device
.- disks
Sequence[Virtual
Machine Disk Args] A specification for a virtual disk device on the virtual machine. See disk options for more information.
- efi_
secure_ boolboot_ enabled Use this option to enable EFI secure boot when the
firmware
type is set to isefi
. Default:false
.NOTE: EFI secure boot is only available on vSphere 6.5 and later.
- enable_
disk_ booluuid 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_ strmode The EPT/RVI (hardware memory virtualization) setting for the virtual machine. One of
automatic
,on
, oroff
. Default:automatic
.- extra_
config Mapping[str, str] Extra configuration data for the virtual machine. Can be used to supply advanced parameters not normally in configuration, such as instance metadata and userdata.
NOTE: Do not use
extra_config
when working with a template imported from OVF/OVA as your settings may be ignored. Use thevapp
blockproperties
section as described in Using vApp Properties for OVF/OVA Configuration.- extra_
config_ boolreboot_ required Allow the virtual machine to be rebooted when a change to
extra_config
occurs. Default:true
.- firmware str
The firmware for the virtual machine. One of
bios
orefi
.- folder str
The path to the virtual machine folder in which to place the virtual machine, relative to the datacenter path (
/<datacenter-name>/vm
). For example,/dc-01/vm/foo
- force_
power_ booloff If a guest shutdown failed or times 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. Default:
otherGuest64
.- hardware_
version int The hardware version number. Valid range is from 4 to 21. The hardware version cannot be downgraded. See virtual machine hardware versions and compatibility for more information on supported settings.
- host_
system_ strid The managed object reference ID of a host on which to place the virtual machine. See the section on virtual machine migration for more information on modifying this value. When using a vSphere cluster, if a
host_system_id
is not supplied, vSphere will select a host in the cluster to place the virtual machine, according to any defaults or vSphere DRS placement policies.- hv_
mode str The hardware virtualization (non-nested) setting for the virtual machine. One of
hvAuto
,hvOn
, orhvOff
. Default:hvAuto
.- ide_
controller_ intcount The number of IDE controllers that the virtual machine. This directly affects the number 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:
2
.- ignored_
guest_ Sequence[str]ips 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 so that the waiter will continue to wait for a valid 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. One of
low
,normal
,medium
, orhigh
.NOTE: On higher sensitivities, you may need to adjust the
memory_reservation
to the full amount of memory provisioned for the virtual machine.- memory int
The memory size to assign to the virtual machine, in MB. Default:
1024
(1 GB).- memory_
hot_ booladd_ enabled Allow memory to be added to the virtual machine while it is powered on.
NOTE: CPU and memory hot add options are not available on all guest operating systems. Please refer to the VMware Guest OS Compatibility Guide to which settings are allow for your guest operating system. In addition, at least one
pulumi up
must be run before you are able to use CPU and memory hot add.NOTE: For Linux 64-bit guest operating systems with less than or equal to 3GB, the virtual machine must powered off to add memory beyond 3GB. Subsequent hot add of memory does not require the virtual machine to be powered-off to apply the plan. Please refer to VMware KB 2008405.
- memory_
limit int The maximum amount of memory (in MB) that th virtual machine can consume, regardless of available resources. The default is no limit.
- memory_
reservation int The amount of memory (in MB) that the virtual machine is guaranteed. The default is no reservation.
- int
The number of memory shares allocated to the virtual machine when the
memory_share_level
iscustom
.- str
The allocation level for the virtual machine memory resources. One of
high
,low
,normal
, orcustom
. Default:custom
.- migrate_
wait_ inttimeout The amount of time, in minutes, to wait for a virtual machine migration to complete before failing. Default:
10
minutes. See the section on virtual machine migration for more information.- name str
The name of the virtual machine.
- nested_
hv_ boolenabled Enable nested hardware virtualization on the virtual machine, facilitating nested virtualization in the guest operating system. Default:
false
.- network_
interfaces Sequence[VirtualMachine Network Interface Args] A specification for a virtual NIC on the virtual machine. See network interface options for more information.
- num_
cores_ intper_ socket The number of cores per socket in the virtual machine. The number of vCPUs on the virtual machine will be
num_cpus
divided bynum_cores_per_socket
. If specified, the value supplied tonum_cpus
must be evenly divisible by this value. Default:1
.- num_
cpus int The total number of virtual processor cores to assign to the virtual machine. Default:
1
.- ovf_
deploy VirtualMachine Ovf Deploy Args When specified, the virtual machine will be deployed from the provided OVF/OVA template. See creating a virtual machine from an OVF/OVA template for more information.
- pci_
device_ Sequence[str]ids List of host PCI device IDs in which to create PCI passthroughs.
NOTE: Cloning requires vCenter Server and is not supported on direct ESXi host connections.
- poweron_
timeout int The amount of time, in seconds, that we will be trying to power on a VM
- replace_
trigger str Triggers replacement of resource whenever it changes.
For example,
replace_trigger = sha256(format("%s-%s",data.template_file.cloud_init_metadata.rendered,data.template_file.cloud_init_userdata.rendered))
will fingerprint the changes in cloud-init metadata and userdata templates. This will enable a replacement of the resource whenever the dependant template renders a new configuration. (Forces a replacement.)- run_
tools_ boolscripts_ after_ power_ on Enable post-power-on scripts to run when VMware Tools is installed. Default:
true
.- run_
tools_ boolscripts_ after_ resume Enable ost-resume scripts to run when VMware Tools is installed. Default:
true
.- run_
tools_ boolscripts_ before_ guest_ reboot Enable pre-reboot scripts to run when VMware Tools is installed. Default:
false
.- run_
tools_ boolscripts_ before_ guest_ shutdown Enable pre-shutdown scripts to run when VMware Tools is installed. Default:
true
.- run_
tools_ boolscripts_ before_ guest_ standby Enable pre-standby scripts to run when VMware Tools is installed. Default:
true
.- sata_
controller_ intcount 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_ strsharing The type of SCSI bus sharing for the virtual machine SCSI controller. One of
physicalSharing
,virtualSharing
, andnoSharing
. Default:noSharing
.- scsi_
controller_ intcount The number of SCSI 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_
type str The SCSI controller type for the virtual machine. One of
lsilogic
(LSI Logic Parallel),lsilogic-sas
(LSI Logic SAS) orpvscsi
(VMware Paravirtual). Default:pvscsi
.- shutdown_
wait_ inttimeout 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 totrue
, the virtual machine will be forced to power-off after the timeout, otherwise an error is returned. Default:3
minutes.- storage_
policy_ strid The UUID of the storage policy to assign to the virtual disk.
- swap_
placement_ strpolicy The swap file placement policy for the virtual machine. One of
inherit
,hostLocal
, orvmDirectory
. Default:inherit
.- sync_
time_ boolwith_ host Enable the guest operating system to synchronization its clock with the host when the virtual machine is powered on or resumed. Requires vSphere 7.0 Update 1 and later. Requires VMware Tools to be installed. Default:
false
.- sync_
time_ boolwith_ host_ periodically Enable the guest operating system to periodically synchronize its clock with the host. Requires vSphere 7.0 Update 1 and later. On previous versions, setting
sync_time_with_host
is will enable periodic synchronization. Requires VMware Tools to be installed. Default:false
.- Sequence[str]
The IDs of any tags to attach to this resource. Please refer to the
vsphere.Tag
resource for more information on applying tags to virtual machine resources.NOTE: Tagging support is unsupported on direct ESXi host connections and requires vCenter Server instance.
- tools_
upgrade_ strpolicy Enable automatic upgrade of the VMware Tools version when the virtual machine is rebooted. If necessary, VMware Tools is upgraded to the latest version supported by the host on which the virtual machine is running. Requires VMware Tools to be installed. One of
manual
orupgradeAtPowerCycle
. Default:manual
.- vapp
Virtual
Machine Vapp Args Used for vApp configurations. The only sub-key available is
properties
, which is a key/value map of properties for virtual machines imported from and OVF/OVA. See Using vApp Properties for OVF/OVA Configuration for more information.- vbs_
enabled bool Enable Virtualization Based Security. Requires
firmware
to beefi
. In addition,vvtd_enabled
,nested_hv_enabled
, andefi_secure_boot_enabled
must all have a value oftrue
. Supported on vSphere 6.7 and later. Default:false
.- vvtd_
enabled bool Enable Intel Virtualization Technology for Directed I/O for the virtual machine (I/O MMU in the vSphere Client). Supported on vSphere 6.7 and later. Default:
false
.- wait_
for_ intguest_ ip_ timeout The amount of time, in minutes, to wait for an available guest IP address on the virtual machine. This should only be used if the version VMware Tools does not allow the
wait_for_guest_net_timeout
waiter to be used. A value less than1
disables the waiter. Default:0
.- wait_
for_ boolguest_ net_ routable 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 thewait_for_guest_ip_timeout
waiter is used. Default:true
.- wait_
for_ intguest_ net_ timeout The amount of time, in minutes, to wait for an available guest IP address on the virtual machine. 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 than1
disables the waiter. Default:5
minutes.
- resource
Pool StringId The managed object reference ID of the resource pool in which to place the virtual machine. See the Virtual Machine Migration section for more information on modifying this value.
NOTE: All clusters and standalone hosts have a default root resource pool. This resource argument does not directly accept the cluster or standalone host resource. For more information, see the section on specifying the Root Resource Pool in the
vsphere.ResourcePool
data source documentation on using the root resource pool.- alternate
Guest StringName The guest name for the operating system when
guest_id
isotherGuest
orotherGuest64
.- annotation String
A user-provided description of the virtual machine.
- boot
Delay Number The number of milliseconds to wait before starting the boot sequence. The default is no delay.
- boot
Retry NumberDelay The number of milliseconds to wait before retrying the boot sequence. This option is only valid if
boot_retry_enabled
istrue
. Default:10000
(10 seconds).- boot
Retry BooleanEnabled If set to
true
, a virtual machine that fails to boot will try again after the delay defined inboot_retry_delay
. Default:false
.- cdroms List<Property Map>
A specification for a CD-ROM device on the virtual machine. See CD-ROM options for more information.
- clone Property Map
When specified, the virtual machine will be created as a clone of a specified template. Optional customization options can be submitted for the resource. See creating a virtual machine from a template for more information.
- cpu
Hot BooleanAdd Enabled Allow CPUs to be added to the virtual machine while it is powered on.
- cpu
Hot BooleanRemove Enabled Allow CPUs to be removed to the virtual machine while it is powered on.
- cpu
Limit Number The maximum amount of CPU (in MHz) that the virtual machine can consume, regardless of available resources. The default is no limit.
- cpu
Performance BooleanCounters Enabled Enable CPU performance counters on the virtual machine. Default:
false
.- cpu
Reservation Number The amount of CPU (in MHz) that the virtual machine is guaranteed. The default is no reservation.
- Number
The number of CPU shares allocated to the virtual machine when the
cpu_share_level
iscustom
.- String
The allocation level for the virtual machine CPU resources. One of
high
,low
,normal
, orcustom
. Default:custom
.- custom
Attributes Map<String> Map of custom attribute ids to attribute value strings to set for virtual machine. Please refer to the
vsphere_custom_attributes
resource for more information on setting custom attributes.NOTE: Custom attributes requires vCenter Server and is not supported on direct ESXi host connections.
- datacenter
Id String The datacenter ID. Required only when deploying an OVF/OVA template.
- datastore
Cluster StringId The managed object reference ID of the datastore cluster in which to place the virtual machine. This setting applies to entire virtual machine and implies that you wish to use vSphere Storage DRS with the virtual machine. See the section on virtual machine migration for more information on modifying this value.
NOTE: One of
datastore_id
ordatastore_cluster_id
must be specified.NOTE: Use of
datastore_cluster_id
requires vSphere Storage DRS to be enabled on the specified datastore cluster.NOTE: The
datastore_cluster_id
setting applies to the entire virtual machine resource. You cannot assign individual individual disks to datastore clusters. In addition, you cannot use theattach
setting to attach external disks on virtual machines that are assigned to datastore clusters.- datastore
Id String The datastore ID that on which the ISO is located. Required for using a datastore ISO. Conflicts with
client_device
.- disks List<Property Map>
A specification for a virtual disk device on the virtual machine. See disk options for more information.
- efi
Secure BooleanBoot Enabled Use this option to enable EFI secure boot when the
firmware
type is set to isefi
. Default:false
.NOTE: EFI secure boot is only available on vSphere 6.5 and later.
- enable
Disk BooleanUuid Expose the UUIDs of attached virtual disks to the virtual machine, allowing access to them in the guest. Default:
false
.- enable
Logging Boolean Enable logging of virtual machine events to a log file stored in the virtual machine directory. Default:
false
.- ept
Rvi StringMode The EPT/RVI (hardware memory virtualization) setting for the virtual machine. One of
automatic
,on
, oroff
. Default:automatic
.- extra
Config Map<String> Extra configuration data for the virtual machine. Can be used to supply advanced parameters not normally in configuration, such as instance metadata and userdata.
NOTE: Do not use
extra_config
when working with a template imported from OVF/OVA as your settings may be ignored. Use thevapp
blockproperties
section as described in Using vApp Properties for OVF/OVA Configuration.- extra
Config BooleanReboot Required Allow the virtual machine to be rebooted when a change to
extra_config
occurs. Default:true
.- firmware String
The firmware for the virtual machine. One of
bios
orefi
.- folder String
The path to the virtual machine folder in which to place the virtual machine, relative to the datacenter path (
/<datacenter-name>/vm
). For example,/dc-01/vm/foo
- force
Power BooleanOff If a guest shutdown failed or times out while updating or destroying (see
shutdown_wait_timeout
), force the power-off of the virtual machine. Default:true
.- guest
Id String The guest ID for the operating system type. For a full list of possible values, see here. Default:
otherGuest64
.- hardware
Version Number The hardware version number. Valid range is from 4 to 21. The hardware version cannot be downgraded. See virtual machine hardware versions and compatibility for more information on supported settings.
- host
System StringId The managed object reference ID of a host on which to place the virtual machine. See the section on virtual machine migration for more information on modifying this value. When using a vSphere cluster, if a
host_system_id
is not supplied, vSphere will select a host in the cluster to place the virtual machine, according to any defaults or vSphere DRS placement policies.- hv
Mode String The hardware virtualization (non-nested) setting for the virtual machine. One of
hvAuto
,hvOn
, orhvOff
. Default:hvAuto
.- ide
Controller NumberCount The number of IDE controllers that the virtual machine. This directly affects the number 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:
2
.- ignored
Guest List<String>Ips 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 so that the waiter will continue to wait for a valid IP address. Default:
[]
.- latency
Sensitivity 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. One of
low
,normal
,medium
, orhigh
.NOTE: On higher sensitivities, you may need to adjust the
memory_reservation
to the full amount of memory provisioned for the virtual machine.- memory Number
The memory size to assign to the virtual machine, in MB. Default:
1024
(1 GB).- memory
Hot BooleanAdd Enabled Allow memory to be added to the virtual machine while it is powered on.
NOTE: CPU and memory hot add options are not available on all guest operating systems. Please refer to the VMware Guest OS Compatibility Guide to which settings are allow for your guest operating system. In addition, at least one
pulumi up
must be run before you are able to use CPU and memory hot add.NOTE: For Linux 64-bit guest operating systems with less than or equal to 3GB, the virtual machine must powered off to add memory beyond 3GB. Subsequent hot add of memory does not require the virtual machine to be powered-off to apply the plan. Please refer to VMware KB 2008405.
- memory
Limit Number The maximum amount of memory (in MB) that th virtual machine can consume, regardless of available resources. The default is no limit.
- memory
Reservation Number The amount of memory (in MB) that the virtual machine is guaranteed. The default is no reservation.
- Number
The number of memory shares allocated to the virtual machine when the
memory_share_level
iscustom
.- String
The allocation level for the virtual machine memory resources. One of
high
,low
,normal
, orcustom
. Default:custom
.- migrate
Wait NumberTimeout The amount of time, in minutes, to wait for a virtual machine migration to complete before failing. Default:
10
minutes. See the section on virtual machine migration for more information.- name String
The name of the virtual machine.
- nested
Hv BooleanEnabled Enable nested hardware virtualization on the virtual machine, facilitating nested virtualization in the guest operating system. Default:
false
.- network
Interfaces List<Property Map> A specification for a virtual NIC on the virtual machine. See network interface options for more information.
- num
Cores NumberPer Socket The number of cores per socket in the virtual machine. The number of vCPUs on the virtual machine will be
num_cpus
divided bynum_cores_per_socket
. If specified, the value supplied tonum_cpus
must be evenly divisible by this value. Default:1
.- num
Cpus Number The total number of virtual processor cores to assign to the virtual machine. Default:
1
.- ovf
Deploy Property Map When specified, the virtual machine will be deployed from the provided OVF/OVA template. See creating a virtual machine from an OVF/OVA template for more information.
- pci
Device List<String>Ids List of host PCI device IDs in which to create PCI passthroughs.
NOTE: Cloning requires vCenter Server and is not supported on direct ESXi host connections.
- poweron
Timeout Number The amount of time, in seconds, that we will be trying to power on a VM
- replace
Trigger String Triggers replacement of resource whenever it changes.
For example,
replace_trigger = sha256(format("%s-%s",data.template_file.cloud_init_metadata.rendered,data.template_file.cloud_init_userdata.rendered))
will fingerprint the changes in cloud-init metadata and userdata templates. This will enable a replacement of the resource whenever the dependant template renders a new configuration. (Forces a replacement.)- run
Tools BooleanScripts After Power On Enable post-power-on scripts to run when VMware Tools is installed. Default:
true
.- run
Tools BooleanScripts After Resume Enable ost-resume scripts to run when VMware Tools is installed. Default:
true
.- run
Tools BooleanScripts Before Guest Reboot Enable pre-reboot scripts to run when VMware Tools is installed. Default:
false
.- run
Tools BooleanScripts Before Guest Shutdown Enable pre-shutdown scripts to run when VMware Tools is installed. Default:
true
.- run
Tools BooleanScripts Before Guest Standby Enable pre-standby scripts to run when VMware Tools is installed. Default:
true
.- sata
Controller NumberCount 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 StringSharing The type of SCSI bus sharing for the virtual machine SCSI controller. One of
physicalSharing
,virtualSharing
, andnoSharing
. Default:noSharing
.- scsi
Controller NumberCount The number of SCSI 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
Type String The SCSI controller type for the virtual machine. One of
lsilogic
(LSI Logic Parallel),lsilogic-sas
(LSI Logic SAS) orpvscsi
(VMware Paravirtual). Default:pvscsi
.- shutdown
Wait NumberTimeout 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 totrue
, the virtual machine will be forced to power-off after the timeout, otherwise an error is returned. Default:3
minutes.- storage
Policy StringId The UUID of the storage policy to assign to the virtual disk.
- swap
Placement StringPolicy The swap file placement policy for the virtual machine. One of
inherit
,hostLocal
, orvmDirectory
. Default:inherit
.- sync
Time BooleanWith Host Enable the guest operating system to synchronization its clock with the host when the virtual machine is powered on or resumed. Requires vSphere 7.0 Update 1 and later. Requires VMware Tools to be installed. Default:
false
.- sync
Time BooleanWith Host Periodically Enable the guest operating system to periodically synchronize its clock with the host. Requires vSphere 7.0 Update 1 and later. On previous versions, setting
sync_time_with_host
is will enable periodic synchronization. Requires VMware Tools to be installed. Default:false
.- List<String>
The IDs of any tags to attach to this resource. Please refer to the
vsphere.Tag
resource for more information on applying tags to virtual machine resources.NOTE: Tagging support is unsupported on direct ESXi host connections and requires vCenter Server instance.
- tools
Upgrade StringPolicy Enable automatic upgrade of the VMware Tools version when the virtual machine is rebooted. If necessary, VMware Tools is upgraded to the latest version supported by the host on which the virtual machine is running. Requires VMware Tools to be installed. One of
manual
orupgradeAtPowerCycle
. Default:manual
.- vapp Property Map
Used for vApp configurations. The only sub-key available is
properties
, which is a key/value map of properties for virtual machines imported from and OVF/OVA. See Using vApp Properties for OVF/OVA Configuration for more information.- vbs
Enabled Boolean Enable Virtualization Based Security. Requires
firmware
to beefi
. In addition,vvtd_enabled
,nested_hv_enabled
, andefi_secure_boot_enabled
must all have a value oftrue
. Supported on vSphere 6.7 and later. Default:false
.- vvtd
Enabled Boolean Enable Intel Virtualization Technology for Directed I/O for the virtual machine (I/O MMU in the vSphere Client). Supported on vSphere 6.7 and later. Default:
false
.- wait
For NumberGuest Ip Timeout The amount of time, in minutes, to wait for an available guest IP address on the virtual machine. This should only be used if the version VMware Tools does not allow the
wait_for_guest_net_timeout
waiter to be used. A value less than1
disables the waiter. Default:0
.- wait
For BooleanGuest Net Routable 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 thewait_for_guest_ip_timeout
waiter is used. Default:true
.- wait
For NumberGuest Net Timeout The amount of time, in minutes, to wait for an available guest IP address on the virtual machine. 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 than1
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:
- Change
Version string A unique identifier for a given version of the last configuration was applied.
- Default
Ip stringAddress The IP address selected by the provider to be used with any provisioners configured on this resource. When 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 exists. If VMware Tools is not running on the virtual machine, or if the virtual machine is powered off, this value will be blank.
- Guest
Ip List<string>Addresses 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 virtul machine is powered off, this list will be empty.- Id string
The provider-assigned unique ID for this managed resource.
- Imported bool
Indicates if the virtual machine resource has been imported, or if 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 managed object reference ID of the created virtual machine.
- Power
State string A computed value for the current power state of the virtual machine. One of
on
,off
, orsuspended
.- Reboot
Required bool Value internal to Terraform used to determine if a configuration set change requires a reboot.
- Uuid string
The UUID of the virtual disk VMDK file. This is used to track the virtual disk on the virtual machine.
- Vapp
Transports 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.
- Vmware
Tools stringStatus The state of VMware Tools in the guest. This will determine the proper course of action for some device operations.
- Vmx
Path string The path of the virtual machine configuration file on the datastore in which the virtual machine is placed.
- Change
Version string A unique identifier for a given version of the last configuration was applied.
- Default
Ip stringAddress The IP address selected by the provider to be used with any provisioners configured on this resource. When 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 exists. If VMware Tools is not running on the virtual machine, or if the virtual machine is powered off, this value will be blank.
- Guest
Ip []stringAddresses 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 virtul machine is powered off, this list will be empty.- Id string
The provider-assigned unique ID for this managed resource.
- Imported bool
Indicates if the virtual machine resource has been imported, or if 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 managed object reference ID of the created virtual machine.
- Power
State string A computed value for the current power state of the virtual machine. One of
on
,off
, orsuspended
.- Reboot
Required bool Value internal to Terraform used to determine if a configuration set change requires a reboot.
- Uuid string
The UUID of the virtual disk VMDK file. This is used to track the virtual disk on the virtual machine.
- Vapp
Transports []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.
- Vmware
Tools stringStatus The state of VMware Tools in the guest. This will determine the proper course of action for some device operations.
- Vmx
Path string The path of the virtual machine configuration file on the datastore in which the virtual machine is placed.
- change
Version String A unique identifier for a given version of the last configuration was applied.
- default
Ip StringAddress The IP address selected by the provider to be used with any provisioners configured on this resource. When 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 exists. If VMware Tools is not running on the virtual machine, or if the virtual machine is powered off, this value will be blank.
- guest
Ip List<String>Addresses 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 virtul machine is powered off, this list will be empty.- id String
The provider-assigned unique ID for this managed resource.
- imported Boolean
Indicates if the virtual machine resource has been imported, or if 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 managed object reference ID of the created virtual machine.
- power
State String A computed value for the current power state of the virtual machine. One of
on
,off
, orsuspended
.- reboot
Required Boolean Value internal to Terraform used to determine if a configuration set change requires a reboot.
- uuid String
The UUID of the virtual disk VMDK file. This is used to track the virtual disk on the virtual machine.
- vapp
Transports 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.
- vmware
Tools StringStatus The state of VMware Tools in the guest. This will determine the proper course of action for some device operations.
- vmx
Path String The path of the virtual machine configuration file on the datastore in which the virtual machine is placed.
- change
Version string A unique identifier for a given version of the last configuration was applied.
- default
Ip stringAddress The IP address selected by the provider to be used with any provisioners configured on this resource. When 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 exists. If VMware Tools is not running on the virtual machine, or if the virtual machine is powered off, this value will be blank.
- guest
Ip string[]Addresses 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 virtul machine is powered off, this list will be empty.- id string
The provider-assigned unique ID for this managed resource.
- imported boolean
Indicates if the virtual machine resource has been imported, or if 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 managed object reference ID of the created virtual machine.
- power
State string A computed value for the current power state of the virtual machine. One of
on
,off
, orsuspended
.- reboot
Required boolean Value internal to Terraform used to determine if a configuration set change requires a reboot.
- uuid string
The UUID of the virtual disk VMDK file. This is used to track the virtual disk on the virtual machine.
- vapp
Transports 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.
- vmware
Tools stringStatus The state of VMware Tools in the guest. This will determine the proper course of action for some device operations.
- vmx
Path string The path of the virtual machine configuration file on the datastore in which the virtual machine is placed.
- change_
version str A unique identifier for a given version of the last configuration was applied.
- default_
ip_ straddress The IP address selected by the provider to be used with any provisioners configured on this resource. When 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 exists. If VMware Tools is not running on the virtual machine, or if the virtual machine is powered off, this value will be blank.
- guest_
ip_ Sequence[str]addresses 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 virtul machine is powered off, this list will be empty.- id str
The provider-assigned unique ID for this managed resource.
- imported bool
Indicates if the virtual machine resource has been imported, or if 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 managed object reference ID of the created virtual machine.
- power_
state str A computed value for the current power state of the virtual machine. One of
on
,off
, orsuspended
.- reboot_
required bool Value internal to Terraform used to determine if a configuration set change requires a reboot.
- uuid str
The UUID of the virtual disk 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_ strstatus 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 configuration file on the datastore in which the virtual machine is placed.
- change
Version String A unique identifier for a given version of the last configuration was applied.
- default
Ip StringAddress The IP address selected by the provider to be used with any provisioners configured on this resource. When 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 exists. If VMware Tools is not running on the virtual machine, or if the virtual machine is powered off, this value will be blank.
- guest
Ip List<String>Addresses 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 virtul machine is powered off, this list will be empty.- id String
The provider-assigned unique ID for this managed resource.
- imported Boolean
Indicates if the virtual machine resource has been imported, or if 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 managed object reference ID of the created virtual machine.
- power
State String A computed value for the current power state of the virtual machine. One of
on
,off
, orsuspended
.- reboot
Required Boolean Value internal to Terraform used to determine if a configuration set change requires a reboot.
- uuid String
The UUID of the virtual disk VMDK file. This is used to track the virtual disk on the virtual machine.
- vapp
Transports 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.
- vmware
Tools StringStatus The state of VMware Tools in the guest. This will determine the proper course of action for some device operations.
- vmx
Path String The path of the virtual machine configuration file on the datastore in which the virtual machine is placed.
Look up 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,
cdroms: Optional[Sequence[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,
extra_config_reboot_required: Optional[bool] = 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,
power_state: Optional[str] = None,
poweron_timeout: Optional[int] = None,
reboot_required: Optional[bool] = None,
replace_trigger: Optional[str] = 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,
sync_time_with_host_periodically: Optional[bool] = None,
tags: Optional[Sequence[str]] = None,
tools_upgrade_policy: Optional[str] = None,
uuid: Optional[str] = None,
vapp: Optional[VirtualMachineVappArgs] = None,
vapp_transports: Optional[Sequence[str]] = None,
vbs_enabled: Optional[bool] = None,
vmware_tools_status: Optional[str] = None,
vmx_path: Optional[str] = None,
vvtd_enabled: Optional[bool] = 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)
public static VirtualMachine get(String name, Output<String> id, VirtualMachineState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- 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.
- 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.
- Alternate
Guest stringName The guest name for the operating system when
guest_id
isotherGuest
orotherGuest64
.- Annotation string
A user-provided description of the virtual machine.
- Boot
Delay int The number of milliseconds to wait before starting the boot sequence. The default is no delay.
- Boot
Retry intDelay The number of milliseconds to wait before retrying the boot sequence. This option is only valid if
boot_retry_enabled
istrue
. Default:10000
(10 seconds).- Boot
Retry boolEnabled If set to
true
, a virtual machine that fails to boot will try again after the delay defined inboot_retry_delay
. Default:false
.- Cdroms
List<Pulumi.
VSphere. Inputs. Virtual Machine Cdrom> A specification for a CD-ROM device on the virtual machine. See CD-ROM options for more information.
- Change
Version string A unique identifier for a given version of the last configuration was applied.
- Clone
Pulumi.
VSphere. Inputs. Virtual Machine Clone When specified, the virtual machine will be created as a clone of a specified template. Optional customization options can be submitted for the resource. See creating a virtual machine from a template for more information.
- Cpu
Hot boolAdd Enabled Allow CPUs to be added to the virtual machine while it is powered on.
- Cpu
Hot boolRemove Enabled Allow CPUs to be removed to the virtual machine while it is powered on.
- Cpu
Limit int The maximum amount of CPU (in MHz) that the virtual machine can consume, regardless of available resources. The default is no limit.
- Cpu
Performance boolCounters Enabled Enable CPU performance counters on the virtual machine. Default:
false
.- Cpu
Reservation int The amount of CPU (in MHz) that the virtual machine is guaranteed. The default is no reservation.
- int
The number of CPU shares allocated to the virtual machine when the
cpu_share_level
iscustom
.- string
The allocation level for the virtual machine CPU resources. One of
high
,low
,normal
, orcustom
. Default:custom
.- Custom
Attributes Dictionary<string, string> Map of custom attribute ids to attribute value strings to set for virtual machine. Please refer to the
vsphere_custom_attributes
resource for more information on setting custom attributes.NOTE: Custom attributes requires vCenter Server and is not supported on direct ESXi host connections.
- Datacenter
Id string The datacenter ID. Required only when deploying an OVF/OVA template.
- Datastore
Cluster stringId The managed object reference ID of the datastore cluster in which to place the virtual machine. This setting applies to entire virtual machine and implies that you wish to use vSphere Storage DRS with the virtual machine. See the section on virtual machine migration for more information on modifying this value.
NOTE: One of
datastore_id
ordatastore_cluster_id
must be specified.NOTE: Use of
datastore_cluster_id
requires vSphere Storage DRS to be enabled on the specified datastore cluster.NOTE: The
datastore_cluster_id
setting applies to the entire virtual machine resource. You cannot assign individual individual disks to datastore clusters. In addition, you cannot use theattach
setting to attach external disks on virtual machines that are assigned to datastore clusters.- Datastore
Id string The datastore ID that on which the ISO is located. Required for using a datastore ISO. Conflicts with
client_device
.- Default
Ip stringAddress The IP address selected by the provider to be used with any provisioners configured on this resource. When 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 exists. If VMware Tools is not running on the virtual machine, or if the virtual machine is powered off, this value will be blank.
- Disks
List<Pulumi.
VSphere. Inputs. Virtual Machine Disk> A specification for a virtual disk device on the virtual machine. See disk options for more information.
- Efi
Secure boolBoot Enabled Use this option to enable EFI secure boot when the
firmware
type is set to isefi
. Default:false
.NOTE: EFI secure boot is only available on vSphere 6.5 and later.
- Enable
Disk boolUuid 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 stringMode The EPT/RVI (hardware memory virtualization) setting for the virtual machine. One of
automatic
,on
, oroff
. Default:automatic
.- Extra
Config Dictionary<string, string> Extra configuration data for the virtual machine. Can be used to supply advanced parameters not normally in configuration, such as instance metadata and userdata.
NOTE: Do not use
extra_config
when working with a template imported from OVF/OVA as your settings may be ignored. Use thevapp
blockproperties
section as described in Using vApp Properties for OVF/OVA Configuration.- Extra
Config boolReboot Required Allow the virtual machine to be rebooted when a change to
extra_config
occurs. Default:true
.- Firmware string
The firmware for the virtual machine. One of
bios
orefi
.- Folder string
The path to the virtual machine folder in which to place the virtual machine, relative to the datacenter path (
/<datacenter-name>/vm
). For example,/dc-01/vm/foo
- Force
Power boolOff If a guest shutdown failed or times out while updating or destroying (see
shutdown_wait_timeout
), force the power-off of the virtual machine. Default:true
.- Guest
Id string The guest ID for the operating system type. For a full list of possible values, see here. Default:
otherGuest64
.- Guest
Ip List<string>Addresses 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 virtul machine is powered off, this list will be empty.- Hardware
Version int The hardware version number. Valid range is from 4 to 21. The hardware version cannot be downgraded. See virtual machine hardware versions and compatibility for more information on supported settings.
- Host
System stringId The managed object reference ID of a host on which to place the virtual machine. See the section on virtual machine migration for more information on modifying this value. When using a vSphere cluster, if a
host_system_id
is not supplied, vSphere will select a host in the cluster to place the virtual machine, according to any defaults or vSphere DRS placement policies.- Hv
Mode string The hardware virtualization (non-nested) setting for the virtual machine. One of
hvAuto
,hvOn
, orhvOff
. Default:hvAuto
.- Ide
Controller intCount The number of IDE controllers that the virtual machine. This directly affects the number 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:
2
.- Ignored
Guest List<string>Ips 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 so that the waiter will continue to wait for a valid IP address. Default:
[]
.- Imported bool
Indicates if the virtual machine resource has been imported, or if 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 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. One of
low
,normal
,medium
, orhigh
.NOTE: On higher sensitivities, you may need to adjust the
memory_reservation
to the full amount of memory provisioned for the virtual machine.- Memory int
The memory size to assign to the virtual machine, in MB. Default:
1024
(1 GB).- Memory
Hot boolAdd Enabled Allow memory to be added to the virtual machine while it is powered on.
NOTE: CPU and memory hot add options are not available on all guest operating systems. Please refer to the VMware Guest OS Compatibility Guide to which settings are allow for your guest operating system. In addition, at least one
pulumi up
must be run before you are able to use CPU and memory hot add.NOTE: For Linux 64-bit guest operating systems with less than or equal to 3GB, the virtual machine must powered off to add memory beyond 3GB. Subsequent hot add of memory does not require the virtual machine to be powered-off to apply the plan. Please refer to VMware KB 2008405.
- Memory
Limit int The maximum amount of memory (in MB) that th virtual machine can consume, regardless of available resources. The default is no limit.
- Memory
Reservation int The amount of memory (in MB) that the virtual machine is guaranteed. The default is no reservation.
- int
The number of memory shares allocated to the virtual machine when the
memory_share_level
iscustom
.- string
The allocation level for the virtual machine memory resources. One of
high
,low
,normal
, orcustom
. Default:custom
.- Migrate
Wait intTimeout The amount of time, in minutes, to wait for a virtual machine migration to complete before failing. Default:
10
minutes. See the section on virtual machine migration for more information.- Moid string
The managed object reference ID of the created virtual machine.
- Name string
The name of the virtual machine.
- Nested
Hv boolEnabled Enable nested hardware virtualization on the virtual machine, facilitating nested virtualization in the guest operating system. Default:
false
.- Network
Interfaces List<Pulumi.VSphere. Inputs. Virtual Machine Network Interface> A specification for a virtual NIC on the virtual machine. See network interface options for more information.
- Num
Cores intPer Socket The number of cores per socket in the virtual machine. The number of vCPUs on the virtual machine will be
num_cpus
divided bynum_cores_per_socket
. If specified, the value supplied tonum_cpus
must be evenly divisible by this value. Default:1
.- Num
Cpus int The total number of virtual processor cores to assign to the virtual machine. Default:
1
.- Ovf
Deploy Pulumi.VSphere. Inputs. Virtual Machine Ovf Deploy When specified, the virtual machine will be deployed from the provided OVF/OVA template. See creating a virtual machine from an OVF/OVA template for more information.
- Pci
Device List<string>Ids List of host PCI device IDs in which to create PCI passthroughs.
NOTE: Cloning requires vCenter Server and is not supported on direct ESXi host connections.
- Power
State string A computed value for the current power state of the virtual machine. One of
on
,off
, orsuspended
.- 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 Terraform used to determine if a configuration set change requires a reboot.
- Replace
Trigger string Triggers replacement of resource whenever it changes.
For example,
replace_trigger = sha256(format("%s-%s",data.template_file.cloud_init_metadata.rendered,data.template_file.cloud_init_userdata.rendered))
will fingerprint the changes in cloud-init metadata and userdata templates. This will enable a replacement of the resource whenever the dependant template renders a new configuration. (Forces a replacement.)- Resource
Pool stringId The managed object reference ID of the resource pool in which to place the virtual machine. See the Virtual Machine Migration section for more information on modifying this value.
NOTE: All clusters and standalone hosts have a default root resource pool. This resource argument does not directly accept the cluster or standalone host resource. For more information, see the section on specifying the Root Resource Pool in the
vsphere.ResourcePool
data source documentation on using the root resource pool.- Run
Tools boolScripts After Power On Enable post-power-on scripts to run when VMware Tools is installed. Default:
true
.- Run
Tools boolScripts After Resume Enable ost-resume scripts to run when VMware Tools is installed. Default:
true
.- Run
Tools boolScripts Before Guest Reboot Enable pre-reboot scripts to run when VMware Tools is installed. Default:
false
.- Run
Tools boolScripts Before Guest Shutdown Enable pre-shutdown scripts to run when VMware Tools is installed. Default:
true
.- Run
Tools boolScripts Before Guest Standby Enable pre-standby scripts to run when VMware Tools is installed. Default:
true
.- Sata
Controller intCount 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 stringSharing The type of SCSI bus sharing for the virtual machine SCSI controller. One of
physicalSharing
,virtualSharing
, andnoSharing
. Default:noSharing
.- Scsi
Controller intCount The number of SCSI 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
Type string The SCSI controller type for the virtual machine. One of
lsilogic
(LSI Logic Parallel),lsilogic-sas
(LSI Logic SAS) orpvscsi
(VMware Paravirtual). Default:pvscsi
.- Shutdown
Wait intTimeout 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 totrue
, the virtual machine will be forced to power-off after the timeout, otherwise an error is returned. Default:3
minutes.- Storage
Policy stringId The UUID of the storage policy to assign to the virtual disk.
- Swap
Placement stringPolicy The swap file placement policy for the virtual machine. One of
inherit
,hostLocal
, orvmDirectory
. Default:inherit
.- Sync
Time boolWith Host Enable the guest operating system to synchronization its clock with the host when the virtual machine is powered on or resumed. Requires vSphere 7.0 Update 1 and later. Requires VMware Tools to be installed. Default:
false
.- Sync
Time boolWith Host Periodically Enable the guest operating system to periodically synchronize its clock with the host. Requires vSphere 7.0 Update 1 and later. On previous versions, setting
sync_time_with_host
is will enable periodic synchronization. Requires VMware Tools to be installed. Default:false
.- List<string>
The IDs of any tags to attach to this resource. Please refer to the
vsphere.Tag
resource for more information on applying tags to virtual machine resources.NOTE: Tagging support is unsupported on direct ESXi host connections and requires vCenter Server instance.
- Tools
Upgrade stringPolicy Enable automatic upgrade of the VMware Tools version when the virtual machine is rebooted. If necessary, VMware Tools is upgraded to the latest version supported by the host on which the virtual machine is running. Requires VMware Tools to be installed. One of
manual
orupgradeAtPowerCycle
. Default:manual
.- Uuid string
The UUID of the virtual disk VMDK file. This is used to track the virtual disk on the virtual machine.
- Vapp
Pulumi.
VSphere. Inputs. Virtual Machine Vapp Used for vApp configurations. The only sub-key available is
properties
, which is a key/value map of properties for virtual machines imported from and OVF/OVA. See Using vApp Properties for OVF/OVA Configuration for more information.- Vapp
Transports 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.
- Vbs
Enabled bool Enable Virtualization Based Security. Requires
firmware
to beefi
. In addition,vvtd_enabled
,nested_hv_enabled
, andefi_secure_boot_enabled
must all have a value oftrue
. Supported on vSphere 6.7 and later. Default:false
.- Vmware
Tools stringStatus The state of VMware Tools in the guest. This will determine the proper course of action for some device operations.
- Vmx
Path string The path of the virtual machine configuration file on the datastore in which the virtual machine is placed.
- Vvtd
Enabled bool Enable Intel Virtualization Technology for Directed I/O for the virtual machine (I/O MMU in the vSphere Client). Supported on vSphere 6.7 and later. Default:
false
.- Wait
For intGuest Ip Timeout The amount of time, in minutes, to wait for an available guest IP address on the virtual machine. This should only be used if the version VMware Tools does not allow the
wait_for_guest_net_timeout
waiter to be used. A value less than1
disables the waiter. Default:0
.- Wait
For boolGuest Net Routable 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 thewait_for_guest_ip_timeout
waiter is used. Default:true
.- Wait
For intGuest Net Timeout The amount of time, in minutes, to wait for an available guest IP address on the virtual machine. 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 than1
disables the waiter. Default:5
minutes.
- Alternate
Guest stringName The guest name for the operating system when
guest_id
isotherGuest
orotherGuest64
.- Annotation string
A user-provided description of the virtual machine.
- Boot
Delay int The number of milliseconds to wait before starting the boot sequence. The default is no delay.
- Boot
Retry intDelay The number of milliseconds to wait before retrying the boot sequence. This option is only valid if
boot_retry_enabled
istrue
. Default:10000
(10 seconds).- Boot
Retry boolEnabled If set to
true
, a virtual machine that fails to boot will try again after the delay defined inboot_retry_delay
. Default:false
.- Cdroms
[]Virtual
Machine Cdrom Args A specification for a CD-ROM device on the virtual machine. See CD-ROM options for more information.
- Change
Version string A unique identifier for a given version of the last configuration was applied.
- Clone
Virtual
Machine Clone Args When specified, the virtual machine will be created as a clone of a specified template. Optional customization options can be submitted for the resource. See creating a virtual machine from a template for more information.
- Cpu
Hot boolAdd Enabled Allow CPUs to be added to the virtual machine while it is powered on.
- Cpu
Hot boolRemove Enabled Allow CPUs to be removed to the virtual machine while it is powered on.
- Cpu
Limit int The maximum amount of CPU (in MHz) that the virtual machine can consume, regardless of available resources. The default is no limit.
- Cpu
Performance boolCounters Enabled Enable CPU performance counters on the virtual machine. Default:
false
.- Cpu
Reservation int The amount of CPU (in MHz) that the virtual machine is guaranteed. The default is no reservation.
- int
The number of CPU shares allocated to the virtual machine when the
cpu_share_level
iscustom
.- string
The allocation level for the virtual machine CPU resources. One of
high
,low
,normal
, orcustom
. Default:custom
.- Custom
Attributes map[string]string Map of custom attribute ids to attribute value strings to set for virtual machine. Please refer to the
vsphere_custom_attributes
resource for more information on setting custom attributes.NOTE: Custom attributes requires vCenter Server and is not supported on direct ESXi host connections.
- Datacenter
Id string The datacenter ID. Required only when deploying an OVF/OVA template.
- Datastore
Cluster stringId The managed object reference ID of the datastore cluster in which to place the virtual machine. This setting applies to entire virtual machine and implies that you wish to use vSphere Storage DRS with the virtual machine. See the section on virtual machine migration for more information on modifying this value.
NOTE: One of
datastore_id
ordatastore_cluster_id
must be specified.NOTE: Use of
datastore_cluster_id
requires vSphere Storage DRS to be enabled on the specified datastore cluster.NOTE: The
datastore_cluster_id
setting applies to the entire virtual machine resource. You cannot assign individual individual disks to datastore clusters. In addition, you cannot use theattach
setting to attach external disks on virtual machines that are assigned to datastore clusters.- Datastore
Id string The datastore ID that on which the ISO is located. Required for using a datastore ISO. Conflicts with
client_device
.- Default
Ip stringAddress The IP address selected by the provider to be used with any provisioners configured on this resource. When 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 exists. If VMware Tools is not running on the virtual machine, or if the virtual machine is powered off, this value will be blank.
- Disks
[]Virtual
Machine Disk Args A specification for a virtual disk device on the virtual machine. See disk options for more information.
- Efi
Secure boolBoot Enabled Use this option to enable EFI secure boot when the
firmware
type is set to isefi
. Default:false
.NOTE: EFI secure boot is only available on vSphere 6.5 and later.
- Enable
Disk boolUuid 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 stringMode The EPT/RVI (hardware memory virtualization) setting for the virtual machine. One of
automatic
,on
, oroff
. Default:automatic
.- Extra
Config map[string]string Extra configuration data for the virtual machine. Can be used to supply advanced parameters not normally in configuration, such as instance metadata and userdata.
NOTE: Do not use
extra_config
when working with a template imported from OVF/OVA as your settings may be ignored. Use thevapp
blockproperties
section as described in Using vApp Properties for OVF/OVA Configuration.- Extra
Config boolReboot Required Allow the virtual machine to be rebooted when a change to
extra_config
occurs. Default:true
.- Firmware string
The firmware for the virtual machine. One of
bios
orefi
.- Folder string
The path to the virtual machine folder in which to place the virtual machine, relative to the datacenter path (
/<datacenter-name>/vm
). For example,/dc-01/vm/foo
- Force
Power boolOff If a guest shutdown failed or times out while updating or destroying (see
shutdown_wait_timeout
), force the power-off of the virtual machine. Default:true
.- Guest
Id string The guest ID for the operating system type. For a full list of possible values, see here. Default:
otherGuest64
.- Guest
Ip []stringAddresses 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 virtul machine is powered off, this list will be empty.- Hardware
Version int The hardware version number. Valid range is from 4 to 21. The hardware version cannot be downgraded. See virtual machine hardware versions and compatibility for more information on supported settings.
- Host
System stringId The managed object reference ID of a host on which to place the virtual machine. See the section on virtual machine migration for more information on modifying this value. When using a vSphere cluster, if a
host_system_id
is not supplied, vSphere will select a host in the cluster to place the virtual machine, according to any defaults or vSphere DRS placement policies.- Hv
Mode string The hardware virtualization (non-nested) setting for the virtual machine. One of
hvAuto
,hvOn
, orhvOff
. Default:hvAuto
.- Ide
Controller intCount The number of IDE controllers that the virtual machine. This directly affects the number 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:
2
.- Ignored
Guest []stringIps 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 so that the waiter will continue to wait for a valid IP address. Default:
[]
.- Imported bool
Indicates if the virtual machine resource has been imported, or if 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 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. One of
low
,normal
,medium
, orhigh
.NOTE: On higher sensitivities, you may need to adjust the
memory_reservation
to the full amount of memory provisioned for the virtual machine.- Memory int
The memory size to assign to the virtual machine, in MB. Default:
1024
(1 GB).- Memory
Hot boolAdd Enabled Allow memory to be added to the virtual machine while it is powered on.
NOTE: CPU and memory hot add options are not available on all guest operating systems. Please refer to the VMware Guest OS Compatibility Guide to which settings are allow for your guest operating system. In addition, at least one
pulumi up
must be run before you are able to use CPU and memory hot add.NOTE: For Linux 64-bit guest operating systems with less than or equal to 3GB, the virtual machine must powered off to add memory beyond 3GB. Subsequent hot add of memory does not require the virtual machine to be powered-off to apply the plan. Please refer to VMware KB 2008405.
- Memory
Limit int The maximum amount of memory (in MB) that th virtual machine can consume, regardless of available resources. The default is no limit.
- Memory
Reservation int The amount of memory (in MB) that the virtual machine is guaranteed. The default is no reservation.
- int
The number of memory shares allocated to the virtual machine when the
memory_share_level
iscustom
.- string
The allocation level for the virtual machine memory resources. One of
high
,low
,normal
, orcustom
. Default:custom
.- Migrate
Wait intTimeout The amount of time, in minutes, to wait for a virtual machine migration to complete before failing. Default:
10
minutes. See the section on virtual machine migration for more information.- Moid string
The managed object reference ID of the created virtual machine.
- Name string
The name of the virtual machine.
- Nested
Hv boolEnabled Enable nested hardware virtualization on the virtual machine, facilitating nested virtualization in the guest operating system. Default:
false
.- Network
Interfaces []VirtualMachine Network Interface Args A specification for a virtual NIC on the virtual machine. See network interface options for more information.
- Num
Cores intPer Socket The number of cores per socket in the virtual machine. The number of vCPUs on the virtual machine will be
num_cpus
divided bynum_cores_per_socket
. If specified, the value supplied tonum_cpus
must be evenly divisible by this value. Default:1
.- Num
Cpus int The total number of virtual processor cores to assign to the virtual machine. Default:
1
.- Ovf
Deploy VirtualMachine Ovf Deploy Args When specified, the virtual machine will be deployed from the provided OVF/OVA template. See creating a virtual machine from an OVF/OVA template for more information.
- Pci
Device []stringIds List of host PCI device IDs in which to create PCI passthroughs.
NOTE: Cloning requires vCenter Server and is not supported on direct ESXi host connections.
- Power
State string A computed value for the current power state of the virtual machine. One of
on
,off
, orsuspended
.- 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 Terraform used to determine if a configuration set change requires a reboot.
- Replace
Trigger string Triggers replacement of resource whenever it changes.
For example,
replace_trigger = sha256(format("%s-%s",data.template_file.cloud_init_metadata.rendered,data.template_file.cloud_init_userdata.rendered))
will fingerprint the changes in cloud-init metadata and userdata templates. This will enable a replacement of the resource whenever the dependant template renders a new configuration. (Forces a replacement.)- Resource
Pool stringId The managed object reference ID of the resource pool in which to place the virtual machine. See the Virtual Machine Migration section for more information on modifying this value.
NOTE: All clusters and standalone hosts have a default root resource pool. This resource argument does not directly accept the cluster or standalone host resource. For more information, see the section on specifying the Root Resource Pool in the
vsphere.ResourcePool
data source documentation on using the root resource pool.- Run
Tools boolScripts After Power On Enable post-power-on scripts to run when VMware Tools is installed. Default:
true
.- Run
Tools boolScripts After Resume Enable ost-resume scripts to run when VMware Tools is installed. Default:
true
.- Run
Tools boolScripts Before Guest Reboot Enable pre-reboot scripts to run when VMware Tools is installed. Default:
false
.- Run
Tools boolScripts Before Guest Shutdown Enable pre-shutdown scripts to run when VMware Tools is installed. Default:
true
.- Run
Tools boolScripts Before Guest Standby Enable pre-standby scripts to run when VMware Tools is installed. Default:
true
.- Sata
Controller intCount 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 stringSharing The type of SCSI bus sharing for the virtual machine SCSI controller. One of
physicalSharing
,virtualSharing
, andnoSharing
. Default:noSharing
.- Scsi
Controller intCount The number of SCSI 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
Type string The SCSI controller type for the virtual machine. One of
lsilogic
(LSI Logic Parallel),lsilogic-sas
(LSI Logic SAS) orpvscsi
(VMware Paravirtual). Default:pvscsi
.- Shutdown
Wait intTimeout 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 totrue
, the virtual machine will be forced to power-off after the timeout, otherwise an error is returned. Default:3
minutes.- Storage
Policy stringId The UUID of the storage policy to assign to the virtual disk.
- Swap
Placement stringPolicy The swap file placement policy for the virtual machine. One of
inherit
,hostLocal
, orvmDirectory
. Default:inherit
.- Sync
Time boolWith Host Enable the guest operating system to synchronization its clock with the host when the virtual machine is powered on or resumed. Requires vSphere 7.0 Update 1 and later. Requires VMware Tools to be installed. Default:
false
.- Sync
Time boolWith Host Periodically Enable the guest operating system to periodically synchronize its clock with the host. Requires vSphere 7.0 Update 1 and later. On previous versions, setting
sync_time_with_host
is will enable periodic synchronization. Requires VMware Tools to be installed. Default:false
.- []string
The IDs of any tags to attach to this resource. Please refer to the
vsphere.Tag
resource for more information on applying tags to virtual machine resources.NOTE: Tagging support is unsupported on direct ESXi host connections and requires vCenter Server instance.
- Tools
Upgrade stringPolicy Enable automatic upgrade of the VMware Tools version when the virtual machine is rebooted. If necessary, VMware Tools is upgraded to the latest version supported by the host on which the virtual machine is running. Requires VMware Tools to be installed. One of
manual
orupgradeAtPowerCycle
. Default:manual
.- Uuid string
The UUID of the virtual disk VMDK file. This is used to track the virtual disk on the virtual machine.
- Vapp
Virtual
Machine Vapp Args Used for vApp configurations. The only sub-key available is
properties
, which is a key/value map of properties for virtual machines imported from and OVF/OVA. See Using vApp Properties for OVF/OVA Configuration for more information.- Vapp
Transports []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.
- Vbs
Enabled bool Enable Virtualization Based Security. Requires
firmware
to beefi
. In addition,vvtd_enabled
,nested_hv_enabled
, andefi_secure_boot_enabled
must all have a value oftrue
. Supported on vSphere 6.7 and later. Default:false
.- Vmware
Tools stringStatus The state of VMware Tools in the guest. This will determine the proper course of action for some device operations.
- Vmx
Path string The path of the virtual machine configuration file on the datastore in which the virtual machine is placed.
- Vvtd
Enabled bool Enable Intel Virtualization Technology for Directed I/O for the virtual machine (I/O MMU in the vSphere Client). Supported on vSphere 6.7 and later. Default:
false
.- Wait
For intGuest Ip Timeout The amount of time, in minutes, to wait for an available guest IP address on the virtual machine. This should only be used if the version VMware Tools does not allow the
wait_for_guest_net_timeout
waiter to be used. A value less than1
disables the waiter. Default:0
.- Wait
For boolGuest Net Routable 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 thewait_for_guest_ip_timeout
waiter is used. Default:true
.- Wait
For intGuest Net Timeout The amount of time, in minutes, to wait for an available guest IP address on the virtual machine. 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 than1
disables the waiter. Default:5
minutes.
- alternate
Guest StringName The guest name for the operating system when
guest_id
isotherGuest
orotherGuest64
.- annotation String
A user-provided description of the virtual machine.
- boot
Delay Integer The number of milliseconds to wait before starting the boot sequence. The default is no delay.
- boot
Retry IntegerDelay The number of milliseconds to wait before retrying the boot sequence. This option is only valid if
boot_retry_enabled
istrue
. Default:10000
(10 seconds).- boot
Retry BooleanEnabled If set to
true
, a virtual machine that fails to boot will try again after the delay defined inboot_retry_delay
. Default:false
.- cdroms
List<Virtual
Machine Cdrom> A specification for a CD-ROM device on the virtual machine. See CD-ROM options for more information.
- change
Version String A unique identifier for a given version of the last configuration was applied.
- clone_
Virtual
Machine Clone When specified, the virtual machine will be created as a clone of a specified template. Optional customization options can be submitted for the resource. See creating a virtual machine from a template for more information.
- cpu
Hot BooleanAdd Enabled Allow CPUs to be added to the virtual machine while it is powered on.
- cpu
Hot BooleanRemove Enabled Allow CPUs to be removed to the virtual machine while it is powered on.
- cpu
Limit Integer The maximum amount of CPU (in MHz) that the virtual machine can consume, regardless of available resources. The default is no limit.
- cpu
Performance BooleanCounters Enabled Enable CPU performance counters on the virtual machine. Default:
false
.- cpu
Reservation Integer The amount of CPU (in MHz) that the virtual machine is guaranteed. The default is no reservation.
- Integer
The number of CPU shares allocated to the virtual machine when the
cpu_share_level
iscustom
.- String
The allocation level for the virtual machine CPU resources. One of
high
,low
,normal
, orcustom
. Default:custom
.- custom
Attributes Map<String,String> Map of custom attribute ids to attribute value strings to set for virtual machine. Please refer to the
vsphere_custom_attributes
resource for more information on setting custom attributes.NOTE: Custom attributes requires vCenter Server and is not supported on direct ESXi host connections.
- datacenter
Id String The datacenter ID. Required only when deploying an OVF/OVA template.
- datastore
Cluster StringId The managed object reference ID of the datastore cluster in which to place the virtual machine. This setting applies to entire virtual machine and implies that you wish to use vSphere Storage DRS with the virtual machine. See the section on virtual machine migration for more information on modifying this value.
NOTE: One of
datastore_id
ordatastore_cluster_id
must be specified.NOTE: Use of
datastore_cluster_id
requires vSphere Storage DRS to be enabled on the specified datastore cluster.NOTE: The
datastore_cluster_id
setting applies to the entire virtual machine resource. You cannot assign individual individual disks to datastore clusters. In addition, you cannot use theattach
setting to attach external disks on virtual machines that are assigned to datastore clusters.- datastore
Id String The datastore ID that on which the ISO is located. Required for using a datastore ISO. Conflicts with
client_device
.- default
Ip StringAddress The IP address selected by the provider to be used with any provisioners configured on this resource. When 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 exists. If VMware Tools is not running on the virtual machine, or if the virtual machine is powered off, this value will be blank.
- disks
List<Virtual
Machine Disk> A specification for a virtual disk device on the virtual machine. See disk options for more information.
- efi
Secure BooleanBoot Enabled Use this option to enable EFI secure boot when the
firmware
type is set to isefi
. Default:false
.NOTE: EFI secure boot is only available on vSphere 6.5 and later.
- enable
Disk BooleanUuid Expose the UUIDs of attached virtual disks to the virtual machine, allowing access to them in the guest. Default:
false
.- enable
Logging Boolean Enable logging of virtual machine events to a log file stored in the virtual machine directory. Default:
false
.- ept
Rvi StringMode The EPT/RVI (hardware memory virtualization) setting for the virtual machine. One of
automatic
,on
, oroff
. Default:automatic
.- extra
Config Map<String,String> Extra configuration data for the virtual machine. Can be used to supply advanced parameters not normally in configuration, such as instance metadata and userdata.
NOTE: Do not use
extra_config
when working with a template imported from OVF/OVA as your settings may be ignored. Use thevapp
blockproperties
section as described in Using vApp Properties for OVF/OVA Configuration.- extra
Config BooleanReboot Required Allow the virtual machine to be rebooted when a change to
extra_config
occurs. Default:true
.- firmware String
The firmware for the virtual machine. One of
bios
orefi
.- folder String
The path to the virtual machine folder in which to place the virtual machine, relative to the datacenter path (
/<datacenter-name>/vm
). For example,/dc-01/vm/foo
- force
Power BooleanOff If a guest shutdown failed or times out while updating or destroying (see
shutdown_wait_timeout
), force the power-off of the virtual machine. Default:true
.- guest
Id String The guest ID for the operating system type. For a full list of possible values, see here. Default:
otherGuest64
.- guest
Ip List<String>Addresses 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 virtul machine is powered off, this list will be empty.- hardware
Version Integer The hardware version number. Valid range is from 4 to 21. The hardware version cannot be downgraded. See virtual machine hardware versions and compatibility for more information on supported settings.
- host
System StringId The managed object reference ID of a host on which to place the virtual machine. See the section on virtual machine migration for more information on modifying this value. When using a vSphere cluster, if a
host_system_id
is not supplied, vSphere will select a host in the cluster to place the virtual machine, according to any defaults or vSphere DRS placement policies.- hv
Mode String The hardware virtualization (non-nested) setting for the virtual machine. One of
hvAuto
,hvOn
, orhvOff
. Default:hvAuto
.- ide
Controller IntegerCount The number of IDE controllers that the virtual machine. This directly affects the number 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:
2
.- ignored
Guest List<String>Ips 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 so that the waiter will continue to wait for a valid IP address. Default:
[]
.- imported Boolean
Indicates if the virtual machine resource has been imported, or if 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 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. One of
low
,normal
,medium
, orhigh
.NOTE: On higher sensitivities, you may need to adjust the
memory_reservation
to the full amount of memory provisioned for the virtual machine.- memory Integer
The memory size to assign to the virtual machine, in MB. Default:
1024
(1 GB).- memory
Hot BooleanAdd Enabled Allow memory to be added to the virtual machine while it is powered on.
NOTE: CPU and memory hot add options are not available on all guest operating systems. Please refer to the VMware Guest OS Compatibility Guide to which settings are allow for your guest operating system. In addition, at least one
pulumi up
must be run before you are able to use CPU and memory hot add.NOTE: For Linux 64-bit guest operating systems with less than or equal to 3GB, the virtual machine must powered off to add memory beyond 3GB. Subsequent hot add of memory does not require the virtual machine to be powered-off to apply the plan. Please refer to VMware KB 2008405.
- memory
Limit Integer The maximum amount of memory (in MB) that th virtual machine can consume, regardless of available resources. The default is no limit.
- memory
Reservation Integer The amount of memory (in MB) that the virtual machine is guaranteed. The default is no reservation.
- Integer
The number of memory shares allocated to the virtual machine when the
memory_share_level
iscustom
.- String
The allocation level for the virtual machine memory resources. One of
high
,low
,normal
, orcustom
. Default:custom
.- migrate
Wait IntegerTimeout The amount of time, in minutes, to wait for a virtual machine migration to complete before failing. Default:
10
minutes. See the section on virtual machine migration for more information.- moid String
The managed object reference ID of the created virtual machine.
- name String
The name of the virtual machine.
- nested
Hv BooleanEnabled Enable nested hardware virtualization on the virtual machine, facilitating nested virtualization in the guest operating system. Default:
false
.- network
Interfaces List<VirtualMachine Network Interface> A specification for a virtual NIC on the virtual machine. See network interface options for more information.
- num
Cores IntegerPer Socket The number of cores per socket in the virtual machine. The number of vCPUs on the virtual machine will be
num_cpus
divided bynum_cores_per_socket
. If specified, the value supplied tonum_cpus
must be evenly divisible by this value. Default:1
.- num
Cpus Integer The total number of virtual processor cores to assign to the virtual machine. Default:
1
.- ovf
Deploy VirtualMachine Ovf Deploy When specified, the virtual machine will be deployed from the provided OVF/OVA template. See creating a virtual machine from an OVF/OVA template for more information.
- pci
Device List<String>Ids List of host PCI device IDs in which to create PCI passthroughs.
NOTE: Cloning requires vCenter Server and is not supported on direct ESXi host connections.
- power
State String A computed value for the current power state of the virtual machine. One of
on
,off
, orsuspended
.- poweron
Timeout Integer The amount of time, in seconds, that we will be trying to power on a VM
- reboot
Required Boolean Value internal to Terraform used to determine if a configuration set change requires a reboot.
- replace
Trigger String Triggers replacement of resource whenever it changes.
For example,
replace_trigger = sha256(format("%s-%s",data.template_file.cloud_init_metadata.rendered,data.template_file.cloud_init_userdata.rendered))
will fingerprint the changes in cloud-init metadata and userdata templates. This will enable a replacement of the resource whenever the dependant template renders a new configuration. (Forces a replacement.)- resource
Pool StringId The managed object reference ID of the resource pool in which to place the virtual machine. See the Virtual Machine Migration section for more information on modifying this value.
NOTE: All clusters and standalone hosts have a default root resource pool. This resource argument does not directly accept the cluster or standalone host resource. For more information, see the section on specifying the Root Resource Pool in the
vsphere.ResourcePool
data source documentation on using the root resource pool.- run
Tools BooleanScripts After Power On Enable post-power-on scripts to run when VMware Tools is installed. Default:
true
.- run
Tools BooleanScripts After Resume Enable ost-resume scripts to run when VMware Tools is installed. Default:
true
.- run
Tools BooleanScripts Before Guest Reboot Enable pre-reboot scripts to run when VMware Tools is installed. Default:
false
.- run
Tools BooleanScripts Before Guest Shutdown Enable pre-shutdown scripts to run when VMware Tools is installed. Default:
true
.- run
Tools BooleanScripts Before Guest Standby Enable pre-standby scripts to run when VMware Tools is installed. Default:
true
.- sata
Controller IntegerCount 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 StringSharing The type of SCSI bus sharing for the virtual machine SCSI controller. One of
physicalSharing
,virtualSharing
, andnoSharing
. Default:noSharing
.- scsi
Controller IntegerCount The number of SCSI 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
Type String The SCSI controller type for the virtual machine. One of
lsilogic
(LSI Logic Parallel),lsilogic-sas
(LSI Logic SAS) orpvscsi
(VMware Paravirtual). Default:pvscsi
.- shutdown
Wait IntegerTimeout 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 totrue
, the virtual machine will be forced to power-off after the timeout, otherwise an error is returned. Default:3
minutes.- storage
Policy StringId The UUID of the storage policy to assign to the virtual disk.
- swap
Placement StringPolicy The swap file placement policy for the virtual machine. One of
inherit
,hostLocal
, orvmDirectory
. Default:inherit
.- sync
Time BooleanWith Host Enable the guest operating system to synchronization its clock with the host when the virtual machine is powered on or resumed. Requires vSphere 7.0 Update 1 and later. Requires VMware Tools to be installed. Default:
false
.- sync
Time BooleanWith Host Periodically Enable the guest operating system to periodically synchronize its clock with the host. Requires vSphere 7.0 Update 1 and later. On previous versions, setting
sync_time_with_host
is will enable periodic synchronization. Requires VMware Tools to be installed. Default:false
.- List<String>
The IDs of any tags to attach to this resource. Please refer to the
vsphere.Tag
resource for more information on applying tags to virtual machine resources.NOTE: Tagging support is unsupported on direct ESXi host connections and requires vCenter Server instance.
- tools
Upgrade StringPolicy Enable automatic upgrade of the VMware Tools version when the virtual machine is rebooted. If necessary, VMware Tools is upgraded to the latest version supported by the host on which the virtual machine is running. Requires VMware Tools to be installed. One of
manual
orupgradeAtPowerCycle
. Default:manual
.- uuid String
The UUID of the virtual disk VMDK file. This is used to track the virtual disk on the virtual machine.
- vapp
Virtual
Machine Vapp Used for vApp configurations. The only sub-key available is
properties
, which is a key/value map of properties for virtual machines imported from and OVF/OVA. See Using vApp Properties for OVF/OVA Configuration for more information.- vapp
Transports 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.
- vbs
Enabled Boolean Enable Virtualization Based Security. Requires
firmware
to beefi
. In addition,vvtd_enabled
,nested_hv_enabled
, andefi_secure_boot_enabled
must all have a value oftrue
. Supported on vSphere 6.7 and later. Default:false
.- vmware
Tools StringStatus The state of VMware Tools in the guest. This will determine the proper course of action for some device operations.
- vmx
Path String The path of the virtual machine configuration file on the datastore in which the virtual machine is placed.
- vvtd
Enabled Boolean Enable Intel Virtualization Technology for Directed I/O for the virtual machine (I/O MMU in the vSphere Client). Supported on vSphere 6.7 and later. Default:
false
.- wait
For IntegerGuest Ip Timeout The amount of time, in minutes, to wait for an available guest IP address on the virtual machine. This should only be used if the version VMware Tools does not allow the
wait_for_guest_net_timeout
waiter to be used. A value less than1
disables the waiter. Default:0
.- wait
For BooleanGuest Net Routable 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 thewait_for_guest_ip_timeout
waiter is used. Default:true
.- wait
For IntegerGuest Net Timeout The amount of time, in minutes, to wait for an available guest IP address on the virtual machine. 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 than1
disables the waiter. Default:5
minutes.
- alternate
Guest stringName The guest name for the operating system when
guest_id
isotherGuest
orotherGuest64
.- annotation string
A user-provided description of the virtual machine.
- boot
Delay number The number of milliseconds to wait before starting the boot sequence. The default is no delay.
- boot
Retry numberDelay The number of milliseconds to wait before retrying the boot sequence. This option is only valid if
boot_retry_enabled
istrue
. Default:10000
(10 seconds).- boot
Retry booleanEnabled If set to
true
, a virtual machine that fails to boot will try again after the delay defined inboot_retry_delay
. Default:false
.- cdroms
Virtual
Machine Cdrom[] A specification for a CD-ROM device on the virtual machine. See CD-ROM options for more information.
- change
Version string A unique identifier for a given version of the last configuration was applied.
- clone
Virtual
Machine Clone When specified, the virtual machine will be created as a clone of a specified template. Optional customization options can be submitted for the resource. See creating a virtual machine from a template for more information.
- cpu
Hot booleanAdd Enabled Allow CPUs to be added to the virtual machine while it is powered on.
- cpu
Hot booleanRemove Enabled Allow CPUs to be removed to the virtual machine while it is powered on.
- cpu
Limit number The maximum amount of CPU (in MHz) that the virtual machine can consume, regardless of available resources. The default is no limit.
- cpu
Performance booleanCounters Enabled Enable CPU performance counters on the virtual machine. Default:
false
.- cpu
Reservation number The amount of CPU (in MHz) that the virtual machine is guaranteed. The default is no reservation.
- number
The number of CPU shares allocated to the virtual machine when the
cpu_share_level
iscustom
.- string
The allocation level for the virtual machine CPU resources. One of
high
,low
,normal
, orcustom
. Default:custom
.- custom
Attributes {[key: string]: string} Map of custom attribute ids to attribute value strings to set for virtual machine. Please refer to the
vsphere_custom_attributes
resource for more information on setting custom attributes.NOTE: Custom attributes requires vCenter Server and is not supported on direct ESXi host connections.
- datacenter
Id string The datacenter ID. Required only when deploying an OVF/OVA template.
- datastore
Cluster stringId The managed object reference ID of the datastore cluster in which to place the virtual machine. This setting applies to entire virtual machine and implies that you wish to use vSphere Storage DRS with the virtual machine. See the section on virtual machine migration for more information on modifying this value.
NOTE: One of
datastore_id
ordatastore_cluster_id
must be specified.NOTE: Use of
datastore_cluster_id
requires vSphere Storage DRS to be enabled on the specified datastore cluster.NOTE: The
datastore_cluster_id
setting applies to the entire virtual machine resource. You cannot assign individual individual disks to datastore clusters. In addition, you cannot use theattach
setting to attach external disks on virtual machines that are assigned to datastore clusters.- datastore
Id string The datastore ID that on which the ISO is located. Required for using a datastore ISO. Conflicts with
client_device
.- default
Ip stringAddress The IP address selected by the provider to be used with any provisioners configured on this resource. When 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 exists. If VMware Tools is not running on the virtual machine, or if the virtual machine is powered off, this value will be blank.
- disks
Virtual
Machine Disk[] A specification for a virtual disk device on the virtual machine. See disk options for more information.
- efi
Secure booleanBoot Enabled Use this option to enable EFI secure boot when the
firmware
type is set to isefi
. Default:false
.NOTE: EFI secure boot is only available on vSphere 6.5 and later.
- enable
Disk booleanUuid Expose the UUIDs of attached virtual disks to the virtual machine, allowing access to them in the guest. Default:
false
.- enable
Logging boolean Enable logging of virtual machine events to a log file stored in the virtual machine directory. Default:
false
.- ept
Rvi stringMode The EPT/RVI (hardware memory virtualization) setting for the virtual machine. One of
automatic
,on
, oroff
. Default:automatic
.- extra
Config {[key: string]: string} Extra configuration data for the virtual machine. Can be used to supply advanced parameters not normally in configuration, such as instance metadata and userdata.
NOTE: Do not use
extra_config
when working with a template imported from OVF/OVA as your settings may be ignored. Use thevapp
blockproperties
section as described in Using vApp Properties for OVF/OVA Configuration.- extra
Config booleanReboot Required Allow the virtual machine to be rebooted when a change to
extra_config
occurs. Default:true
.- firmware string
The firmware for the virtual machine. One of
bios
orefi
.- folder string
The path to the virtual machine folder in which to place the virtual machine, relative to the datacenter path (
/<datacenter-name>/vm
). For example,/dc-01/vm/foo
- force
Power booleanOff If a guest shutdown failed or times out while updating or destroying (see
shutdown_wait_timeout
), force the power-off of the virtual machine. Default:true
.- guest
Id string The guest ID for the operating system type. For a full list of possible values, see here. Default:
otherGuest64
.- guest
Ip string[]Addresses 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 virtul machine is powered off, this list will be empty.- hardware
Version number The hardware version number. Valid range is from 4 to 21. The hardware version cannot be downgraded. See virtual machine hardware versions and compatibility for more information on supported settings.
- host
System stringId The managed object reference ID of a host on which to place the virtual machine. See the section on virtual machine migration for more information on modifying this value. When using a vSphere cluster, if a
host_system_id
is not supplied, vSphere will select a host in the cluster to place the virtual machine, according to any defaults or vSphere DRS placement policies.- hv
Mode string The hardware virtualization (non-nested) setting for the virtual machine. One of
hvAuto
,hvOn
, orhvOff
. Default:hvAuto
.- ide
Controller numberCount The number of IDE controllers that the virtual machine. This directly affects the number 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:
2
.- ignored
Guest string[]Ips 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 so that the waiter will continue to wait for a valid IP address. Default:
[]
.- imported boolean
Indicates if the virtual machine resource has been imported, or if 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 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. One of
low
,normal
,medium
, orhigh
.NOTE: On higher sensitivities, you may need to adjust the
memory_reservation
to the full amount of memory provisioned for the virtual machine.- memory number
The memory size to assign to the virtual machine, in MB. Default:
1024
(1 GB).- memory
Hot booleanAdd Enabled Allow memory to be added to the virtual machine while it is powered on.
NOTE: CPU and memory hot add options are not available on all guest operating systems. Please refer to the VMware Guest OS Compatibility Guide to which settings are allow for your guest operating system. In addition, at least one
pulumi up
must be run before you are able to use CPU and memory hot add.NOTE: For Linux 64-bit guest operating systems with less than or equal to 3GB, the virtual machine must powered off to add memory beyond 3GB. Subsequent hot add of memory does not require the virtual machine to be powered-off to apply the plan. Please refer to VMware KB 2008405.
- memory
Limit number The maximum amount of memory (in MB) that th virtual machine can consume, regardless of available resources. The default is no limit.
- memory
Reservation number The amount of memory (in MB) that the virtual machine is guaranteed. The default is no reservation.
- number
The number of memory shares allocated to the virtual machine when the
memory_share_level
iscustom
.- string
The allocation level for the virtual machine memory resources. One of
high
,low
,normal
, orcustom
. Default:custom
.- migrate
Wait numberTimeout The amount of time, in minutes, to wait for a virtual machine migration to complete before failing. Default:
10
minutes. See the section on virtual machine migration for more information.- moid string
The managed object reference ID of the created virtual machine.
- name string
The name of the virtual machine.
- nested
Hv booleanEnabled Enable nested hardware virtualization on the virtual machine, facilitating nested virtualization in the guest operating system. Default:
false
.- network
Interfaces VirtualMachine Network Interface[] A specification for a virtual NIC on the virtual machine. See network interface options for more information.
- num
Cores numberPer Socket The number of cores per socket in the virtual machine. The number of vCPUs on the virtual machine will be
num_cpus
divided bynum_cores_per_socket
. If specified, the value supplied tonum_cpus
must be evenly divisible by this value. Default:1
.- num
Cpus number The total number of virtual processor cores to assign to the virtual machine. Default:
1
.- ovf
Deploy VirtualMachine Ovf Deploy When specified, the virtual machine will be deployed from the provided OVF/OVA template. See creating a virtual machine from an OVF/OVA template for more information.
- pci
Device string[]Ids List of host PCI device IDs in which to create PCI passthroughs.
NOTE: Cloning requires vCenter Server and is not supported on direct ESXi host connections.
- power
State string A computed value for the current power state of the virtual machine. One of
on
,off
, orsuspended
.- poweron
Timeout number The amount of time, in seconds, that we will be trying to power on a VM
- reboot
Required boolean Value internal to Terraform used to determine if a configuration set change requires a reboot.
- replace
Trigger string Triggers replacement of resource whenever it changes.
For example,
replace_trigger = sha256(format("%s-%s",data.template_file.cloud_init_metadata.rendered,data.template_file.cloud_init_userdata.rendered))
will fingerprint the changes in cloud-init metadata and userdata templates. This will enable a replacement of the resource whenever the dependant template renders a new configuration. (Forces a replacement.)- resource
Pool stringId The managed object reference ID of the resource pool in which to place the virtual machine. See the Virtual Machine Migration section for more information on modifying this value.
NOTE: All clusters and standalone hosts have a default root resource pool. This resource argument does not directly accept the cluster or standalone host resource. For more information, see the section on specifying the Root Resource Pool in the
vsphere.ResourcePool
data source documentation on using the root resource pool.- run
Tools booleanScripts After Power On Enable post-power-on scripts to run when VMware Tools is installed. Default:
true
.- run
Tools booleanScripts After Resume Enable ost-resume scripts to run when VMware Tools is installed. Default:
true
.- run
Tools booleanScripts Before Guest Reboot Enable pre-reboot scripts to run when VMware Tools is installed. Default:
false
.- run
Tools booleanScripts Before Guest Shutdown Enable pre-shutdown scripts to run when VMware Tools is installed. Default:
true
.- run
Tools booleanScripts Before Guest Standby Enable pre-standby scripts to run when VMware Tools is installed. Default:
true
.- sata
Controller numberCount 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 stringSharing The type of SCSI bus sharing for the virtual machine SCSI controller. One of
physicalSharing
,virtualSharing
, andnoSharing
. Default:noSharing
.- scsi
Controller numberCount The number of SCSI 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
Type string The SCSI controller type for the virtual machine. One of
lsilogic
(LSI Logic Parallel),lsilogic-sas
(LSI Logic SAS) orpvscsi
(VMware Paravirtual). Default:pvscsi
.- shutdown
Wait numberTimeout 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 totrue
, the virtual machine will be forced to power-off after the timeout, otherwise an error is returned. Default:3
minutes.- storage
Policy stringId The UUID of the storage policy to assign to the virtual disk.
- swap
Placement stringPolicy The swap file placement policy for the virtual machine. One of
inherit
,hostLocal
, orvmDirectory
. Default:inherit
.- sync
Time booleanWith Host Enable the guest operating system to synchronization its clock with the host when the virtual machine is powered on or resumed. Requires vSphere 7.0 Update 1 and later. Requires VMware Tools to be installed. Default:
false
.- sync
Time booleanWith Host Periodically Enable the guest operating system to periodically synchronize its clock with the host. Requires vSphere 7.0 Update 1 and later. On previous versions, setting
sync_time_with_host
is will enable periodic synchronization. Requires VMware Tools to be installed. Default:false
.- string[]
The IDs of any tags to attach to this resource. Please refer to the
vsphere.Tag
resource for more information on applying tags to virtual machine resources.NOTE: Tagging support is unsupported on direct ESXi host connections and requires vCenter Server instance.
- tools
Upgrade stringPolicy Enable automatic upgrade of the VMware Tools version when the virtual machine is rebooted. If necessary, VMware Tools is upgraded to the latest version supported by the host on which the virtual machine is running. Requires VMware Tools to be installed. One of
manual
orupgradeAtPowerCycle
. Default:manual
.- uuid string
The UUID of the virtual disk VMDK file. This is used to track the virtual disk on the virtual machine.
- vapp
Virtual
Machine Vapp Used for vApp configurations. The only sub-key available is
properties
, which is a key/value map of properties for virtual machines imported from and OVF/OVA. See Using vApp Properties for OVF/OVA Configuration for more information.- vapp
Transports 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.
- vbs
Enabled boolean Enable Virtualization Based Security. Requires
firmware
to beefi
. In addition,vvtd_enabled
,nested_hv_enabled
, andefi_secure_boot_enabled
must all have a value oftrue
. Supported on vSphere 6.7 and later. Default:false
.- vmware
Tools stringStatus The state of VMware Tools in the guest. This will determine the proper course of action for some device operations.
- vmx
Path string The path of the virtual machine configuration file on the datastore in which the virtual machine is placed.
- vvtd
Enabled boolean Enable Intel Virtualization Technology for Directed I/O for the virtual machine (I/O MMU in the vSphere Client). Supported on vSphere 6.7 and later. Default:
false
.- wait
For numberGuest Ip Timeout The amount of time, in minutes, to wait for an available guest IP address on the virtual machine. This should only be used if the version VMware Tools does not allow the
wait_for_guest_net_timeout
waiter to be used. A value less than1
disables the waiter. Default:0
.- wait
For booleanGuest Net Routable 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 thewait_for_guest_ip_timeout
waiter is used. Default:true
.- wait
For numberGuest Net Timeout The amount of time, in minutes, to wait for an available guest IP address on the virtual machine. 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 than1
disables the waiter. Default:5
minutes.
- alternate_
guest_ strname The guest name for the operating system when
guest_id
isotherGuest
orotherGuest64
.- annotation str
A user-provided description of the virtual machine.
- boot_
delay int The number of milliseconds to wait before starting the boot sequence. The default is no delay.
- boot_
retry_ intdelay The number of milliseconds to wait before retrying the boot sequence. This option is only valid if
boot_retry_enabled
istrue
. Default:10000
(10 seconds).- boot_
retry_ boolenabled If set to
true
, a virtual machine that fails to boot will try again after the delay defined inboot_retry_delay
. Default:false
.- cdroms
Sequence[Virtual
Machine Cdrom Args] A specification for a CD-ROM device on the virtual machine. See CD-ROM options for more information.
- change_
version str A unique identifier for a given version of the last configuration was applied.
- clone
Virtual
Machine Clone Args When specified, the virtual machine will be created as a clone of a specified template. Optional customization options can be submitted for the resource. See creating a virtual machine from a template for more information.
- cpu_
hot_ booladd_ enabled Allow CPUs to be added to the virtual machine while it is powered on.
- cpu_
hot_ boolremove_ enabled Allow CPUs to be removed to the virtual machine while it is powered on.
- cpu_
limit int The maximum amount of CPU (in MHz) that the virtual machine can consume, regardless of available resources. The default is no limit.
- cpu_
performance_ boolcounters_ enabled Enable CPU performance counters on the virtual machine. Default:
false
.- cpu_
reservation int The amount of CPU (in MHz) that the virtual machine is guaranteed. The default is no reservation.
- int
The number of CPU shares allocated to the virtual machine when the
cpu_share_level
iscustom
.- str
The allocation level for the virtual machine CPU resources. One of
high
,low
,normal
, orcustom
. Default:custom
.- custom_
attributes Mapping[str, str] Map of custom attribute ids to attribute value strings to set for virtual machine. Please refer to the
vsphere_custom_attributes
resource for more information on setting custom attributes.NOTE: Custom attributes requires vCenter Server and is not supported on direct ESXi host connections.
- datacenter_
id str The datacenter ID. Required only when deploying an OVF/OVA template.
- datastore_
cluster_ strid The managed object reference ID of the datastore cluster in which to place the virtual machine. This setting applies to entire virtual machine and implies that you wish to use vSphere Storage DRS with the virtual machine. See the section on virtual machine migration for more information on modifying this value.
NOTE: One of
datastore_id
ordatastore_cluster_id
must be specified.NOTE: Use of
datastore_cluster_id
requires vSphere Storage DRS to be enabled on the specified datastore cluster.NOTE: The
datastore_cluster_id
setting applies to the entire virtual machine resource. You cannot assign individual individual disks to datastore clusters. In addition, you cannot use theattach
setting to attach external disks on virtual machines that are assigned to datastore clusters.- datastore_
id str The datastore ID that on which the ISO is located. Required for using a datastore ISO. Conflicts with
client_device
.- default_
ip_ straddress The IP address selected by the provider to be used with any provisioners configured on this resource. When 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 exists. If VMware Tools is not running on the virtual machine, or if the virtual machine is powered off, this value will be blank.
- disks
Sequence[Virtual
Machine Disk Args] A specification for a virtual disk device on the virtual machine. See disk options for more information.
- efi_
secure_ boolboot_ enabled Use this option to enable EFI secure boot when the
firmware
type is set to isefi
. Default:false
.NOTE: EFI secure boot is only available on vSphere 6.5 and later.
- enable_
disk_ booluuid 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_ strmode The EPT/RVI (hardware memory virtualization) setting for the virtual machine. One of
automatic
,on
, oroff
. Default:automatic
.- extra_
config Mapping[str, str] Extra configuration data for the virtual machine. Can be used to supply advanced parameters not normally in configuration, such as instance metadata and userdata.
NOTE: Do not use
extra_config
when working with a template imported from OVF/OVA as your settings may be ignored. Use thevapp
blockproperties
section as described in Using vApp Properties for OVF/OVA Configuration.- extra_
config_ boolreboot_ required Allow the virtual machine to be rebooted when a change to
extra_config
occurs. Default:true
.- firmware str
The firmware for the virtual machine. One of
bios
orefi
.- folder str
The path to the virtual machine folder in which to place the virtual machine, relative to the datacenter path (
/<datacenter-name>/vm
). For example,/dc-01/vm/foo
- force_
power_ booloff If a guest shutdown failed or times 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. Default:
otherGuest64
.- guest_
ip_ Sequence[str]addresses 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 virtul machine is powered off, this list will be empty.- hardware_
version int The hardware version number. Valid range is from 4 to 21. The hardware version cannot be downgraded. See virtual machine hardware versions and compatibility for more information on supported settings.
- host_
system_ strid The managed object reference ID of a host on which to place the virtual machine. See the section on virtual machine migration for more information on modifying this value. When using a vSphere cluster, if a
host_system_id
is not supplied, vSphere will select a host in the cluster to place the virtual machine, according to any defaults or vSphere DRS placement policies.- hv_
mode str The hardware virtualization (non-nested) setting for the virtual machine. One of
hvAuto
,hvOn
, orhvOff
. Default:hvAuto
.- ide_
controller_ intcount The number of IDE controllers that the virtual machine. This directly affects the number 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:
2
.- ignored_
guest_ Sequence[str]ips 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 so that the waiter will continue to wait for a valid IP address. Default:
[]
.- imported bool
Indicates if the virtual machine resource has been imported, or if 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. One of
low
,normal
,medium
, orhigh
.NOTE: On higher sensitivities, you may need to adjust the
memory_reservation
to the full amount of memory provisioned for the virtual machine.- memory int
The memory size to assign to the virtual machine, in MB. Default:
1024
(1 GB).- memory_
hot_ booladd_ enabled Allow memory to be added to the virtual machine while it is powered on.
NOTE: CPU and memory hot add options are not available on all guest operating systems. Please refer to the VMware Guest OS Compatibility Guide to which settings are allow for your guest operating system. In addition, at least one
pulumi up
must be run before you are able to use CPU and memory hot add.NOTE: For Linux 64-bit guest operating systems with less than or equal to 3GB, the virtual machine must powered off to add memory beyond 3GB. Subsequent hot add of memory does not require the virtual machine to be powered-off to apply the plan. Please refer to VMware KB 2008405.
- memory_
limit int The maximum amount of memory (in MB) that th virtual machine can consume, regardless of available resources. The default is no limit.
- memory_
reservation int The amount of memory (in MB) that the virtual machine is guaranteed. The default is no reservation.
- int
The number of memory shares allocated to the virtual machine when the
memory_share_level
iscustom
.- str
The allocation level for the virtual machine memory resources. One of
high
,low
,normal
, orcustom
. Default:custom
.- migrate_
wait_ inttimeout The amount of time, in minutes, to wait for a virtual machine migration to complete before failing. Default:
10
minutes. See the section on virtual machine migration for more information.- moid str
The managed object reference ID of the created virtual machine.
- name str
The name of the virtual machine.
- nested_
hv_ boolenabled Enable nested hardware virtualization on the virtual machine, facilitating nested virtualization in the guest operating system. Default:
false
.- network_
interfaces Sequence[VirtualMachine Network Interface Args] A specification for a virtual NIC on the virtual machine. See network interface options for more information.
- num_
cores_ intper_ socket The number of cores per socket in the virtual machine. The number of vCPUs on the virtual machine will be
num_cpus
divided bynum_cores_per_socket
. If specified, the value supplied tonum_cpus
must be evenly divisible by this value. Default:1
.- num_
cpus int The total number of virtual processor cores to assign to the virtual machine. Default:
1
.- ovf_
deploy VirtualMachine Ovf Deploy Args When specified, the virtual machine will be deployed from the provided OVF/OVA template. See creating a virtual machine from an OVF/OVA template for more information.
- pci_
device_ Sequence[str]ids List of host PCI device IDs in which to create PCI passthroughs.
NOTE: Cloning requires vCenter Server and is not supported on direct ESXi host connections.
- power_
state str A computed value for the current power state of the virtual machine. One of
on
,off
, orsuspended
.- 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 Terraform used to determine if a configuration set change requires a reboot.
- replace_
trigger str Triggers replacement of resource whenever it changes.
For example,
replace_trigger = sha256(format("%s-%s",data.template_file.cloud_init_metadata.rendered,data.template_file.cloud_init_userdata.rendered))
will fingerprint the changes in cloud-init metadata and userdata templates. This will enable a replacement of the resource whenever the dependant template renders a new configuration. (Forces a replacement.)- resource_
pool_ strid The managed object reference ID of the resource pool in which to place the virtual machine. See the Virtual Machine Migration section for more information on modifying this value.
NOTE: All clusters and standalone hosts have a default root resource pool. This resource argument does not directly accept the cluster or standalone host resource. For more information, see the section on specifying the Root Resource Pool in the
vsphere.ResourcePool
data source documentation on using the root resource pool.- run_
tools_ boolscripts_ after_ power_ on Enable post-power-on scripts to run when VMware Tools is installed. Default:
true
.- run_
tools_ boolscripts_ after_ resume Enable ost-resume scripts to run when VMware Tools is installed. Default:
true
.- run_
tools_ boolscripts_ before_ guest_ reboot Enable pre-reboot scripts to run when VMware Tools is installed. Default:
false
.- run_
tools_ boolscripts_ before_ guest_ shutdown Enable pre-shutdown scripts to run when VMware Tools is installed. Default:
true
.- run_
tools_ boolscripts_ before_ guest_ standby Enable pre-standby scripts to run when VMware Tools is installed. Default:
true
.- sata_
controller_ intcount 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_ strsharing The type of SCSI bus sharing for the virtual machine SCSI controller. One of
physicalSharing
,virtualSharing
, andnoSharing
. Default:noSharing
.- scsi_
controller_ intcount The number of SCSI 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_
type str The SCSI controller type for the virtual machine. One of
lsilogic
(LSI Logic Parallel),lsilogic-sas
(LSI Logic SAS) orpvscsi
(VMware Paravirtual). Default:pvscsi
.- shutdown_
wait_ inttimeout 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 totrue
, the virtual machine will be forced to power-off after the timeout, otherwise an error is returned. Default:3
minutes.- storage_
policy_ strid The UUID of the storage policy to assign to the virtual disk.
- swap_
placement_ strpolicy The swap file placement policy for the virtual machine. One of
inherit
,hostLocal
, orvmDirectory
. Default:inherit
.- sync_
time_ boolwith_ host Enable the guest operating system to synchronization its clock with the host when the virtual machine is powered on or resumed. Requires vSphere 7.0 Update 1 and later. Requires VMware Tools to be installed. Default:
false
.- sync_
time_ boolwith_ host_ periodically Enable the guest operating system to periodically synchronize its clock with the host. Requires vSphere 7.0 Update 1 and later. On previous versions, setting
sync_time_with_host
is will enable periodic synchronization. Requires VMware Tools to be installed. Default:false
.- Sequence[str]
The IDs of any tags to attach to this resource. Please refer to the
vsphere.Tag
resource for more information on applying tags to virtual machine resources.NOTE: Tagging support is unsupported on direct ESXi host connections and requires vCenter Server instance.
- tools_
upgrade_ strpolicy Enable automatic upgrade of the VMware Tools version when the virtual machine is rebooted. If necessary, VMware Tools is upgraded to the latest version supported by the host on which the virtual machine is running. Requires VMware Tools to be installed. One of
manual
orupgradeAtPowerCycle
. Default:manual
.- uuid str
The UUID of the virtual disk VMDK file. This is used to track the virtual disk on the virtual machine.
- vapp
Virtual
Machine Vapp Args Used for vApp configurations. The only sub-key available is
properties
, which is a key/value map of properties for virtual machines imported from and OVF/OVA. See Using vApp Properties for OVF/OVA Configuration for more information.- 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.
- vbs_
enabled bool Enable Virtualization Based Security. Requires
firmware
to beefi
. In addition,vvtd_enabled
,nested_hv_enabled
, andefi_secure_boot_enabled
must all have a value oftrue
. Supported on vSphere 6.7 and later. Default:false
.- vmware_
tools_ strstatus 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 configuration file on the datastore in which the virtual machine is placed.
- vvtd_
enabled bool Enable Intel Virtualization Technology for Directed I/O for the virtual machine (I/O MMU in the vSphere Client). Supported on vSphere 6.7 and later. Default:
false
.- wait_
for_ intguest_ ip_ timeout The amount of time, in minutes, to wait for an available guest IP address on the virtual machine. This should only be used if the version VMware Tools does not allow the
wait_for_guest_net_timeout
waiter to be used. A value less than1
disables the waiter. Default:0
.- wait_
for_ boolguest_ net_ routable 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 thewait_for_guest_ip_timeout
waiter is used. Default:true
.- wait_
for_ intguest_ net_ timeout The amount of time, in minutes, to wait for an available guest IP address on the virtual machine. 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 than1
disables the waiter. Default:5
minutes.
- alternate
Guest StringName The guest name for the operating system when
guest_id
isotherGuest
orotherGuest64
.- annotation String
A user-provided description of the virtual machine.
- boot
Delay Number The number of milliseconds to wait before starting the boot sequence. The default is no delay.
- boot
Retry NumberDelay The number of milliseconds to wait before retrying the boot sequence. This option is only valid if
boot_retry_enabled
istrue
. Default:10000
(10 seconds).- boot
Retry BooleanEnabled If set to
true
, a virtual machine that fails to boot will try again after the delay defined inboot_retry_delay
. Default:false
.- cdroms List<Property Map>
A specification for a CD-ROM device on the virtual machine. See CD-ROM options for more information.
- change
Version String A unique identifier for a given version of the last configuration was applied.
- clone Property Map
When specified, the virtual machine will be created as a clone of a specified template. Optional customization options can be submitted for the resource. See creating a virtual machine from a template for more information.
- cpu
Hot BooleanAdd Enabled Allow CPUs to be added to the virtual machine while it is powered on.
- cpu
Hot BooleanRemove Enabled Allow CPUs to be removed to the virtual machine while it is powered on.
- cpu
Limit Number The maximum amount of CPU (in MHz) that the virtual machine can consume, regardless of available resources. The default is no limit.
- cpu
Performance BooleanCounters Enabled Enable CPU performance counters on the virtual machine. Default:
false
.- cpu
Reservation Number The amount of CPU (in MHz) that the virtual machine is guaranteed. The default is no reservation.
- Number
The number of CPU shares allocated to the virtual machine when the
cpu_share_level
iscustom
.- String
The allocation level for the virtual machine CPU resources. One of
high
,low
,normal
, orcustom
. Default:custom
.- custom
Attributes Map<String> Map of custom attribute ids to attribute value strings to set for virtual machine. Please refer to the
vsphere_custom_attributes
resource for more information on setting custom attributes.NOTE: Custom attributes requires vCenter Server and is not supported on direct ESXi host connections.
- datacenter
Id String The datacenter ID. Required only when deploying an OVF/OVA template.
- datastore
Cluster StringId The managed object reference ID of the datastore cluster in which to place the virtual machine. This setting applies to entire virtual machine and implies that you wish to use vSphere Storage DRS with the virtual machine. See the section on virtual machine migration for more information on modifying this value.
NOTE: One of
datastore_id
ordatastore_cluster_id
must be specified.NOTE: Use of
datastore_cluster_id
requires vSphere Storage DRS to be enabled on the specified datastore cluster.NOTE: The
datastore_cluster_id
setting applies to the entire virtual machine resource. You cannot assign individual individual disks to datastore clusters. In addition, you cannot use theattach
setting to attach external disks on virtual machines that are assigned to datastore clusters.- datastore
Id String The datastore ID that on which the ISO is located. Required for using a datastore ISO. Conflicts with
client_device
.- default
Ip StringAddress The IP address selected by the provider to be used with any provisioners configured on this resource. When 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 exists. If VMware Tools is not running on the virtual machine, or if the virtual machine is powered off, this value will be blank.
- disks List<Property Map>
A specification for a virtual disk device on the virtual machine. See disk options for more information.
- efi
Secure BooleanBoot Enabled Use this option to enable EFI secure boot when the
firmware
type is set to isefi
. Default:false
.NOTE: EFI secure boot is only available on vSphere 6.5 and later.
- enable
Disk BooleanUuid Expose the UUIDs of attached virtual disks to the virtual machine, allowing access to them in the guest. Default:
false
.- enable
Logging Boolean Enable logging of virtual machine events to a log file stored in the virtual machine directory. Default:
false
.- ept
Rvi StringMode The EPT/RVI (hardware memory virtualization) setting for the virtual machine. One of
automatic
,on
, oroff
. Default:automatic
.- extra
Config Map<String> Extra configuration data for the virtual machine. Can be used to supply advanced parameters not normally in configuration, such as instance metadata and userdata.
NOTE: Do not use
extra_config
when working with a template imported from OVF/OVA as your settings may be ignored. Use thevapp
blockproperties
section as described in Using vApp Properties for OVF/OVA Configuration.- extra
Config BooleanReboot Required Allow the virtual machine to be rebooted when a change to
extra_config
occurs. Default:true
.- firmware String
The firmware for the virtual machine. One of
bios
orefi
.- folder String
The path to the virtual machine folder in which to place the virtual machine, relative to the datacenter path (
/<datacenter-name>/vm
). For example,/dc-01/vm/foo
- force
Power BooleanOff If a guest shutdown failed or times out while updating or destroying (see
shutdown_wait_timeout
), force the power-off of the virtual machine. Default:true
.- guest
Id String The guest ID for the operating system type. For a full list of possible values, see here. Default:
otherGuest64
.- guest
Ip List<String>Addresses 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 virtul machine is powered off, this list will be empty.- hardware
Version Number The hardware version number. Valid range is from 4 to 21. The hardware version cannot be downgraded. See virtual machine hardware versions and compatibility for more information on supported settings.
- host
System StringId The managed object reference ID of a host on which to place the virtual machine. See the section on virtual machine migration for more information on modifying this value. When using a vSphere cluster, if a
host_system_id
is not supplied, vSphere will select a host in the cluster to place the virtual machine, according to any defaults or vSphere DRS placement policies.- hv
Mode String The hardware virtualization (non-nested) setting for the virtual machine. One of
hvAuto
,hvOn
, orhvOff
. Default:hvAuto
.- ide
Controller NumberCount The number of IDE controllers that the virtual machine. This directly affects the number 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:
2
.- ignored
Guest List<String>Ips 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 so that the waiter will continue to wait for a valid IP address. Default:
[]
.- imported Boolean
Indicates if the virtual machine resource has been imported, or if 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 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. One of
low
,normal
,medium
, orhigh
.NOTE: On higher sensitivities, you may need to adjust the
memory_reservation
to the full amount of memory provisioned for the virtual machine.- memory Number
The memory size to assign to the virtual machine, in MB. Default:
1024
(1 GB).- memory
Hot BooleanAdd Enabled Allow memory to be added to the virtual machine while it is powered on.
NOTE: CPU and memory hot add options are not available on all guest operating systems. Please refer to the VMware Guest OS Compatibility Guide to which settings are allow for your guest operating system. In addition, at least one
pulumi up
must be run before you are able to use CPU and memory hot add.NOTE: For Linux 64-bit guest operating systems with less than or equal to 3GB, the virtual machine must powered off to add memory beyond 3GB. Subsequent hot add of memory does not require the virtual machine to be powered-off to apply the plan. Please refer to VMware KB 2008405.
- memory
Limit Number The maximum amount of memory (in MB) that th virtual machine can consume, regardless of available resources. The default is no limit.
- memory
Reservation Number The amount of memory (in MB) that the virtual machine is guaranteed. The default is no reservation.
- Number
The number of memory shares allocated to the virtual machine when the
memory_share_level
iscustom
.- String
The allocation level for the virtual machine memory resources. One of
high
,low
,normal
, orcustom
. Default:custom
.- migrate
Wait NumberTimeout The amount of time, in minutes, to wait for a virtual machine migration to complete before failing. Default:
10
minutes. See the section on virtual machine migration for more information.- moid String
The managed object reference ID of the created virtual machine.
- name String
The name of the virtual machine.
- nested
Hv BooleanEnabled Enable nested hardware virtualization on the virtual machine, facilitating nested virtualization in the guest operating system. Default:
false
.- network
Interfaces List<Property Map> A specification for a virtual NIC on the virtual machine. See network interface options for more information.
- num
Cores NumberPer Socket The number of cores per socket in the virtual machine. The number of vCPUs on the virtual machine will be
num_cpus
divided bynum_cores_per_socket
. If specified, the value supplied tonum_cpus
must be evenly divisible by this value. Default:1
.- num
Cpus Number The total number of virtual processor cores to assign to the virtual machine. Default:
1
.- ovf
Deploy Property Map When specified, the virtual machine will be deployed from the provided OVF/OVA template. See creating a virtual machine from an OVF/OVA template for more information.
- pci
Device List<String>Ids List of host PCI device IDs in which to create PCI passthroughs.
NOTE: Cloning requires vCenter Server and is not supported on direct ESXi host connections.
- power
State String A computed value for the current power state of the virtual machine. One of
on
,off
, orsuspended
.- poweron
Timeout Number The amount of time, in seconds, that we will be trying to power on a VM
- reboot
Required Boolean Value internal to Terraform used to determine if a configuration set change requires a reboot.
- replace
Trigger String Triggers replacement of resource whenever it changes.
For example,
replace_trigger = sha256(format("%s-%s",data.template_file.cloud_init_metadata.rendered,data.template_file.cloud_init_userdata.rendered))
will fingerprint the changes in cloud-init metadata and userdata templates. This will enable a replacement of the resource whenever the dependant template renders a new configuration. (Forces a replacement.)- resource
Pool StringId The managed object reference ID of the resource pool in which to place the virtual machine. See the Virtual Machine Migration section for more information on modifying this value.
NOTE: All clusters and standalone hosts have a default root resource pool. This resource argument does not directly accept the cluster or standalone host resource. For more information, see the section on specifying the Root Resource Pool in the
vsphere.ResourcePool
data source documentation on using the root resource pool.- run
Tools BooleanScripts After Power On Enable post-power-on scripts to run when VMware Tools is installed. Default:
true
.- run
Tools BooleanScripts After Resume Enable ost-resume scripts to run when VMware Tools is installed. Default:
true
.- run
Tools BooleanScripts Before Guest Reboot Enable pre-reboot scripts to run when VMware Tools is installed. Default:
false
.- run
Tools BooleanScripts Before Guest Shutdown Enable pre-shutdown scripts to run when VMware Tools is installed. Default:
true
.- run
Tools BooleanScripts Before Guest Standby Enable pre-standby scripts to run when VMware Tools is installed. Default:
true
.- sata
Controller NumberCount 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 StringSharing The type of SCSI bus sharing for the virtual machine SCSI controller. One of
physicalSharing
,virtualSharing
, andnoSharing
. Default:noSharing
.- scsi
Controller NumberCount The number of SCSI 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
Type String The SCSI controller type for the virtual machine. One of
lsilogic
(LSI Logic Parallel),lsilogic-sas
(LSI Logic SAS) orpvscsi
(VMware Paravirtual). Default:pvscsi
.- shutdown
Wait NumberTimeout 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 totrue
, the virtual machine will be forced to power-off after the timeout, otherwise an error is returned. Default:3
minutes.- storage
Policy StringId The UUID of the storage policy to assign to the virtual disk.
- swap
Placement StringPolicy The swap file placement policy for the virtual machine. One of
inherit
,hostLocal
, orvmDirectory
. Default:inherit
.- sync
Time BooleanWith Host Enable the guest operating system to synchronization its clock with the host when the virtual machine is powered on or resumed. Requires vSphere 7.0 Update 1 and later. Requires VMware Tools to be installed. Default:
false
.- sync
Time BooleanWith Host Periodically Enable the guest operating system to periodically synchronize its clock with the host. Requires vSphere 7.0 Update 1 and later. On previous versions, setting
sync_time_with_host
is will enable periodic synchronization. Requires VMware Tools to be installed. Default:false
.- List<String>
The IDs of any tags to attach to this resource. Please refer to the
vsphere.Tag
resource for more information on applying tags to virtual machine resources.NOTE: Tagging support is unsupported on direct ESXi host connections and requires vCenter Server instance.
- tools
Upgrade StringPolicy Enable automatic upgrade of the VMware Tools version when the virtual machine is rebooted. If necessary, VMware Tools is upgraded to the latest version supported by the host on which the virtual machine is running. Requires VMware Tools to be installed. One of
manual
orupgradeAtPowerCycle
. Default:manual
.- uuid String
The UUID of the virtual disk VMDK file. This is used to track the virtual disk on the virtual machine.
- vapp Property Map
Used for vApp configurations. The only sub-key available is
properties
, which is a key/value map of properties for virtual machines imported from and OVF/OVA. See Using vApp Properties for OVF/OVA Configuration for more information.- vapp
Transports 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.
- vbs
Enabled Boolean Enable Virtualization Based Security. Requires
firmware
to beefi
. In addition,vvtd_enabled
,nested_hv_enabled
, andefi_secure_boot_enabled
must all have a value oftrue
. Supported on vSphere 6.7 and later. Default:false
.- vmware
Tools StringStatus The state of VMware Tools in the guest. This will determine the proper course of action for some device operations.
- vmx
Path String The path of the virtual machine configuration file on the datastore in which the virtual machine is placed.
- vvtd
Enabled Boolean Enable Intel Virtualization Technology for Directed I/O for the virtual machine (I/O MMU in the vSphere Client). Supported on vSphere 6.7 and later. Default:
false
.- wait
For NumberGuest Ip Timeout The amount of time, in minutes, to wait for an available guest IP address on the virtual machine. This should only be used if the version VMware Tools does not allow the
wait_for_guest_net_timeout
waiter to be used. A value less than1
disables the waiter. Default:0
.- wait
For BooleanGuest Net Routable 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 thewait_for_guest_ip_timeout
waiter is used. Default:true
.- wait
For NumberGuest Net Timeout The amount of time, in minutes, to wait for an available guest IP address on the virtual machine. 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 than1
disables the waiter. Default:5
minutes.
Supporting Types
VirtualMachineCdrom, VirtualMachineCdromArgs
- Client
Device bool Indicates whether the device should be backed by remote client device. Conflicts with
datastore_id
andpath
.- Datastore
Id string The datastore ID that on which the ISO is located. Required for using a datastore ISO. Conflicts with
client_device
.- Device
Address string - 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
.NOTE: Either
client_device
(for a remote backed CD-ROM) ordatastore_id
andpath
(for a datastore ISO backed CD-ROM) are required to .NOTE: Some CD-ROM drive types are not supported by this resource, such as pass-through devices. If these drives are present in a cloned template, or added outside of the provider, the desired state will be corrected to the defined device, or removed if no
cdrom
block is present.
- Client
Device bool Indicates whether the device should be backed by remote client device. Conflicts with
datastore_id
andpath
.- Datastore
Id string The datastore ID that on which the ISO is located. Required for using a datastore ISO. Conflicts with
client_device
.- Device
Address string - 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
.NOTE: Either
client_device
(for a remote backed CD-ROM) ordatastore_id
andpath
(for a datastore ISO backed CD-ROM) are required to .NOTE: Some CD-ROM drive types are not supported by this resource, such as pass-through devices. If these drives are present in a cloned template, or added outside of the provider, the desired state will be corrected to the defined device, or removed if no
cdrom
block is present.
- client
Device Boolean Indicates whether the device should be backed by remote client device. Conflicts with
datastore_id
andpath
.- datastore
Id String The datastore ID that on which the ISO is located. Required for using a datastore ISO. Conflicts with
client_device
.- device
Address String - key Integer
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
.NOTE: Either
client_device
(for a remote backed CD-ROM) ordatastore_id
andpath
(for a datastore ISO backed CD-ROM) are required to .NOTE: Some CD-ROM drive types are not supported by this resource, such as pass-through devices. If these drives are present in a cloned template, or added outside of the provider, the desired state will be corrected to the defined device, or removed if no
cdrom
block is present.
- client
Device boolean Indicates whether the device should be backed by remote client device. Conflicts with
datastore_id
andpath
.- datastore
Id string The datastore ID that on which the ISO is located. Required for using a datastore ISO. Conflicts with
client_device
.- device
Address string - 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
.NOTE: Either
client_device
(for a remote backed CD-ROM) ordatastore_id
andpath
(for a datastore ISO backed CD-ROM) are required to .NOTE: Some CD-ROM drive types are not supported by this resource, such as pass-through devices. If these drives are present in a cloned template, or added outside of the provider, the desired state will be corrected to the defined device, or removed if no
cdrom
block is present.
- client_
device bool Indicates whether the device should be backed by remote client device. Conflicts with
datastore_id
andpath
.- datastore_
id str The datastore ID that on which the ISO is located. Required for using a datastore ISO. Conflicts with
client_device
.- device_
address str - 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
.NOTE: Either
client_device
(for a remote backed CD-ROM) ordatastore_id
andpath
(for a datastore ISO backed CD-ROM) are required to .NOTE: Some CD-ROM drive types are not supported by this resource, such as pass-through devices. If these drives are present in a cloned template, or added outside of the provider, the desired state will be corrected to the defined device, or removed if no
cdrom
block is present.
- client
Device Boolean Indicates whether the device should be backed by remote client device. Conflicts with
datastore_id
andpath
.- datastore
Id String The datastore ID that on which the ISO is located. Required for using a datastore ISO. Conflicts with
client_device
.- device
Address String - 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
.NOTE: Either
client_device
(for a remote backed CD-ROM) ordatastore_id
andpath
(for a datastore ISO backed CD-ROM) are required to .NOTE: Some CD-ROM drive types are not supported by this resource, such as pass-through devices. If these drives are present in a cloned template, or added outside of the provider, the desired state will be corrected to the defined device, or removed if no
cdrom
block is present.
VirtualMachineClone, VirtualMachineCloneArgs
- Template
Uuid string - Customization
Spec Pulumi.VSphere. Inputs. Virtual Machine Clone Customization Spec - Customize
Pulumi.
VSphere. Inputs. Virtual Machine Clone Customize - Linked
Clone bool - Ovf
Network Dictionary<string, string>Map - Ovf
Storage Dictionary<string, string>Map - Timeout int
- Template
Uuid string - Customization
Spec VirtualMachine Clone Customization Spec - Customize
Virtual
Machine Clone Customize - Linked
Clone bool - Ovf
Network map[string]stringMap - Ovf
Storage map[string]stringMap - Timeout int
- template
Uuid String - customization
Spec VirtualMachine Clone Customization Spec - customize
Virtual
Machine Clone Customize - linked
Clone Boolean - ovf
Network Map<String,String>Map - ovf
Storage Map<String,String>Map - timeout Integer
- template
Uuid string - customization
Spec VirtualMachine Clone Customization Spec - customize
Virtual
Machine Clone Customize - linked
Clone boolean - ovf
Network {[key: string]: string}Map - ovf
Storage {[key: string]: string}Map - timeout number
- template_
uuid str - customization_
spec VirtualMachine Clone Customization Spec - customize
Virtual
Machine Clone Customize - linked_
clone bool - ovf_
network_ Mapping[str, str]map - ovf_
storage_ Mapping[str, str]map - timeout int
- template
Uuid String - customization
Spec Property Map - customize Property Map
- linked
Clone Boolean - ovf
Network Map<String>Map - ovf
Storage Map<String>Map - timeout Number
VirtualMachineCloneCustomizationSpec, VirtualMachineCloneCustomizationSpecArgs
VirtualMachineCloneCustomize, VirtualMachineCloneCustomizeArgs
- Dns
Server List<string>Lists - Dns
Suffix List<string>Lists - Ipv4Gateway string
- Ipv6Gateway string
- Linux
Options Pulumi.VSphere. Inputs. Virtual Machine Clone Customize Linux Options - Network
Interfaces List<Pulumi.VSphere. Inputs. Virtual Machine Clone Customize Network Interface> A specification for a virtual NIC on the virtual machine. See network interface options for more information.
- Timeout int
- Windows
Options Pulumi.VSphere. Inputs. Virtual Machine Clone Customize Windows Options - Windows
Sysprep stringText
- Dns
Server []stringLists - Dns
Suffix []stringLists - Ipv4Gateway string
- Ipv6Gateway string
- Linux
Options VirtualMachine Clone Customize Linux Options - Network
Interfaces []VirtualMachine Clone Customize Network Interface A specification for a virtual NIC on the virtual machine. See network interface options for more information.
- Timeout int
- Windows
Options VirtualMachine Clone Customize Windows Options - Windows
Sysprep stringText
- dns
Server List<String>Lists - dns
Suffix List<String>Lists - ipv4Gateway String
- ipv6Gateway String
- linux
Options VirtualMachine Clone Customize Linux Options - network
Interfaces List<VirtualMachine Clone Customize Network Interface> A specification for a virtual NIC on the virtual machine. See network interface options for more information.
- timeout Integer
- windows
Options VirtualMachine Clone Customize Windows Options - windows
Sysprep StringText
- dns
Server string[]Lists - dns
Suffix string[]Lists - ipv4Gateway string
- ipv6Gateway string
- linux
Options VirtualMachine Clone Customize Linux Options - network
Interfaces VirtualMachine Clone Customize Network Interface[] A specification for a virtual NIC on the virtual machine. See network interface options for more information.
- timeout number
- windows
Options VirtualMachine Clone Customize Windows Options - windows
Sysprep stringText
- dns_
server_ Sequence[str]lists - dns_
suffix_ Sequence[str]lists - ipv4_
gateway str - ipv6_
gateway str - linux_
options VirtualMachine Clone Customize Linux Options - network_
interfaces Sequence[VirtualMachine Clone Customize Network Interface] A specification for a virtual NIC on the virtual machine. See network interface options for more information.
- timeout int
- windows_
options VirtualMachine Clone Customize Windows Options - windows_
sysprep_ strtext
- dns
Server List<String>Lists - dns
Suffix List<String>Lists - ipv4Gateway String
- ipv6Gateway String
- linux
Options Property Map - network
Interfaces List<Property Map> A specification for a virtual NIC on the virtual machine. See network interface options for more information.
- timeout Number
- windows
Options Property Map - windows
Sysprep StringText
VirtualMachineCloneCustomizeLinuxOptions, VirtualMachineCloneCustomizeLinuxOptionsArgs
- Domain string
- Host
Name string - Hw
Clock boolUtc - Script
Text string - Time
Zone string
- Domain string
- Host
Name string - Hw
Clock boolUtc - Script
Text string - Time
Zone string
- domain String
- host
Name String - hw
Clock BooleanUtc - script
Text String - time
Zone String
- domain string
- host
Name string - hw
Clock booleanUtc - script
Text string - time
Zone string
- domain str
- host_
name str - hw_
clock_ boolutc - script_
text str - time_
zone str
- domain String
- host
Name String - hw
Clock BooleanUtc - script
Text String - time
Zone String
VirtualMachineCloneCustomizeNetworkInterface, VirtualMachineCloneCustomizeNetworkInterfaceArgs
- Dns
Domain string - Dns
Server List<string>Lists - Ipv4Address string
- Ipv4Netmask int
- Ipv6Address string
- Ipv6Netmask int
- Dns
Domain string - Dns
Server []stringLists - Ipv4Address string
- Ipv4Netmask int
- Ipv6Address string
- Ipv6Netmask int
- dns
Domain String - dns
Server List<String>Lists - ipv4Address String
- ipv4Netmask Integer
- ipv6Address String
- ipv6Netmask Integer
- dns
Domain string - dns
Server string[]Lists - ipv4Address string
- ipv4Netmask number
- ipv6Address string
- ipv6Netmask number
- dns_
domain str - dns_
server_ Sequence[str]lists - ipv4_
address str - ipv4_
netmask int - ipv6_
address str - ipv6_
netmask int
- dns
Domain String - dns
Server List<String>Lists - ipv4Address String
- ipv4Netmask Number
- ipv6Address String
- ipv6Netmask Number
VirtualMachineCloneCustomizeWindowsOptions, VirtualMachineCloneCustomizeWindowsOptionsArgs
- Computer
Name string - Admin
Password string - Auto
Logon bool - Auto
Logon intCount - Domain
Admin stringPassword - Domain
Admin stringUser - Full
Name string - Join
Domain string - Organization
Name string - Product
Key string - Run
Once List<string>Command Lists - Time
Zone int - Workgroup string
- Computer
Name string - Admin
Password string - Auto
Logon bool - Auto
Logon intCount - Domain
Admin stringPassword - Domain
Admin stringUser - Full
Name string - Join
Domain string - Organization
Name string - Product
Key string - Run
Once []stringCommand Lists - Time
Zone int - Workgroup string
- computer
Name String - admin
Password String - auto
Logon Boolean - auto
Logon IntegerCount - domain
Admin StringPassword - domain
Admin StringUser - full
Name String - join
Domain String - organization
Name String - product
Key String - run
Once List<String>Command Lists - time
Zone Integer - workgroup String
- computer
Name string - admin
Password string - auto
Logon boolean - auto
Logon numberCount - domain
Admin stringPassword - domain
Admin stringUser - full
Name string - join
Domain string - organization
Name string - product
Key string - run
Once string[]Command Lists - time
Zone number - workgroup string
- computer_
name str - admin_
password str - auto_
logon bool - auto_
logon_ intcount - domain_
admin_ strpassword - domain_
admin_ struser - full_
name str - join_
domain str - organization_
name str - product_
key str - run_
once_ Sequence[str]command_ lists - time_
zone int - workgroup str
- computer
Name String - admin
Password String - auto
Logon Boolean - auto
Logon NumberCount - domain
Admin StringPassword - domain
Admin StringUser - full
Name String - join
Domain String - organization
Name String - product
Key String - run
Once List<String>Command Lists - time
Zone Number - workgroup String
VirtualMachineDisk, VirtualMachineDiskArgs
- Label string
- Attach bool
Attach an external disk instead of creating a new one. Implies and conflicts with
keep_on_remove
. If set, you cannot setsize
,eagerly_scrub
, orthin_provisioned
. Must setpath
if used.NOTE: External disks cannot be attached when
datastore_cluster_id
is used.- Controller
Type string The type of storage controller to attach the disk to. Can be
scsi
,sata
, oride
. You must have the appropriate number of controllers enabled for the selected type. Defaultscsi
.- Datastore
Id string The datastore ID that on which the ISO is located. Required for using a datastore ISO. Conflicts with
client_device
.- Device
Address string - Disk
Mode string The mode of this this virtual disk for purposes of writes and snapshots. One of
append
,independent_nonpersistent
,independent_persistent
,nonpersistent
,persistent
, orundoable
. Default:persistent
. For more information on these option, please refer to the product documentation.- Disk
Sharing string The sharing mode of this virtual disk. One of
sharingMultiWriter
orsharingNone
. Default:sharingNone
.NOTE: Disk sharing is only available on vSphere 6.0 and later.
- Eagerly
Scrub bool If set to
true
, the disk space is zeroed out when the virtual machine is created. This will delay the creation of the virtual disk. Cannot be set totrue
whenthin_provisioned
istrue
. See the section on picking a disk type for more information. 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) for the virtual disk has, in IOPS. The default is no reservation.
- int
The share count for the virtual disk when the share level is
custom
.- string
The share allocation level for the virtual disk. One of
low
,normal
,high
, orcustom
. Default:normal
.- Keep
On boolRemove 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.
- Path string
The path to the ISO file. Required for using a datastore ISO. Conflicts with
client_device
.NOTE: Either
client_device
(for a remote backed CD-ROM) ordatastore_id
andpath
(for a datastore ISO backed CD-ROM) are required to .NOTE: Some CD-ROM drive types are not supported by this resource, such as pass-through devices. If these drives are present in a cloned template, or added outside of the provider, the desired state will be corrected to the defined device, or removed if no
cdrom
block is present.- Size int
The size of the disk, in GB. Must be a whole number.
- Storage
Policy stringId The UUID of the storage policy to assign to the virtual disk.
- Thin
Provisioned bool If
true
, the disk is thin provisioned, with space for the file being allocated on an as-needed basis. Cannot be set totrue
wheneagerly_scrub
istrue
. See the section on selecting a disk type for more information. 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). Duplicate unit numbers are not allowed. Default
0
, for which one disk must be set to.- Uuid string
The UUID of the virtual disk 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
.
- Label string
- Attach bool
Attach an external disk instead of creating a new one. Implies and conflicts with
keep_on_remove
. If set, you cannot setsize
,eagerly_scrub
, orthin_provisioned
. Must setpath
if used.NOTE: External disks cannot be attached when
datastore_cluster_id
is used.- Controller
Type string The type of storage controller to attach the disk to. Can be
scsi
,sata
, oride
. You must have the appropriate number of controllers enabled for the selected type. Defaultscsi
.- Datastore
Id string The datastore ID that on which the ISO is located. Required for using a datastore ISO. Conflicts with
client_device
.- Device
Address string - Disk
Mode string The mode of this this virtual disk for purposes of writes and snapshots. One of
append
,independent_nonpersistent
,independent_persistent
,nonpersistent
,persistent
, orundoable
. Default:persistent
. For more information on these option, please refer to the product documentation.- Disk
Sharing string The sharing mode of this virtual disk. One of
sharingMultiWriter
orsharingNone
. Default:sharingNone
.NOTE: Disk sharing is only available on vSphere 6.0 and later.
- Eagerly
Scrub bool If set to
true
, the disk space is zeroed out when the virtual machine is created. This will delay the creation of the virtual disk. Cannot be set totrue
whenthin_provisioned
istrue
. See the section on picking a disk type for more information. 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) for the virtual disk has, in IOPS. The default is no reservation.
- int
The share count for the virtual disk when the share level is
custom
.- string
The share allocation level for the virtual disk. One of
low
,normal
,high
, orcustom
. Default:normal
.- Keep
On boolRemove 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.
- Path string
The path to the ISO file. Required for using a datastore ISO. Conflicts with
client_device
.NOTE: Either
client_device
(for a remote backed CD-ROM) ordatastore_id
andpath
(for a datastore ISO backed CD-ROM) are required to .NOTE: Some CD-ROM drive types are not supported by this resource, such as pass-through devices. If these drives are present in a cloned template, or added outside of the provider, the desired state will be corrected to the defined device, or removed if no
cdrom
block is present.- Size int
The size of the disk, in GB. Must be a whole number.
- Storage
Policy stringId The UUID of the storage policy to assign to the virtual disk.
- Thin
Provisioned bool If
true
, the disk is thin provisioned, with space for the file being allocated on an as-needed basis. Cannot be set totrue
wheneagerly_scrub
istrue
. See the section on selecting a disk type for more information. 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). Duplicate unit numbers are not allowed. Default
0
, for which one disk must be set to.- Uuid string
The UUID of the virtual disk 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
.
- label String
- attach Boolean
Attach an external disk instead of creating a new one. Implies and conflicts with
keep_on_remove
. If set, you cannot setsize
,eagerly_scrub
, orthin_provisioned
. Must setpath
if used.NOTE: External disks cannot be attached when
datastore_cluster_id
is used.- controller
Type String The type of storage controller to attach the disk to. Can be
scsi
,sata
, oride
. You must have the appropriate number of controllers enabled for the selected type. Defaultscsi
.- datastore
Id String The datastore ID that on which the ISO is located. Required for using a datastore ISO. Conflicts with
client_device
.- device
Address String - disk
Mode String The mode of this this virtual disk for purposes of writes and snapshots. One of
append
,independent_nonpersistent
,independent_persistent
,nonpersistent
,persistent
, orundoable
. Default:persistent
. For more information on these option, please refer to the product documentation.- disk
Sharing String The sharing mode of this virtual disk. One of
sharingMultiWriter
orsharingNone
. Default:sharingNone
.NOTE: Disk sharing is only available on vSphere 6.0 and later.
- eagerly
Scrub Boolean If set to
true
, the disk space is zeroed out when the virtual machine is created. This will delay the creation of the virtual disk. Cannot be set totrue
whenthin_provisioned
istrue
. See the section on picking a disk type for more information. Default:false
.- io
Limit Integer The upper limit of IOPS that this disk can use. The default is no limit.
- io
Reservation Integer The I/O reservation (guarantee) for the virtual disk has, in IOPS. The default is no reservation.
- Integer
The share count for the virtual disk when the share level is
custom
.- String
The share allocation level for the virtual disk. One of
low
,normal
,high
, orcustom
. Default:normal
.- keep
On BooleanRemove Keep this disk when removing the device or destroying the virtual machine. Default:
false
.- key Integer
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
.NOTE: Either
client_device
(for a remote backed CD-ROM) ordatastore_id
andpath
(for a datastore ISO backed CD-ROM) are required to .NOTE: Some CD-ROM drive types are not supported by this resource, such as pass-through devices. If these drives are present in a cloned template, or added outside of the provider, the desired state will be corrected to the defined device, or removed if no
cdrom
block is present.- size Integer
The size of the disk, in GB. Must be a whole number.
- storage
Policy StringId The UUID of the storage policy to assign to the virtual disk.
- thin
Provisioned Boolean If
true
, the disk is thin provisioned, with space for the file being allocated on an as-needed basis. Cannot be set totrue
wheneagerly_scrub
istrue
. See the section on selecting a disk type for more information. Default:true
.- unit
Number Integer 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). Duplicate unit numbers are not allowed. Default
0
, for which one disk must be set to.- uuid String
The UUID of the virtual disk VMDK file. This is used to track the virtual disk on the virtual machine.
- write
Through Boolean If
true
, writes for this disk are sent directly to the filesystem immediately instead of being buffered. Default:false
.
- label string
- attach boolean
Attach an external disk instead of creating a new one. Implies and conflicts with
keep_on_remove
. If set, you cannot setsize
,eagerly_scrub
, orthin_provisioned
. Must setpath
if used.NOTE: External disks cannot be attached when
datastore_cluster_id
is used.- controller
Type string The type of storage controller to attach the disk to. Can be
scsi
,sata
, oride
. You must have the appropriate number of controllers enabled for the selected type. Defaultscsi
.- datastore
Id string The datastore ID that on which the ISO is located. Required for using a datastore ISO. Conflicts with
client_device
.- device
Address string - disk
Mode string The mode of this this virtual disk for purposes of writes and snapshots. One of
append
,independent_nonpersistent
,independent_persistent
,nonpersistent
,persistent
, orundoable
. Default:persistent
. For more information on these option, please refer to the product documentation.- disk
Sharing string The sharing mode of this virtual disk. One of
sharingMultiWriter
orsharingNone
. Default:sharingNone
.NOTE: Disk sharing is only available on vSphere 6.0 and later.
- eagerly
Scrub boolean If set to
true
, the disk space is zeroed out when the virtual machine is created. This will delay the creation of the virtual disk. Cannot be set totrue
whenthin_provisioned
istrue
. See the section on picking a disk type for more information. Default:false
.- io
Limit number The upper limit of IOPS that this disk can use. The default is no limit.
- io
Reservation number The I/O reservation (guarantee) for the virtual disk has, in IOPS. The default is no reservation.
- number
The share count for the virtual disk when the share level is
custom
.- string
The share allocation level for the virtual disk. One of
low
,normal
,high
, orcustom
. Default:normal
.- keep
On booleanRemove 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.
- path string
The path to the ISO file. Required for using a datastore ISO. Conflicts with
client_device
.NOTE: Either
client_device
(for a remote backed CD-ROM) ordatastore_id
andpath
(for a datastore ISO backed CD-ROM) are required to .NOTE: Some CD-ROM drive types are not supported by this resource, such as pass-through devices. If these drives are present in a cloned template, or added outside of the provider, the desired state will be corrected to the defined device, or removed if no
cdrom
block is present.- size number
The size of the disk, in GB. Must be a whole number.
- storage
Policy stringId The UUID of the storage policy to assign to the virtual disk.
- thin
Provisioned boolean If
true
, the disk is thin provisioned, with space for the file being allocated on an as-needed basis. Cannot be set totrue
wheneagerly_scrub
istrue
. See the section on selecting a disk type for more information. Default:true
.- unit
Number 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). Duplicate unit numbers are not allowed. Default
0
, for which one disk must be set to.- uuid string
The UUID of the virtual disk VMDK file. This is used to track the virtual disk on the virtual machine.
- write
Through boolean If
true
, writes for this disk are sent directly to the filesystem immediately instead of being buffered. Default:false
.
- label str
- attach bool
Attach an external disk instead of creating a new one. Implies and conflicts with
keep_on_remove
. If set, you cannot setsize
,eagerly_scrub
, orthin_provisioned
. Must setpath
if used.NOTE: External disks cannot be attached when
datastore_cluster_id
is used.- controller_
type str The type of storage controller to attach the disk to. Can be
scsi
,sata
, oride
. You must have the appropriate number of controllers enabled for the selected type. Defaultscsi
.- datastore_
id str The datastore ID that on which the ISO is located. Required for using a datastore ISO. Conflicts with
client_device
.- device_
address str - disk_
mode str The mode of this this virtual disk for purposes of writes and snapshots. One of
append
,independent_nonpersistent
,independent_persistent
,nonpersistent
,persistent
, orundoable
. Default:persistent
. For more information on these option, please refer to the product documentation.- disk_
sharing str The sharing mode of this virtual disk. One of
sharingMultiWriter
orsharingNone
. Default:sharingNone
.NOTE: Disk sharing is only available on vSphere 6.0 and later.
- eagerly_
scrub bool If set to
true
, the disk space is zeroed out when the virtual machine is created. This will delay the creation of the virtual disk. Cannot be set totrue
whenthin_provisioned
istrue
. See the section on picking a disk type for more information. 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) for the virtual disk has, in IOPS. The default is no reservation.
- int
The share count for the virtual disk when the share level is
custom
.- str
The share allocation level for the virtual disk. One of
low
,normal
,high
, orcustom
. Default:normal
.- keep_
on_ boolremove 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.
- path str
The path to the ISO file. Required for using a datastore ISO. Conflicts with
client_device
.NOTE: Either
client_device
(for a remote backed CD-ROM) ordatastore_id
andpath
(for a datastore ISO backed CD-ROM) are required to .NOTE: Some CD-ROM drive types are not supported by this resource, such as pass-through devices. If these drives are present in a cloned template, or added outside of the provider, the desired state will be corrected to the defined device, or removed if no
cdrom
block is present.- size int
The size of the disk, in GB. Must be a whole number.
- storage_
policy_ strid The UUID of the storage policy to assign to the virtual disk.
- thin_
provisioned bool If
true
, the disk is thin provisioned, with space for the file being allocated on an as-needed basis. Cannot be set totrue
wheneagerly_scrub
istrue
. See the section on selecting a disk type for more information. 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). Duplicate unit numbers are not allowed. Default
0
, for which one disk must be set to.- uuid str
The UUID of the virtual disk 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
.
- label String
- attach Boolean
Attach an external disk instead of creating a new one. Implies and conflicts with
keep_on_remove
. If set, you cannot setsize
,eagerly_scrub
, orthin_provisioned
. Must setpath
if used.NOTE: External disks cannot be attached when
datastore_cluster_id
is used.- controller
Type String The type of storage controller to attach the disk to. Can be
scsi
,sata
, oride
. You must have the appropriate number of controllers enabled for the selected type. Defaultscsi
.- datastore
Id String The datastore ID that on which the ISO is located. Required for using a datastore ISO. Conflicts with
client_device
.- device
Address String - disk
Mode String The mode of this this virtual disk for purposes of writes and snapshots. One of
append
,independent_nonpersistent
,independent_persistent
,nonpersistent
,persistent
, orundoable
. Default:persistent
. For more information on these option, please refer to the product documentation.- disk
Sharing String The sharing mode of this virtual disk. One of
sharingMultiWriter
orsharingNone
. Default:sharingNone
.NOTE: Disk sharing is only available on vSphere 6.0 and later.
- eagerly
Scrub Boolean If set to
true
, the disk space is zeroed out when the virtual machine is created. This will delay the creation of the virtual disk. Cannot be set totrue
whenthin_provisioned
istrue
. See the section on picking a disk type for more information. Default:false
.- io
Limit Number The upper limit of IOPS that this disk can use. The default is no limit.
- io
Reservation Number The I/O reservation (guarantee) for the virtual disk has, in IOPS. The default is no reservation.
- Number
The share count for the virtual disk when the share level is
custom
.- String
The share allocation level for the virtual disk. One of
low
,normal
,high
, orcustom
. Default:normal
.- keep
On BooleanRemove 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.
- path String
The path to the ISO file. Required for using a datastore ISO. Conflicts with
client_device
.NOTE: Either
client_device
(for a remote backed CD-ROM) ordatastore_id
andpath
(for a datastore ISO backed CD-ROM) are required to .NOTE: Some CD-ROM drive types are not supported by this resource, such as pass-through devices. If these drives are present in a cloned template, or added outside of the provider, the desired state will be corrected to the defined device, or removed if no
cdrom
block is present.- size Number
The size of the disk, in GB. Must be a whole number.
- storage
Policy StringId The UUID of the storage policy to assign to the virtual disk.
- thin
Provisioned Boolean If
true
, the disk is thin provisioned, with space for the file being allocated on an as-needed basis. Cannot be set totrue
wheneagerly_scrub
istrue
. See the section on selecting a disk type for more information. Default:true
.- unit
Number 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). Duplicate unit numbers are not allowed. Default
0
, for which one disk must be set to.- uuid String
The UUID of the virtual disk VMDK file. This is used to track the virtual disk on the virtual machine.
- write
Through Boolean If
true
, writes for this disk are sent directly to the filesystem immediately instead of being buffered. Default:false
.
VirtualMachineNetworkInterface, VirtualMachineNetworkInterfaceArgs
- Network
Id string The [managed object reference ID][docs-about-morefs] of the network on which to connect the virtual machine network interface.
- Adapter
Type string The network interface type. One of
e1000
,e1000e
,sriov
, orvmxnet3
. Default:vmxnet3
.- Bandwidth
Limit int The upper bandwidth limit of the network interface, in Mbits/sec. The default is no limit. Ignored if
adapter_type
is set tosriov
.- Bandwidth
Reservation int The bandwidth reservation of the network interface, in Mbits/sec. The default is no reservation.
- int
The share count for the network interface when the share level is
custom
. Ignored ifadapter_type
is set tosriov
.- string
The bandwidth share allocation level for the network interface. One of
low
,normal
,high
, orcustom
. Default:normal
. Ignored ifadapter_type
is set tosriov
.- Device
Address string - Key int
The ID of the device within the virtual machine.
- Mac
Address string The MAC address of the network interface. Can only be manually set if
use_static_mac
istrue
. Otherwise, the value is computed and presents the assigned MAC address for the interface.- Ovf
Mapping string Specifies which NIC in an OVF/OVA the
network_interface
should be associated. Only applies at creation when deploying from an OVF/OVA.- Physical
Function string - Use
Static boolMac If true, the
mac_address
field is treated as a static MAC address and set accordingly. Setting this totrue
requiresmac_address
to be set. Default:false
.
- Network
Id string The [managed object reference ID][docs-about-morefs] of the network on which to connect the virtual machine network interface.
- Adapter
Type string The network interface type. One of
e1000
,e1000e
,sriov
, orvmxnet3
. Default:vmxnet3
.- Bandwidth
Limit int The upper bandwidth limit of the network interface, in Mbits/sec. The default is no limit. Ignored if
adapter_type
is set tosriov
.- Bandwidth
Reservation int The bandwidth reservation of the network interface, in Mbits/sec. The default is no reservation.
- int
The share count for the network interface when the share level is
custom
. Ignored ifadapter_type
is set tosriov
.- string
The bandwidth share allocation level for the network interface. One of
low
,normal
,high
, orcustom
. Default:normal
. Ignored ifadapter_type
is set tosriov
.- Device
Address string - Key int
The ID of the device within the virtual machine.
- Mac
Address string The MAC address of the network interface. Can only be manually set if
use_static_mac
istrue
. Otherwise, the value is computed and presents the assigned MAC address for the interface.- Ovf
Mapping string Specifies which NIC in an OVF/OVA the
network_interface
should be associated. Only applies at creation when deploying from an OVF/OVA.- Physical
Function string - Use
Static boolMac If true, the
mac_address
field is treated as a static MAC address and set accordingly. Setting this totrue
requiresmac_address
to be set. Default:false
.
- network
Id String The [managed object reference ID][docs-about-morefs] of the network on which to connect the virtual machine network interface.
- adapter
Type String The network interface type. One of
e1000
,e1000e
,sriov
, orvmxnet3
. Default:vmxnet3
.- bandwidth
Limit Integer The upper bandwidth limit of the network interface, in Mbits/sec. The default is no limit. Ignored if
adapter_type
is set tosriov
.- bandwidth
Reservation Integer The bandwidth reservation of the network interface, in Mbits/sec. The default is no reservation.
- Integer
The share count for the network interface when the share level is
custom
. Ignored ifadapter_type
is set tosriov
.- String
The bandwidth share allocation level for the network interface. One of
low
,normal
,high
, orcustom
. Default:normal
. Ignored ifadapter_type
is set tosriov
.- device
Address String - key Integer
The ID of the device within the virtual machine.
- mac
Address String The MAC address of the network interface. Can only be manually set if
use_static_mac
istrue
. Otherwise, the value is computed and presents the assigned MAC address for the interface.- ovf
Mapping String Specifies which NIC in an OVF/OVA the
network_interface
should be associated. Only applies at creation when deploying from an OVF/OVA.- physical
Function String - use
Static BooleanMac If true, the
mac_address
field is treated as a static MAC address and set accordingly. Setting this totrue
requiresmac_address
to be set. Default:false
.
- network
Id string The [managed object reference ID][docs-about-morefs] of the network on which to connect the virtual machine network interface.
- adapter
Type string The network interface type. One of
e1000
,e1000e
,sriov
, orvmxnet3
. Default:vmxnet3
.- bandwidth
Limit number The upper bandwidth limit of the network interface, in Mbits/sec. The default is no limit. Ignored if
adapter_type
is set tosriov
.- bandwidth
Reservation number The bandwidth reservation of the network interface, in Mbits/sec. The default is no reservation.
- number
The share count for the network interface when the share level is
custom
. Ignored ifadapter_type
is set tosriov
.- string
The bandwidth share allocation level for the network interface. One of
low
,normal
,high
, orcustom
. Default:normal
. Ignored ifadapter_type
is set tosriov
.- device
Address string - key number
The ID of the device within the virtual machine.
- mac
Address string The MAC address of the network interface. Can only be manually set if
use_static_mac
istrue
. Otherwise, the value is computed and presents the assigned MAC address for the interface.- ovf
Mapping string Specifies which NIC in an OVF/OVA the
network_interface
should be associated. Only applies at creation when deploying from an OVF/OVA.- physical
Function string - use
Static booleanMac If true, the
mac_address
field is treated as a static MAC address and set accordingly. Setting this totrue
requiresmac_address
to be set. Default:false
.
- network_
id str The [managed object reference ID][docs-about-morefs] of the network on which to connect the virtual machine network interface.
- adapter_
type str The network interface type. One of
e1000
,e1000e
,sriov
, orvmxnet3
. Default:vmxnet3
.- bandwidth_
limit int The upper bandwidth limit of the network interface, in Mbits/sec. The default is no limit. Ignored if
adapter_type
is set tosriov
.- bandwidth_
reservation int The bandwidth reservation of the network interface, in Mbits/sec. The default is no reservation.
- int
The share count for the network interface when the share level is
custom
. Ignored ifadapter_type
is set tosriov
.- str
The bandwidth share allocation level for the network interface. One of
low
,normal
,high
, orcustom
. Default:normal
. Ignored ifadapter_type
is set tosriov
.- device_
address str - key int
The ID of the device within the virtual machine.
- mac_
address str The MAC address of the network interface. Can only be manually set if
use_static_mac
istrue
. Otherwise, the value is computed and presents the assigned MAC address for the interface.- ovf_
mapping str Specifies which NIC in an OVF/OVA the
network_interface
should be associated. Only applies at creation when deploying from an OVF/OVA.- physical_
function str - use_
static_ boolmac If true, the
mac_address
field is treated as a static MAC address and set accordingly. Setting this totrue
requiresmac_address
to be set. Default:false
.
- network
Id String The [managed object reference ID][docs-about-morefs] of the network on which to connect the virtual machine network interface.
- adapter
Type String The network interface type. One of
e1000
,e1000e
,sriov
, orvmxnet3
. Default:vmxnet3
.- bandwidth
Limit Number The upper bandwidth limit of the network interface, in Mbits/sec. The default is no limit. Ignored if
adapter_type
is set tosriov
.- bandwidth
Reservation Number The bandwidth reservation of the network interface, in Mbits/sec. The default is no reservation.
- Number
The share count for the network interface when the share level is
custom
. Ignored ifadapter_type
is set tosriov
.- String
The bandwidth share allocation level for the network interface. One of
low
,normal
,high
, orcustom
. Default:normal
. Ignored ifadapter_type
is set tosriov
.- device
Address String - key Number
The ID of the device within the virtual machine.
- mac
Address String The MAC address of the network interface. Can only be manually set if
use_static_mac
istrue
. Otherwise, the value is computed and presents the assigned MAC address for the interface.- ovf
Mapping String Specifies which NIC in an OVF/OVA the
network_interface
should be associated. Only applies at creation when deploying from an OVF/OVA.- physical
Function String - use
Static BooleanMac If true, the
mac_address
field is treated as a static MAC address and set accordingly. Setting this totrue
requiresmac_address
to be set. Default:false
.
VirtualMachineOvfDeploy, VirtualMachineOvfDeployArgs
- Allow
Unverified boolSsl Cert - Deployment
Option string - Disk
Provisioning string - bool
- Ip
Allocation stringPolicy - Ip
Protocol string - Local
Ovf stringPath - Ovf
Network Dictionary<string, string>Map - Remote
Ovf stringUrl
- Allow
Unverified boolSsl Cert - Deployment
Option string - Disk
Provisioning string - bool
- Ip
Allocation stringPolicy - Ip
Protocol string - Local
Ovf stringPath - Ovf
Network map[string]stringMap - Remote
Ovf stringUrl
- allow
Unverified BooleanSsl Cert - deployment
Option String - disk
Provisioning String - Boolean
- ip
Allocation StringPolicy - ip
Protocol String - local
Ovf StringPath - ovf
Network Map<String,String>Map - remote
Ovf StringUrl
- allow
Unverified booleanSsl Cert - deployment
Option string - disk
Provisioning string - boolean
- ip
Allocation stringPolicy - ip
Protocol string - local
Ovf stringPath - ovf
Network {[key: string]: string}Map - remote
Ovf stringUrl
- allow_
unverified_ boolssl_ cert - deployment_
option str - disk_
provisioning str - bool
- ip_
allocation_ strpolicy - ip_
protocol str - local_
ovf_ strpath - ovf_
network_ Mapping[str, str]map - remote_
ovf_ strurl
- allow
Unverified BooleanSsl Cert - deployment
Option String - disk
Provisioning String - Boolean
- ip
Allocation StringPolicy - ip
Protocol String - local
Ovf StringPath - ovf
Network Map<String>Map - remote
Ovf StringUrl
VirtualMachineVapp, VirtualMachineVappArgs
- Properties Dictionary<string, string>
- Properties map[string]string
- properties Map<String,String>
- properties {[key: string]: string}
- properties Mapping[str, str]
- properties Map<String>
Package Details
- Repository
- vSphere pulumi/pulumi-vsphere
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
vsphere
Terraform Provider.