1. Packages
  2. Vsphere Provider
  3. API Docs
  4. VirtualMachine
Viewing docs for vSphere v4.16.4
published on Tuesday, Mar 24, 2026 by Pulumi
vsphere logo
Viewing docs for vSphere v4.16.4
published on Tuesday, Mar 24, 2026 by Pulumi

    The vsphere.VirtualMachine resource is used to manage the lifecycle of a virtual machine.

    For details on working with virtual machines in VMware vSphere, please refer to the product documentation.

    About Working with Virtual Machines in Terraform

    A high degree of control and flexibility is available to a vSphere administrator to configure, deploy, and manage virtual machines. The Terraform provider enables you to manage the desired state of virtual machine resources.

    This section provides information on configurations you should consider when setting up virtual machines, creating templates for cloning, and more.

    Disks

    The vsphere.VirtualMachine resource supports standard VMDK-backed virtual disks. It does not support raw device mappings (RDMs) to proxy use of raw physical storage device

    Disks are managed by a label supplied to the label attribute in a disk block. This is separate from the automatic naming that vSphere assigns when a virtual machine is created. Control of the name for a virtual disk is not supported unless you are attaching an external disk with the attach attribute.

    Virtual disks can be SCSI, SATA, NVMe or IDE. The storage controllers managed by the Terraform provider can vary, depending on the value supplied to scsi_controller_count, sata_controller_count, nvme_controller_count, or ide_controller_count. This also dictates the controllers that are checked when looking for disks during a cloning process. SCSI controllers are all configured with the controller type defined by the scsi_type setting. If you are cloning from a template, devices will be added or re-configured as necessary.

    When cloning from a template, you must specify disks of either the same or greater size than the disks in the source template or the same size when cloning from a snapshot (also known as a linked clone).

    See the section on Creating a Virtual Machine from a Template for more information.

    Customization and Network Waiters

    Terraform waits during various parts of a virtual machine deployment to ensure that the virtual machine is in an expected state before proceeding. These events occur when a virtual machine is created or updated, depending on the waiter.

    The waiters include the following:

    • Customization Waiter:

      This waiter watches events in vSphere to monitor when customization on a virtual machine completes during creation. Depending on your vSphere or virtual machine configuration, it may be necessary to change the timeout or turn off the waiter. This can be controlled by using the timeout setting in the customization settings block.

    • Network Waiter:

      This waiter waits for interfaces to appear on a virtual machine guest operating system and occurs close to the end of both virtual machine creation and update. This waiter ensures that the IP information gets reported to the guest operating system, mainly to facilitate the availability of a valid, reachable default IP address for any provisioners.

      The behavior of the waiter can be controlled with the wait_for_guest_net_timeout, wait_for_guest_net_routable, wait_for_guest_ip_timeout, and ignored_guest_ips settings.

    Example Usage

    Creating a Virtual Machine

    The following block contains the option necessary to create a virtual machine, with a single disk and network interface.

    In this example, the resource makes use of the following data sources:

    Example:

    import * as pulumi from "@pulumi/pulumi";
    import * as vsphere from "@pulumi/vsphere";
    
    const datacenter = vsphere.getDatacenter({
        name: "dc-01",
    });
    const datastore = datacenter.then(datacenter => vsphere.getDatastore({
        name: "datastore-01",
        datacenterId: datacenter.id,
    }));
    const cluster = datacenter.then(datacenter => vsphere.getComputeCluster({
        name: "cluster-01",
        datacenterId: datacenter.id,
    }));
    const network = datacenter.then(datacenter => vsphere.getNetwork({
        name: "VM Network",
        datacenterId: datacenter.id,
    }));
    const vm = new vsphere.VirtualMachine("vm", {
        name: "foo",
        resourcePoolId: cluster.then(cluster => cluster.resourcePoolId),
        datastoreId: datastore.then(datastore => datastore.id),
        numCpus: 1,
        memory: 1024,
        guestId: "otherLinux64Guest",
        networkInterfaces: [{
            networkId: network.then(network => network.id),
        }],
        disks: [{
            label: "Hard Disk 1",
            size: 20,
        }],
    });
    
    import pulumi
    import pulumi_vsphere as vsphere
    
    datacenter = vsphere.get_datacenter(name="dc-01")
    datastore = vsphere.get_datastore(name="datastore-01",
        datacenter_id=datacenter.id)
    cluster = vsphere.get_compute_cluster(name="cluster-01",
        datacenter_id=datacenter.id)
    network = vsphere.get_network(name="VM Network",
        datacenter_id=datacenter.id)
    vm = vsphere.VirtualMachine("vm",
        name="foo",
        resource_pool_id=cluster.resource_pool_id,
        datastore_id=datastore.id,
        num_cpus=1,
        memory=1024,
        guest_id="otherLinux64Guest",
        network_interfaces=[{
            "network_id": network.id,
        }],
        disks=[{
            "label": "Hard Disk 1",
            "size": 20,
        }])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-vsphere/sdk/v4/go/vsphere"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		datacenter, err := vsphere.LookupDatacenter(ctx, &vsphere.LookupDatacenterArgs{
    			Name: pulumi.StringRef("dc-01"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		datastore, err := vsphere.GetDatastore(ctx, &vsphere.GetDatastoreArgs{
    			Name:         "datastore-01",
    			DatacenterId: pulumi.StringRef(datacenter.Id),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		cluster, err := vsphere.LookupComputeCluster(ctx, &vsphere.LookupComputeClusterArgs{
    			Name:         "cluster-01",
    			DatacenterId: pulumi.StringRef(datacenter.Id),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		network, err := vsphere.GetNetwork(ctx, &vsphere.GetNetworkArgs{
    			Name:         "VM Network",
    			DatacenterId: pulumi.StringRef(datacenter.Id),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = vsphere.NewVirtualMachine(ctx, "vm", &vsphere.VirtualMachineArgs{
    			Name:           pulumi.String("foo"),
    			ResourcePoolId: pulumi.String(cluster.ResourcePoolId),
    			DatastoreId:    pulumi.String(datastore.Id),
    			NumCpus:        pulumi.Int(1),
    			Memory:         pulumi.Int(1024),
    			GuestId:        pulumi.String("otherLinux64Guest"),
    			NetworkInterfaces: vsphere.VirtualMachineNetworkInterfaceArray{
    				&vsphere.VirtualMachineNetworkInterfaceArgs{
    					NetworkId: pulumi.String(network.Id),
    				},
    			},
    			Disks: vsphere.VirtualMachineDiskArray{
    				&vsphere.VirtualMachineDiskArgs{
    					Label: pulumi.String("Hard Disk 1"),
    					Size:  pulumi.Int(20),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using VSphere = Pulumi.VSphere;
    
    return await Deployment.RunAsync(() => 
    {
        var datacenter = VSphere.GetDatacenter.Invoke(new()
        {
            Name = "dc-01",
        });
    
        var datastore = VSphere.GetDatastore.Invoke(new()
        {
            Name = "datastore-01",
            DatacenterId = datacenter.Apply(getDatacenterResult => getDatacenterResult.Id),
        });
    
        var cluster = VSphere.GetComputeCluster.Invoke(new()
        {
            Name = "cluster-01",
            DatacenterId = datacenter.Apply(getDatacenterResult => getDatacenterResult.Id),
        });
    
        var network = VSphere.GetNetwork.Invoke(new()
        {
            Name = "VM Network",
            DatacenterId = datacenter.Apply(getDatacenterResult => getDatacenterResult.Id),
        });
    
        var vm = new VSphere.VirtualMachine("vm", new()
        {
            Name = "foo",
            ResourcePoolId = cluster.Apply(getComputeClusterResult => getComputeClusterResult.ResourcePoolId),
            DatastoreId = datastore.Apply(getDatastoreResult => getDatastoreResult.Id),
            NumCpus = 1,
            Memory = 1024,
            GuestId = "otherLinux64Guest",
            NetworkInterfaces = new[]
            {
                new VSphere.Inputs.VirtualMachineNetworkInterfaceArgs
                {
                    NetworkId = network.Apply(getNetworkResult => getNetworkResult.Id),
                },
            },
            Disks = new[]
            {
                new VSphere.Inputs.VirtualMachineDiskArgs
                {
                    Label = "Hard Disk 1",
                    Size = 20,
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.vsphere.VsphereFunctions;
    import com.pulumi.vsphere.inputs.GetDatacenterArgs;
    import com.pulumi.vsphere.inputs.GetDatastoreArgs;
    import com.pulumi.vsphere.inputs.GetComputeClusterArgs;
    import com.pulumi.vsphere.inputs.GetNetworkArgs;
    import com.pulumi.vsphere.VirtualMachine;
    import com.pulumi.vsphere.VirtualMachineArgs;
    import com.pulumi.vsphere.inputs.VirtualMachineNetworkInterfaceArgs;
    import com.pulumi.vsphere.inputs.VirtualMachineDiskArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var datacenter = VsphereFunctions.getDatacenter(GetDatacenterArgs.builder()
                .name("dc-01")
                .build());
    
            final var datastore = VsphereFunctions.getDatastore(GetDatastoreArgs.builder()
                .name("datastore-01")
                .datacenterId(datacenter.id())
                .build());
    
            final var cluster = VsphereFunctions.getComputeCluster(GetComputeClusterArgs.builder()
                .name("cluster-01")
                .datacenterId(datacenter.id())
                .build());
    
            final var network = VsphereFunctions.getNetwork(GetNetworkArgs.builder()
                .name("VM Network")
                .datacenterId(datacenter.id())
                .build());
    
            var vm = new VirtualMachine("vm", VirtualMachineArgs.builder()
                .name("foo")
                .resourcePoolId(cluster.resourcePoolId())
                .datastoreId(datastore.id())
                .numCpus(1)
                .memory(1024)
                .guestId("otherLinux64Guest")
                .networkInterfaces(VirtualMachineNetworkInterfaceArgs.builder()
                    .networkId(network.id())
                    .build())
                .disks(VirtualMachineDiskArgs.builder()
                    .label("Hard Disk 1")
                    .size(20)
                    .build())
                .build());
    
        }
    }
    
    resources:
      vm:
        type: vsphere:VirtualMachine
        properties:
          name: foo
          resourcePoolId: ${cluster.resourcePoolId}
          datastoreId: ${datastore.id}
          numCpus: 1
          memory: 1024
          guestId: otherLinux64Guest
          networkInterfaces:
            - networkId: ${network.id}
          disks:
            - label: Hard Disk 1
              size: 20
    variables:
      datacenter:
        fn::invoke:
          function: vsphere:getDatacenter
          arguments:
            name: dc-01
      datastore:
        fn::invoke:
          function: vsphere:getDatastore
          arguments:
            name: datastore-01
            datacenterId: ${datacenter.id}
      cluster:
        fn::invoke:
          function: vsphere:getComputeCluster
          arguments:
            name: cluster-01
            datacenterId: ${datacenter.id}
      network:
        fn::invoke:
          function: vsphere:getNetwork
          arguments:
            name: VM Network
            datacenterId: ${datacenter.id}
    

    Cloning and Customization

    Building on the above example, the below configuration creates a virtual machine by cloning it from a template, fetched using the vsphere.VirtualMachine data source. This option allows you to locate the UUID of the template to clone, along with settings for network interface type, SCSI bus type, and disk attributes.

    NOTE: Cloning requires vCenter Server and is not supported on direct ESXi host connections.

    Examples:

    This example clones a Linux template and customizes with the provided settings:

    import * as pulumi from "@pulumi/pulumi";
    import * as vsphere from "@pulumi/vsphere";
    
    const datacenter = vsphere.getDatacenter({
        name: "dc-01",
    });
    const datastore = datacenter.then(datacenter => vsphere.getDatastore({
        name: "datastore-01",
        datacenterId: datacenter.id,
    }));
    const cluster = datacenter.then(datacenter => vsphere.getComputeCluster({
        name: "cluster-01",
        datacenterId: datacenter.id,
    }));
    const network = datacenter.then(datacenter => vsphere.getNetwork({
        name: "VM Network",
        datacenterId: datacenter.id,
    }));
    const template = datacenter.then(datacenter => vsphere.getVirtualMachine({
        name: "linux-template",
        datacenterId: datacenter.id,
    }));
    const vm = new vsphere.VirtualMachine("vm", {
        name: "foo",
        resourcePoolId: cluster.then(cluster => cluster.resourcePoolId),
        datastoreId: datastore.then(datastore => datastore.id),
        numCpus: 1,
        memory: 1024,
        guestId: template.then(template => template.guestId),
        scsiType: template.then(template => template.scsiType),
        networkInterfaces: [{
            networkId: network.then(network => network.id),
            adapterType: template.then(template => template.networkInterfaceTypes?.[0]),
        }],
        disks: [{
            label: "Hard Disk 1",
            size: template.then(template => template.disks?.[0]?.size),
            thinProvisioned: template.then(template => template.disks?.[0]?.thinProvisioned),
        }],
        clone: {
            templateUuid: template.then(template => template.id),
            customize: {
                linuxOptions: {
                    hostName: "foo",
                    domain: "example.com",
                },
            },
        },
    });
    
    import pulumi
    import pulumi_vsphere as vsphere
    
    datacenter = vsphere.get_datacenter(name="dc-01")
    datastore = vsphere.get_datastore(name="datastore-01",
        datacenter_id=datacenter.id)
    cluster = vsphere.get_compute_cluster(name="cluster-01",
        datacenter_id=datacenter.id)
    network = vsphere.get_network(name="VM Network",
        datacenter_id=datacenter.id)
    template = vsphere.get_virtual_machine(name="linux-template",
        datacenter_id=datacenter.id)
    vm = vsphere.VirtualMachine("vm",
        name="foo",
        resource_pool_id=cluster.resource_pool_id,
        datastore_id=datastore.id,
        num_cpus=1,
        memory=1024,
        guest_id=template.guest_id,
        scsi_type=template.scsi_type,
        network_interfaces=[{
            "network_id": network.id,
            "adapter_type": template.network_interface_types[0],
        }],
        disks=[{
            "label": "Hard Disk 1",
            "size": template.disks[0].size,
            "thin_provisioned": template.disks[0].thin_provisioned,
        }],
        clone={
            "template_uuid": template.id,
            "customize": {
                "linux_options": {
                    "host_name": "foo",
                    "domain": "example.com",
                },
            },
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-vsphere/sdk/v4/go/vsphere"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		datacenter, err := vsphere.LookupDatacenter(ctx, &vsphere.LookupDatacenterArgs{
    			Name: pulumi.StringRef("dc-01"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		datastore, err := vsphere.GetDatastore(ctx, &vsphere.GetDatastoreArgs{
    			Name:         "datastore-01",
    			DatacenterId: pulumi.StringRef(datacenter.Id),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		cluster, err := vsphere.LookupComputeCluster(ctx, &vsphere.LookupComputeClusterArgs{
    			Name:         "cluster-01",
    			DatacenterId: pulumi.StringRef(datacenter.Id),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		network, err := vsphere.GetNetwork(ctx, &vsphere.GetNetworkArgs{
    			Name:         "VM Network",
    			DatacenterId: pulumi.StringRef(datacenter.Id),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		template, err := vsphere.LookupVirtualMachine(ctx, &vsphere.LookupVirtualMachineArgs{
    			Name:         pulumi.StringRef("linux-template"),
    			DatacenterId: pulumi.StringRef(datacenter.Id),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = vsphere.NewVirtualMachine(ctx, "vm", &vsphere.VirtualMachineArgs{
    			Name:           pulumi.String("foo"),
    			ResourcePoolId: pulumi.String(cluster.ResourcePoolId),
    			DatastoreId:    pulumi.String(datastore.Id),
    			NumCpus:        pulumi.Int(1),
    			Memory:         pulumi.Int(1024),
    			GuestId:        pulumi.String(template.GuestId),
    			ScsiType:       pulumi.String(template.ScsiType),
    			NetworkInterfaces: vsphere.VirtualMachineNetworkInterfaceArray{
    				&vsphere.VirtualMachineNetworkInterfaceArgs{
    					NetworkId:   pulumi.String(network.Id),
    					AdapterType: pulumi.String(template.NetworkInterfaceTypes[0]),
    				},
    			},
    			Disks: vsphere.VirtualMachineDiskArray{
    				&vsphere.VirtualMachineDiskArgs{
    					Label:           pulumi.String("Hard Disk 1"),
    					Size:            pulumi.Int(template.Disks[0].Size),
    					ThinProvisioned: pulumi.Bool(template.Disks[0].ThinProvisioned),
    				},
    			},
    			Clone: &vsphere.VirtualMachineCloneArgs{
    				TemplateUuid: pulumi.String(template.Id),
    				Customize: &vsphere.VirtualMachineCloneCustomizeArgs{
    					LinuxOptions: &vsphere.VirtualMachineCloneCustomizeLinuxOptionsArgs{
    						HostName: pulumi.String("foo"),
    						Domain:   pulumi.String("example.com"),
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using VSphere = Pulumi.VSphere;
    
    return await Deployment.RunAsync(() => 
    {
        var datacenter = VSphere.GetDatacenter.Invoke(new()
        {
            Name = "dc-01",
        });
    
        var datastore = VSphere.GetDatastore.Invoke(new()
        {
            Name = "datastore-01",
            DatacenterId = datacenter.Apply(getDatacenterResult => getDatacenterResult.Id),
        });
    
        var cluster = VSphere.GetComputeCluster.Invoke(new()
        {
            Name = "cluster-01",
            DatacenterId = datacenter.Apply(getDatacenterResult => getDatacenterResult.Id),
        });
    
        var network = VSphere.GetNetwork.Invoke(new()
        {
            Name = "VM Network",
            DatacenterId = datacenter.Apply(getDatacenterResult => getDatacenterResult.Id),
        });
    
        var template = VSphere.GetVirtualMachine.Invoke(new()
        {
            Name = "linux-template",
            DatacenterId = datacenter.Apply(getDatacenterResult => getDatacenterResult.Id),
        });
    
        var vm = new VSphere.VirtualMachine("vm", new()
        {
            Name = "foo",
            ResourcePoolId = cluster.Apply(getComputeClusterResult => getComputeClusterResult.ResourcePoolId),
            DatastoreId = datastore.Apply(getDatastoreResult => getDatastoreResult.Id),
            NumCpus = 1,
            Memory = 1024,
            GuestId = template.Apply(getVirtualMachineResult => getVirtualMachineResult.GuestId),
            ScsiType = template.Apply(getVirtualMachineResult => getVirtualMachineResult.ScsiType),
            NetworkInterfaces = new[]
            {
                new VSphere.Inputs.VirtualMachineNetworkInterfaceArgs
                {
                    NetworkId = network.Apply(getNetworkResult => getNetworkResult.Id),
                    AdapterType = template.Apply(getVirtualMachineResult => getVirtualMachineResult.NetworkInterfaceTypes[0]),
                },
            },
            Disks = new[]
            {
                new VSphere.Inputs.VirtualMachineDiskArgs
                {
                    Label = "Hard Disk 1",
                    Size = template.Apply(getVirtualMachineResult => getVirtualMachineResult.Disks[0]?.Size),
                    ThinProvisioned = template.Apply(getVirtualMachineResult => getVirtualMachineResult.Disks[0]?.ThinProvisioned),
                },
            },
            Clone = new VSphere.Inputs.VirtualMachineCloneArgs
            {
                TemplateUuid = template.Apply(getVirtualMachineResult => getVirtualMachineResult.Id),
                Customize = new VSphere.Inputs.VirtualMachineCloneCustomizeArgs
                {
                    LinuxOptions = new VSphere.Inputs.VirtualMachineCloneCustomizeLinuxOptionsArgs
                    {
                        HostName = "foo",
                        Domain = "example.com",
                    },
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.vsphere.VsphereFunctions;
    import com.pulumi.vsphere.inputs.GetDatacenterArgs;
    import com.pulumi.vsphere.inputs.GetDatastoreArgs;
    import com.pulumi.vsphere.inputs.GetComputeClusterArgs;
    import com.pulumi.vsphere.inputs.GetNetworkArgs;
    import com.pulumi.vsphere.inputs.GetVirtualMachineArgs;
    import com.pulumi.vsphere.VirtualMachine;
    import com.pulumi.vsphere.VirtualMachineArgs;
    import com.pulumi.vsphere.inputs.VirtualMachineNetworkInterfaceArgs;
    import com.pulumi.vsphere.inputs.VirtualMachineDiskArgs;
    import com.pulumi.vsphere.inputs.VirtualMachineCloneArgs;
    import com.pulumi.vsphere.inputs.VirtualMachineCloneCustomizeArgs;
    import com.pulumi.vsphere.inputs.VirtualMachineCloneCustomizeLinuxOptionsArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var datacenter = VsphereFunctions.getDatacenter(GetDatacenterArgs.builder()
                .name("dc-01")
                .build());
    
            final var datastore = VsphereFunctions.getDatastore(GetDatastoreArgs.builder()
                .name("datastore-01")
                .datacenterId(datacenter.id())
                .build());
    
            final var cluster = VsphereFunctions.getComputeCluster(GetComputeClusterArgs.builder()
                .name("cluster-01")
                .datacenterId(datacenter.id())
                .build());
    
            final var network = VsphereFunctions.getNetwork(GetNetworkArgs.builder()
                .name("VM Network")
                .datacenterId(datacenter.id())
                .build());
    
            final var template = VsphereFunctions.getVirtualMachine(GetVirtualMachineArgs.builder()
                .name("linux-template")
                .datacenterId(datacenter.id())
                .build());
    
            var vm = new VirtualMachine("vm", VirtualMachineArgs.builder()
                .name("foo")
                .resourcePoolId(cluster.resourcePoolId())
                .datastoreId(datastore.id())
                .numCpus(1)
                .memory(1024)
                .guestId(template.guestId())
                .scsiType(template.scsiType())
                .networkInterfaces(VirtualMachineNetworkInterfaceArgs.builder()
                    .networkId(network.id())
                    .adapterType(template.networkInterfaceTypes()[0])
                    .build())
                .disks(VirtualMachineDiskArgs.builder()
                    .label("Hard Disk 1")
                    .size(template.disks()[0].size())
                    .thinProvisioned(template.disks()[0].thinProvisioned())
                    .build())
                .clone(VirtualMachineCloneArgs.builder()
                    .templateUuid(template.id())
                    .customize(VirtualMachineCloneCustomizeArgs.builder()
                        .linuxOptions(VirtualMachineCloneCustomizeLinuxOptionsArgs.builder()
                            .hostName("foo")
                            .domain("example.com")
                            .build())
                        .build())
                    .build())
                .build());
    
        }
    }
    
    resources:
      vm:
        type: vsphere:VirtualMachine
        properties:
          name: foo
          resourcePoolId: ${cluster.resourcePoolId}
          datastoreId: ${datastore.id}
          numCpus: 1
          memory: 1024
          guestId: ${template.guestId}
          scsiType: ${template.scsiType}
          networkInterfaces:
            - networkId: ${network.id}
              adapterType: ${template.networkInterfaceTypes[0]}
          disks:
            - label: Hard Disk 1
              size: ${template.disks[0].size}
              thinProvisioned: ${template.disks[0].thinProvisioned}
          clone:
            templateUuid: ${template.id}
            customize:
              linuxOptions:
                hostName: foo
                domain: example.com
    variables:
      datacenter:
        fn::invoke:
          function: vsphere:getDatacenter
          arguments:
            name: dc-01
      datastore:
        fn::invoke:
          function: vsphere:getDatastore
          arguments:
            name: datastore-01
            datacenterId: ${datacenter.id}
      cluster:
        fn::invoke:
          function: vsphere:getComputeCluster
          arguments:
            name: cluster-01
            datacenterId: ${datacenter.id}
      network:
        fn::invoke:
          function: vsphere:getNetwork
          arguments:
            name: VM Network
            datacenterId: ${datacenter.id}
      template:
        fn::invoke:
          function: vsphere:getVirtualMachine
          arguments:
            name: linux-template
            datacenterId: ${datacenter.id}
    

    This example uses the same structure as the previous example, but customizes with an existing guest customization specification:

    import * as pulumi from "@pulumi/pulumi";
    import * as vsphere from "@pulumi/vsphere";
    
    // ... other configuration ...
    const linux = vsphere.getGuestOsCustomization({
        name: "linux",
    });
    const vm = new vsphere.VirtualMachine("vm", {
        templateUuid: template.id,
        customizationSpec: [{
            id: linux.then(linux => linux.id),
        }],
    });
    
    import pulumi
    import pulumi_vsphere as vsphere
    
    # ... other configuration ...
    linux = vsphere.get_guest_os_customization(name="linux")
    vm = vsphere.VirtualMachine("vm",
        template_uuid=template["id"],
        customization_spec=[{
            "id": linux.id,
        }])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-vsphere/sdk/v4/go/vsphere"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		// ... other configuration ...
    		linux, err := vsphere.LookupGuestOsCustomization(ctx, &vsphere.LookupGuestOsCustomizationArgs{
    			Name: "linux",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = vsphere.NewVirtualMachine(ctx, "vm", &vsphere.VirtualMachineArgs{
    			TemplateUuid: template.Id,
    			CustomizationSpec: []map[string]interface{}{
    				map[string]interface{}{
    					"id": linux.Id,
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using VSphere = Pulumi.VSphere;
    
    return await Deployment.RunAsync(() => 
    {
        // ... other configuration ...
        var linux = VSphere.GetGuestOsCustomization.Invoke(new()
        {
            Name = "linux",
        });
    
        var vm = new VSphere.VirtualMachine("vm", new()
        {
            TemplateUuid = template.Id,
            CustomizationSpec = new[]
            {
                
                {
                    { "id", linux.Apply(getGuestOsCustomizationResult => getGuestOsCustomizationResult.Id) },
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.vsphere.VsphereFunctions;
    import com.pulumi.vsphere.inputs.GetGuestOsCustomizationArgs;
    import com.pulumi.vsphere.VirtualMachine;
    import com.pulumi.vsphere.VirtualMachineArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            // ... other configuration ...
            final var linux = VsphereFunctions.getGuestOsCustomization(GetGuestOsCustomizationArgs.builder()
                .name("linux")
                .build());
    
            var vm = new VirtualMachine("vm", VirtualMachineArgs.builder()
                .templateUuid(template.id())
                .customizationSpec(List.of(Map.of("id", linux.id())))
                .build());
    
        }
    }
    
    resources:
      vm:
        type: vsphere:VirtualMachine
        properties:
          templateUuid: ${template.id}
          customizationSpec:
            - id: ${linux.id}
    variables:
      # ... other configuration ...
      linux:
        fn::invoke:
          function: vsphere:getGuestOsCustomization
          arguments:
            name: linux
    

    Deploying Virtual Machines from OVF/OVA

    Virtual machines can be deployed from OVF/OVA using either the local path and remote URL and the ovf_deploy property. When deploying from a local path, the path to the OVF/OVA must be provided. While deploying OVF, all other necessary files (e.g. .vmdk, .mf, etc) must be present in the same directory as the .ovf file.

    NOTE: The vApp properties which are pre-defined in an OVF template can be overwritten. New vApp properties can not be created for an existing OVF template.

    NOTE: An OVF/OVA deployment requires vCenter Server and is not supported on direct ESXi host connections.

    The following example demonstrates a scenario deploying a simple OVF/OVA, using both the local path and remote URL options.

    Example:

    import * as pulumi from "@pulumi/pulumi";
    import * as std from "@pulumi/std";
    import * as vsphere from "@pulumi/vsphere";
    
    const datacenter = vsphere.getDatacenter({
        name: "dc-01",
    });
    const datastore = datacenter.then(datacenter => vsphere.getDatastore({
        name: "datastore-01",
        datacenterId: datacenter.id,
    }));
    const cluster = datacenter.then(datacenter => vsphere.getComputeCluster({
        name: "cluster-01",
        datacenterId: datacenter.id,
    }));
    const _default = Promise.all([cluster, datacenter]).then(([cluster, datacenter]) => vsphere.getResourcePool({
        name: std.index.format({
            input: "%s%s",
            args: [
                cluster.name,
                "/Resources",
            ],
        }).result,
        datacenterId: datacenter.id,
    }));
    const host = datacenter.then(datacenter => vsphere.getHost({
        name: "esxi-01.example.com",
        datacenterId: datacenter.id,
    }));
    const network = datacenter.then(datacenter => vsphere.getNetwork({
        name: "172.16.11.0",
        datacenterId: datacenter.id,
    }));
    //# Deployment of VM from Remote OVF
    const vmFromRemoteOvf = new vsphere.VirtualMachine("vmFromRemoteOvf", {
        name: "remote-foo",
        datacenterId: datacenter.then(datacenter => datacenter.id),
        datastoreId: datastore.then(datastore => datastore.i),
        resourcePoolId: _default.then(_default => _default.id),
        waitForGuestNetTimeout: 0,
        waitForGuestIpTimeout: 0,
        ovfDeploy: {
            allowUnverifiedSslCert: false,
            remoteOvfUrl: "https://example.com/foo.ova",
            diskProvisioning: "thin",
            ipProtocol: "IPV4",
            ipAllocationPolicy: "STATIC_MANUAL",
            ovfNetworkMap: {
                "Network 1": network.then(network => network.id),
                "Network 2": network.then(network => network.id),
            },
        },
        vapp: {
            properties: {
                "guestinfo.hostname": "remote-foo.example.com",
                "guestinfo.ipaddress": "172.16.11.101",
                "guestinfo.netmask": "255.255.255.0",
                "guestinfo.gateway": "172.16.11.1",
                "guestinfo.dns": "172.16.11.4",
                "guestinfo.domain": "example.com",
                "guestinfo.ntp": "ntp.example.com",
                "guestinfo.password": "VMware1!",
                "guestinfo.ssh": "True",
            },
        },
    });
    //# Deployment of VM from Local OVF
    const vmFromLocalOvf = new vsphere.VirtualMachine("vmFromLocalOvf", {
        name: "local-foo",
        datacenterId: datacenter.then(datacenter => datacenter.id),
        datastoreId: datastore.then(datastore => datastore.id),
        resourcePoolId: _default.then(_default => _default.id),
        waitForGuestNetTimeout: 0,
        waitForGuestIpTimeout: 0,
        ovfDeploy: {
            allowUnverifiedSslCert: false,
            localOvfPath: "/Volume/Storage/OVAs/foo.ova",
            diskProvisioning: "thin",
            ipProtocol: "IPV4",
            ipAllocationPolicy: "STATIC_MANUAL",
            ovfNetworkMap: {
                "Network 1": network.then(network => network.id),
                "Network 2": network.then(network => network.id),
            },
        },
        vapp: {
            properties: {
                "guestinfo.hostname": "local-foo.example.com",
                "guestinfo.ipaddress": "172.16.11.101",
                "guestinfo.netmask": "255.255.255.0",
                "guestinfo.gateway": "172.16.11.1",
                "guestinfo.dns": "172.16.11.4",
                "guestinfo.domain": "example.com",
                "guestinfo.ntp": "ntp.example.com",
                "guestinfo.password": "VMware1!",
                "guestinfo.ssh": "True",
            },
        },
    });
    
    import pulumi
    import pulumi_std as std
    import pulumi_vsphere as vsphere
    
    datacenter = vsphere.get_datacenter(name="dc-01")
    datastore = vsphere.get_datastore(name="datastore-01",
        datacenter_id=datacenter.id)
    cluster = vsphere.get_compute_cluster(name="cluster-01",
        datacenter_id=datacenter.id)
    default = vsphere.get_resource_pool(name=std.index.format(input="%s%s",
            args=[
                cluster.name,
                "/Resources",
            ])["result"],
        datacenter_id=datacenter.id)
    host = vsphere.get_host(name="esxi-01.example.com",
        datacenter_id=datacenter.id)
    network = vsphere.get_network(name="172.16.11.0",
        datacenter_id=datacenter.id)
    ## Deployment of VM from Remote OVF
    vm_from_remote_ovf = vsphere.VirtualMachine("vmFromRemoteOvf",
        name="remote-foo",
        datacenter_id=datacenter.id,
        datastore_id=datastore.i,
        resource_pool_id=default.id,
        wait_for_guest_net_timeout=0,
        wait_for_guest_ip_timeout=0,
        ovf_deploy={
            "allow_unverified_ssl_cert": False,
            "remote_ovf_url": "https://example.com/foo.ova",
            "disk_provisioning": "thin",
            "ip_protocol": "IPV4",
            "ip_allocation_policy": "STATIC_MANUAL",
            "ovf_network_map": {
                "Network 1": network.id,
                "Network 2": network.id,
            },
        },
        vapp={
            "properties": {
                "guestinfo.hostname": "remote-foo.example.com",
                "guestinfo.ipaddress": "172.16.11.101",
                "guestinfo.netmask": "255.255.255.0",
                "guestinfo.gateway": "172.16.11.1",
                "guestinfo.dns": "172.16.11.4",
                "guestinfo.domain": "example.com",
                "guestinfo.ntp": "ntp.example.com",
                "guestinfo.password": "VMware1!",
                "guestinfo.ssh": "True",
            },
        })
    ## Deployment of VM from Local OVF
    vm_from_local_ovf = vsphere.VirtualMachine("vmFromLocalOvf",
        name="local-foo",
        datacenter_id=datacenter.id,
        datastore_id=datastore.id,
        resource_pool_id=default.id,
        wait_for_guest_net_timeout=0,
        wait_for_guest_ip_timeout=0,
        ovf_deploy={
            "allow_unverified_ssl_cert": False,
            "local_ovf_path": "/Volume/Storage/OVAs/foo.ova",
            "disk_provisioning": "thin",
            "ip_protocol": "IPV4",
            "ip_allocation_policy": "STATIC_MANUAL",
            "ovf_network_map": {
                "Network 1": network.id,
                "Network 2": network.id,
            },
        },
        vapp={
            "properties": {
                "guestinfo.hostname": "local-foo.example.com",
                "guestinfo.ipaddress": "172.16.11.101",
                "guestinfo.netmask": "255.255.255.0",
                "guestinfo.gateway": "172.16.11.1",
                "guestinfo.dns": "172.16.11.4",
                "guestinfo.domain": "example.com",
                "guestinfo.ntp": "ntp.example.com",
                "guestinfo.password": "VMware1!",
                "guestinfo.ssh": "True",
            },
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-std/sdk/go/std"
    	"github.com/pulumi/pulumi-vsphere/sdk/v4/go/vsphere"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		datacenter, err := vsphere.LookupDatacenter(ctx, &vsphere.LookupDatacenterArgs{
    			Name: pulumi.StringRef("dc-01"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		datastore, err := vsphere.GetDatastore(ctx, &vsphere.GetDatastoreArgs{
    			Name:         "datastore-01",
    			DatacenterId: pulumi.StringRef(datacenter.Id),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		cluster, err := vsphere.LookupComputeCluster(ctx, &vsphere.LookupComputeClusterArgs{
    			Name:         "cluster-01",
    			DatacenterId: pulumi.StringRef(datacenter.Id),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_default, err := vsphere.LookupResourcePool(ctx, &vsphere.LookupResourcePoolArgs{
    			Name: pulumi.StringRef(std.Format(ctx, map[string]interface{}{
    				"input": "%s%s",
    				"args": []*string{
    					cluster.Name,
    					"/Resources",
    				},
    			}, nil).Result),
    			DatacenterId: pulumi.StringRef(datacenter.Id),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = vsphere.LookupHost(ctx, &vsphere.LookupHostArgs{
    			Name:         pulumi.StringRef("esxi-01.example.com"),
    			DatacenterId: datacenter.Id,
    		}, nil)
    		if err != nil {
    			return err
    		}
    		network, err := vsphere.GetNetwork(ctx, &vsphere.GetNetworkArgs{
    			Name:         "172.16.11.0",
    			DatacenterId: pulumi.StringRef(datacenter.Id),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		// # Deployment of VM from Remote OVF
    		_, err = vsphere.NewVirtualMachine(ctx, "vmFromRemoteOvf", &vsphere.VirtualMachineArgs{
    			Name:                   pulumi.String("remote-foo"),
    			DatacenterId:           pulumi.String(datacenter.Id),
    			DatastoreId:            pulumi.Any(datastore.I),
    			ResourcePoolId:         pulumi.String(_default.Id),
    			WaitForGuestNetTimeout: pulumi.Int(0),
    			WaitForGuestIpTimeout:  pulumi.Int(0),
    			OvfDeploy: &vsphere.VirtualMachineOvfDeployArgs{
    				AllowUnverifiedSslCert: pulumi.Bool(false),
    				RemoteOvfUrl:           pulumi.String("https://example.com/foo.ova"),
    				DiskProvisioning:       pulumi.String("thin"),
    				IpProtocol:             pulumi.String("IPV4"),
    				IpAllocationPolicy:     pulumi.String("STATIC_MANUAL"),
    				OvfNetworkMap: pulumi.StringMap{
    					"Network 1": pulumi.String(network.Id),
    					"Network 2": pulumi.String(network.Id),
    				},
    			},
    			Vapp: &vsphere.VirtualMachineVappArgs{
    				Properties: pulumi.StringMap{
    					"guestinfo.hostname":  pulumi.String("remote-foo.example.com"),
    					"guestinfo.ipaddress": pulumi.String("172.16.11.101"),
    					"guestinfo.netmask":   pulumi.String("255.255.255.0"),
    					"guestinfo.gateway":   pulumi.String("172.16.11.1"),
    					"guestinfo.dns":       pulumi.String("172.16.11.4"),
    					"guestinfo.domain":    pulumi.String("example.com"),
    					"guestinfo.ntp":       pulumi.String("ntp.example.com"),
    					"guestinfo.password":  pulumi.String("VMware1!"),
    					"guestinfo.ssh":       pulumi.String("True"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		// # Deployment of VM from Local OVF
    		_, err = vsphere.NewVirtualMachine(ctx, "vmFromLocalOvf", &vsphere.VirtualMachineArgs{
    			Name:                   pulumi.String("local-foo"),
    			DatacenterId:           pulumi.String(datacenter.Id),
    			DatastoreId:            pulumi.String(datastore.Id),
    			ResourcePoolId:         pulumi.String(_default.Id),
    			WaitForGuestNetTimeout: pulumi.Int(0),
    			WaitForGuestIpTimeout:  pulumi.Int(0),
    			OvfDeploy: &vsphere.VirtualMachineOvfDeployArgs{
    				AllowUnverifiedSslCert: pulumi.Bool(false),
    				LocalOvfPath:           pulumi.String("/Volume/Storage/OVAs/foo.ova"),
    				DiskProvisioning:       pulumi.String("thin"),
    				IpProtocol:             pulumi.String("IPV4"),
    				IpAllocationPolicy:     pulumi.String("STATIC_MANUAL"),
    				OvfNetworkMap: pulumi.StringMap{
    					"Network 1": pulumi.String(network.Id),
    					"Network 2": pulumi.String(network.Id),
    				},
    			},
    			Vapp: &vsphere.VirtualMachineVappArgs{
    				Properties: pulumi.StringMap{
    					"guestinfo.hostname":  pulumi.String("local-foo.example.com"),
    					"guestinfo.ipaddress": pulumi.String("172.16.11.101"),
    					"guestinfo.netmask":   pulumi.String("255.255.255.0"),
    					"guestinfo.gateway":   pulumi.String("172.16.11.1"),
    					"guestinfo.dns":       pulumi.String("172.16.11.4"),
    					"guestinfo.domain":    pulumi.String("example.com"),
    					"guestinfo.ntp":       pulumi.String("ntp.example.com"),
    					"guestinfo.password":  pulumi.String("VMware1!"),
    					"guestinfo.ssh":       pulumi.String("True"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Std = Pulumi.Std;
    using VSphere = Pulumi.VSphere;
    
    return await Deployment.RunAsync(() => 
    {
        var datacenter = VSphere.GetDatacenter.Invoke(new()
        {
            Name = "dc-01",
        });
    
        var datastore = VSphere.GetDatastore.Invoke(new()
        {
            Name = "datastore-01",
            DatacenterId = datacenter.Apply(getDatacenterResult => getDatacenterResult.Id),
        });
    
        var cluster = VSphere.GetComputeCluster.Invoke(new()
        {
            Name = "cluster-01",
            DatacenterId = datacenter.Apply(getDatacenterResult => getDatacenterResult.Id),
        });
    
        var @default = VSphere.GetResourcePool.Invoke(new()
        {
            Name = Std.Index.Format.Invoke(new()
            {
                Input = "%s%s",
                Args = new[]
                {
                    cluster.Apply(getComputeClusterResult => getComputeClusterResult.Name),
                    "/Resources",
                },
            }).Result,
            DatacenterId = datacenter.Apply(getDatacenterResult => getDatacenterResult.Id),
        });
    
        var host = VSphere.GetHost.Invoke(new()
        {
            Name = "esxi-01.example.com",
            DatacenterId = datacenter.Apply(getDatacenterResult => getDatacenterResult.Id),
        });
    
        var network = VSphere.GetNetwork.Invoke(new()
        {
            Name = "172.16.11.0",
            DatacenterId = datacenter.Apply(getDatacenterResult => getDatacenterResult.Id),
        });
    
        //# Deployment of VM from Remote OVF
        var vmFromRemoteOvf = new VSphere.VirtualMachine("vmFromRemoteOvf", new()
        {
            Name = "remote-foo",
            DatacenterId = datacenter.Apply(getDatacenterResult => getDatacenterResult.Id),
            DatastoreId = datastore.Apply(getDatastoreResult => getDatastoreResult.I),
            ResourcePoolId = @default.Apply(@default => @default.Apply(getResourcePoolResult => getResourcePoolResult.Id)),
            WaitForGuestNetTimeout = 0,
            WaitForGuestIpTimeout = 0,
            OvfDeploy = new VSphere.Inputs.VirtualMachineOvfDeployArgs
            {
                AllowUnverifiedSslCert = false,
                RemoteOvfUrl = "https://example.com/foo.ova",
                DiskProvisioning = "thin",
                IpProtocol = "IPV4",
                IpAllocationPolicy = "STATIC_MANUAL",
                OvfNetworkMap = 
                {
                    { "Network 1", network.Apply(getNetworkResult => getNetworkResult.Id) },
                    { "Network 2", network.Apply(getNetworkResult => getNetworkResult.Id) },
                },
            },
            Vapp = new VSphere.Inputs.VirtualMachineVappArgs
            {
                Properties = 
                {
                    { "guestinfo.hostname", "remote-foo.example.com" },
                    { "guestinfo.ipaddress", "172.16.11.101" },
                    { "guestinfo.netmask", "255.255.255.0" },
                    { "guestinfo.gateway", "172.16.11.1" },
                    { "guestinfo.dns", "172.16.11.4" },
                    { "guestinfo.domain", "example.com" },
                    { "guestinfo.ntp", "ntp.example.com" },
                    { "guestinfo.password", "VMware1!" },
                    { "guestinfo.ssh", "True" },
                },
            },
        });
    
        //# Deployment of VM from Local OVF
        var vmFromLocalOvf = new VSphere.VirtualMachine("vmFromLocalOvf", new()
        {
            Name = "local-foo",
            DatacenterId = datacenter.Apply(getDatacenterResult => getDatacenterResult.Id),
            DatastoreId = datastore.Apply(getDatastoreResult => getDatastoreResult.Id),
            ResourcePoolId = @default.Apply(@default => @default.Apply(getResourcePoolResult => getResourcePoolResult.Id)),
            WaitForGuestNetTimeout = 0,
            WaitForGuestIpTimeout = 0,
            OvfDeploy = new VSphere.Inputs.VirtualMachineOvfDeployArgs
            {
                AllowUnverifiedSslCert = false,
                LocalOvfPath = "/Volume/Storage/OVAs/foo.ova",
                DiskProvisioning = "thin",
                IpProtocol = "IPV4",
                IpAllocationPolicy = "STATIC_MANUAL",
                OvfNetworkMap = 
                {
                    { "Network 1", network.Apply(getNetworkResult => getNetworkResult.Id) },
                    { "Network 2", network.Apply(getNetworkResult => getNetworkResult.Id) },
                },
            },
            Vapp = new VSphere.Inputs.VirtualMachineVappArgs
            {
                Properties = 
                {
                    { "guestinfo.hostname", "local-foo.example.com" },
                    { "guestinfo.ipaddress", "172.16.11.101" },
                    { "guestinfo.netmask", "255.255.255.0" },
                    { "guestinfo.gateway", "172.16.11.1" },
                    { "guestinfo.dns", "172.16.11.4" },
                    { "guestinfo.domain", "example.com" },
                    { "guestinfo.ntp", "ntp.example.com" },
                    { "guestinfo.password", "VMware1!" },
                    { "guestinfo.ssh", "True" },
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.vsphere.VsphereFunctions;
    import com.pulumi.vsphere.inputs.GetDatacenterArgs;
    import com.pulumi.vsphere.inputs.GetDatastoreArgs;
    import com.pulumi.vsphere.inputs.GetComputeClusterArgs;
    import com.pulumi.std.StdFunctions;
    import com.pulumi.vsphere.inputs.GetResourcePoolArgs;
    import com.pulumi.vsphere.inputs.GetHostArgs;
    import com.pulumi.vsphere.inputs.GetNetworkArgs;
    import com.pulumi.vsphere.VirtualMachine;
    import com.pulumi.vsphere.VirtualMachineArgs;
    import com.pulumi.vsphere.inputs.VirtualMachineOvfDeployArgs;
    import com.pulumi.vsphere.inputs.VirtualMachineVappArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var datacenter = VsphereFunctions.getDatacenter(GetDatacenterArgs.builder()
                .name("dc-01")
                .build());
    
            final var datastore = VsphereFunctions.getDatastore(GetDatastoreArgs.builder()
                .name("datastore-01")
                .datacenterId(datacenter.id())
                .build());
    
            final var cluster = VsphereFunctions.getComputeCluster(GetComputeClusterArgs.builder()
                .name("cluster-01")
                .datacenterId(datacenter.id())
                .build());
    
            final var default = VsphereFunctions.getResourcePool(GetResourcePoolArgs.builder()
                .name(StdFunctions.format(Map.ofEntries(
                    Map.entry("input", "%s%s"),
                    Map.entry("args",                 
                        cluster.name(),
                        "/Resources")
                )).result())
                .datacenterId(datacenter.id())
                .build());
    
            final var host = VsphereFunctions.getHost(GetHostArgs.builder()
                .name("esxi-01.example.com")
                .datacenterId(datacenter.id())
                .build());
    
            final var network = VsphereFunctions.getNetwork(GetNetworkArgs.builder()
                .name("172.16.11.0")
                .datacenterId(datacenter.id())
                .build());
    
            //# Deployment of VM from Remote OVF
            var vmFromRemoteOvf = new VirtualMachine("vmFromRemoteOvf", VirtualMachineArgs.builder()
                .name("remote-foo")
                .datacenterId(datacenter.id())
                .datastoreId(datastore.i())
                .resourcePoolId(default_.id())
                .waitForGuestNetTimeout(0)
                .waitForGuestIpTimeout(0)
                .ovfDeploy(VirtualMachineOvfDeployArgs.builder()
                    .allowUnverifiedSslCert(false)
                    .remoteOvfUrl("https://example.com/foo.ova")
                    .diskProvisioning("thin")
                    .ipProtocol("IPV4")
                    .ipAllocationPolicy("STATIC_MANUAL")
                    .ovfNetworkMap(Map.ofEntries(
                        Map.entry("Network 1", network.id()),
                        Map.entry("Network 2", network.id())
                    ))
                    .build())
                .vapp(VirtualMachineVappArgs.builder()
                    .properties(Map.ofEntries(
                        Map.entry("guestinfo.hostname", "remote-foo.example.com"),
                        Map.entry("guestinfo.ipaddress", "172.16.11.101"),
                        Map.entry("guestinfo.netmask", "255.255.255.0"),
                        Map.entry("guestinfo.gateway", "172.16.11.1"),
                        Map.entry("guestinfo.dns", "172.16.11.4"),
                        Map.entry("guestinfo.domain", "example.com"),
                        Map.entry("guestinfo.ntp", "ntp.example.com"),
                        Map.entry("guestinfo.password", "VMware1!"),
                        Map.entry("guestinfo.ssh", "True")
                    ))
                    .build())
                .build());
    
            //# Deployment of VM from Local OVF
            var vmFromLocalOvf = new VirtualMachine("vmFromLocalOvf", VirtualMachineArgs.builder()
                .name("local-foo")
                .datacenterId(datacenter.id())
                .datastoreId(datastore.id())
                .resourcePoolId(default_.id())
                .waitForGuestNetTimeout(0)
                .waitForGuestIpTimeout(0)
                .ovfDeploy(VirtualMachineOvfDeployArgs.builder()
                    .allowUnverifiedSslCert(false)
                    .localOvfPath("/Volume/Storage/OVAs/foo.ova")
                    .diskProvisioning("thin")
                    .ipProtocol("IPV4")
                    .ipAllocationPolicy("STATIC_MANUAL")
                    .ovfNetworkMap(Map.ofEntries(
                        Map.entry("Network 1", network.id()),
                        Map.entry("Network 2", network.id())
                    ))
                    .build())
                .vapp(VirtualMachineVappArgs.builder()
                    .properties(Map.ofEntries(
                        Map.entry("guestinfo.hostname", "local-foo.example.com"),
                        Map.entry("guestinfo.ipaddress", "172.16.11.101"),
                        Map.entry("guestinfo.netmask", "255.255.255.0"),
                        Map.entry("guestinfo.gateway", "172.16.11.1"),
                        Map.entry("guestinfo.dns", "172.16.11.4"),
                        Map.entry("guestinfo.domain", "example.com"),
                        Map.entry("guestinfo.ntp", "ntp.example.com"),
                        Map.entry("guestinfo.password", "VMware1!"),
                        Map.entry("guestinfo.ssh", "True")
                    ))
                    .build())
                .build());
    
        }
    }
    
    resources:
      ## Deployment of VM from Remote OVF
      vmFromRemoteOvf:
        type: vsphere:VirtualMachine
        properties:
          name: remote-foo
          datacenterId: ${datacenter.id}
          datastoreId: ${datastore.i}
          resourcePoolId: ${default.id}
          waitForGuestNetTimeout: 0
          waitForGuestIpTimeout: 0
          ovfDeploy:
            allowUnverifiedSslCert: false
            remoteOvfUrl: https://example.com/foo.ova
            diskProvisioning: thin
            ipProtocol: IPV4
            ipAllocationPolicy: STATIC_MANUAL
            ovfNetworkMap:
              Network 1: ${network.id}
              Network 2: ${network.id}
          vapp:
            properties:
              guestinfo.hostname: remote-foo.example.com
              guestinfo.ipaddress: 172.16.11.101
              guestinfo.netmask: 255.255.255.0
              guestinfo.gateway: 172.16.11.1
              guestinfo.dns: 172.16.11.4
              guestinfo.domain: example.com
              guestinfo.ntp: ntp.example.com
              guestinfo.password: VMware1!
              guestinfo.ssh: True
      ## Deployment of VM from Local OVF
      vmFromLocalOvf:
        type: vsphere:VirtualMachine
        properties:
          name: local-foo
          datacenterId: ${datacenter.id}
          datastoreId: ${datastore.id}
          resourcePoolId: ${default.id}
          waitForGuestNetTimeout: 0
          waitForGuestIpTimeout: 0
          ovfDeploy:
            allowUnverifiedSslCert: false
            localOvfPath: /Volume/Storage/OVAs/foo.ova
            diskProvisioning: thin
            ipProtocol: IPV4
            ipAllocationPolicy: STATIC_MANUAL
            ovfNetworkMap:
              Network 1: ${network.id}
              Network 2: ${network.id}
          vapp:
            properties:
              guestinfo.hostname: local-foo.example.com
              guestinfo.ipaddress: 172.16.11.101
              guestinfo.netmask: 255.255.255.0
              guestinfo.gateway: 172.16.11.1
              guestinfo.dns: 172.16.11.4
              guestinfo.domain: example.com
              guestinfo.ntp: ntp.example.com
              guestinfo.password: VMware1!
              guestinfo.ssh: True
    variables:
      datacenter:
        fn::invoke:
          function: vsphere:getDatacenter
          arguments:
            name: dc-01
      datastore:
        fn::invoke:
          function: vsphere:getDatastore
          arguments:
            name: datastore-01
            datacenterId: ${datacenter.id}
      cluster:
        fn::invoke:
          function: vsphere:getComputeCluster
          arguments:
            name: cluster-01
            datacenterId: ${datacenter.id}
      default:
        fn::invoke:
          function: vsphere:getResourcePool
          arguments:
            name:
              fn::invoke:
                function: std:format
                arguments:
                  input: '%s%s'
                  args:
                    - ${cluster.name}
                    - /Resources
                return: result
            datacenterId: ${datacenter.id}
      host:
        fn::invoke:
          function: vsphere:getHost
          arguments:
            name: esxi-01.example.com
            datacenterId: ${datacenter.id}
      network:
        fn::invoke:
          function: vsphere:getNetwork
          arguments:
            name: 172.16.11.0
            datacenterId: ${datacenter.id}
    

    In some scenarios, the Terraform provider may attempt to apply only the default settings. A virtual machine deployed directly from an OVF/OVA may not match the OVF specification. For example, if the scsi_type option is not included in a vsphere.VirtualMachine resource, the provider will apply a default value of pvscsi and the virtual machine may not boot. In this scenario, use the vsphere.getOvfVmTemplate data source to parse the OVF properties and use the property value as parameters for the vsphere.VirtualMachine resource.

    The following example demonstrates a scenario deploying a nested ESXi host from an OVF/OVA, using the remote URL and local path options.

    Example:

    import * as pulumi from "@pulumi/pulumi";
    import * as std from "@pulumi/std";
    import * as vsphere from "@pulumi/vsphere";
    
    const datacenter = vsphere.getDatacenter({
        name: "dc-01",
    });
    const datastore = datacenter.then(datacenter => vsphere.getDatastore({
        name: "datastore-01",
        datacenterId: datacenter.id,
    }));
    const cluster = datacenter.then(datacenter => vsphere.getComputeCluster({
        name: "cluster-01",
        datacenterId: datacenter.id,
    }));
    const _default = Promise.all([cluster, datacenter]).then(([cluster, datacenter]) => vsphere.getResourcePool({
        name: std.index.format({
            input: "%s%s",
            args: [
                cluster.name,
                "/Resources",
            ],
        }).result,
        datacenterId: datacenter.id,
    }));
    const host = datacenter.then(datacenter => vsphere.getHost({
        name: "esxi-01.example.com",
        datacenterId: datacenter.id,
    }));
    const network = datacenter.then(datacenter => vsphere.getNetwork({
        name: "172.16.11.0",
        datacenterId: datacenter.id,
    }));
    //# Remote OVF/OVA Source
    const ovfRemote = Promise.all([_default, datastore, network]).then(([_default, datastore, network]) => vsphere.getOvfVmTemplate({
        name: "ubuntu-xx.xx-server-cloudimg-amd64.ova",
        diskProvisioning: "thin",
        resourcePoolId: _default.id,
        datastoreId: datastore.id,
        remoteOvfUrl: "https://cloud-images.ubuntu.com/releases/xx.xx/release/ubuntu-xx.xx-server-cloudimg-amd64.ova",
        ovfNetworkMap: {
            "VM Network": network.id,
        },
    }));
    //# Local OVF/OVA Source
    const ovfLocal = Promise.all([_default, datastore, network]).then(([_default, datastore, network]) => vsphere.getOvfVmTemplate({
        name: "ubuntu-xx.xx-server-cloudimg-amd64.ova",
        diskProvisioning: "thin",
        resourcePoolId: _default.id,
        datastoreId: datastore.id,
        localOvfPath: "/Volume/Storage/OVA/ubuntu-xx-xx-server-cloudimg-amd64.ova",
        ovfNetworkMap: {
            "VM Network": network.id,
        },
    }));
    //# Deployment of VM from Remote OVF
    const vmFromRemoteOvf = new vsphere.VirtualMachine("vmFromRemoteOvf", {
        networkInterfaces: .map(entry => ({
            networkId: entry.value,
        })),
        name: "ubuntu-server-cloud-image-01",
        datacenterId: datacenter.then(datacenter => datacenter.id),
        datastoreId: datastore.then(datastore => datastore.id),
        resourcePoolId: _default.then(_default => _default.id),
        numCpus: ovfRemote.then(ovfRemote => ovfRemote.numCpus),
        numCoresPerSocket: ovfRemote.then(ovfRemote => ovfRemote.numCoresPerSocket),
        memory: ovfRemote.then(ovfRemote => ovfRemote.memory),
        guestId: ovfRemote.then(ovfRemote => ovfRemote.guestId),
        firmware: ovfRemote.then(ovfRemote => ovfRemote.firmware),
        scsiType: ovfRemote.then(ovfRemote => ovfRemote.scsiType),
        waitForGuestNetTimeout: 0,
        waitForGuestIpTimeout: 0,
        ovfDeploy: {
            remoteOvfUrl: "https://cloud-images.ubuntu.com/releases/xx.xx/release/ubuntu-xx.xx-server-cloudimg-amd64.ova",
            ovfNetworkMap: ovfRemote.then(ovfRemote => ovfRemote.ovfNetworkMap),
        },
        cdroms: [{
            clientDevice: true,
        }],
        vapp: {
            properties: {
                hostname: remoteOvfName,
                "instance-id": remoteOvfUuid,
                "public-keys": remoteOvfPublicKeys,
                password: remoteOvfPassword,
                "user-data": std.index.base64encode({
                    input: remoteOvfUserData,
                }).result,
            },
        },
    });
    //# Deployment of VM from Local OVF
    const vmFromLocalOvf = new vsphere.VirtualMachine("vmFromLocalOvf", {
        networkInterfaces: .map(entry => ({
            networkId: entry.value,
        })),
        name: "ubuntu-server-cloud-image-02",
        datacenterId: datacenter.then(datacenter => datacenter.id),
        datastoreId: datastore.then(datastore => datastore.id),
        resourcePoolId: _default.then(_default => _default.id),
        numCpus: ovfLocal.then(ovfLocal => ovfLocal.numCpus),
        numCoresPerSocket: ovfLocal.then(ovfLocal => ovfLocal.numCoresPerSocket),
        memory: ovfLocal.then(ovfLocal => ovfLocal.memory),
        guestId: ovfLocal.then(ovfLocal => ovfLocal.guestId),
        firmware: ovfLocal.then(ovfLocal => ovfLocal.firmware),
        scsiType: ovfLocal.then(ovfLocal => ovfLocal.scsiType),
        waitForGuestNetTimeout: 0,
        waitForGuestIpTimeout: 0,
        ovfDeploy: {
            allowUnverifiedSslCert: false,
            localOvfPath: ovfLocal.then(ovfLocal => ovfLocal.localOvfPath),
            diskProvisioning: ovfLocal.then(ovfLocal => ovfLocal.diskProvisioning),
            ovfNetworkMap: ovfLocal.then(ovfLocal => ovfLocal.ovfNetworkMap),
        },
        cdroms: [{
            clientDevice: true,
        }],
        vapp: {
            properties: {
                hostname: localOvfName,
                "instance-id": localOvfUuid,
                "public-keys": localOvfPublicKeys,
                password: localOvfPassword,
                "user-data": std.index.base64encode({
                    input: localOvfUserData,
                }).result,
            },
        },
    });
    
    import pulumi
    import pulumi_std as std
    import pulumi_vsphere as vsphere
    
    datacenter = vsphere.get_datacenter(name="dc-01")
    datastore = vsphere.get_datastore(name="datastore-01",
        datacenter_id=datacenter.id)
    cluster = vsphere.get_compute_cluster(name="cluster-01",
        datacenter_id=datacenter.id)
    default = vsphere.get_resource_pool(name=std.index.format(input="%s%s",
            args=[
                cluster.name,
                "/Resources",
            ])["result"],
        datacenter_id=datacenter.id)
    host = vsphere.get_host(name="esxi-01.example.com",
        datacenter_id=datacenter.id)
    network = vsphere.get_network(name="172.16.11.0",
        datacenter_id=datacenter.id)
    ## Remote OVF/OVA Source
    ovf_remote = vsphere.get_ovf_vm_template(name="ubuntu-xx.xx-server-cloudimg-amd64.ova",
        disk_provisioning="thin",
        resource_pool_id=default.id,
        datastore_id=datastore.id,
        remote_ovf_url="https://cloud-images.ubuntu.com/releases/xx.xx/release/ubuntu-xx.xx-server-cloudimg-amd64.ova",
        ovf_network_map={
            "VM Network": network.id,
        })
    ## Local OVF/OVA Source
    ovf_local = vsphere.get_ovf_vm_template(name="ubuntu-xx.xx-server-cloudimg-amd64.ova",
        disk_provisioning="thin",
        resource_pool_id=default.id,
        datastore_id=datastore.id,
        local_ovf_path="/Volume/Storage/OVA/ubuntu-xx-xx-server-cloudimg-amd64.ova",
        ovf_network_map={
            "VM Network": network.id,
        })
    ## Deployment of VM from Remote OVF
    vm_from_remote_ovf = vsphere.VirtualMachine("vmFromRemoteOvf",
        network_interfaces=[{"key": k, "value": v} for k, v in ovf_remote.ovf_network_map.items()].apply(lambda entries: [{
            "networkId": entry["value"],
        } for entry in entries]),
        name="ubuntu-server-cloud-image-01",
        datacenter_id=datacenter.id,
        datastore_id=datastore.id,
        resource_pool_id=default.id,
        num_cpus=ovf_remote.num_cpus,
        num_cores_per_socket=ovf_remote.num_cores_per_socket,
        memory=ovf_remote.memory,
        guest_id=ovf_remote.guest_id,
        firmware=ovf_remote.firmware,
        scsi_type=ovf_remote.scsi_type,
        wait_for_guest_net_timeout=0,
        wait_for_guest_ip_timeout=0,
        ovf_deploy={
            "remote_ovf_url": "https://cloud-images.ubuntu.com/releases/xx.xx/release/ubuntu-xx.xx-server-cloudimg-amd64.ova",
            "ovf_network_map": ovf_remote.ovf_network_map,
        },
        cdroms=[{
            "client_device": True,
        }],
        vapp={
            "properties": {
                "hostname": remote_ovf_name,
                "instance-id": remote_ovf_uuid,
                "public-keys": remote_ovf_public_keys,
                "password": remote_ovf_password,
                "user-data": std.index.base64encode(input=remote_ovf_user_data)["result"],
            },
        })
    ## Deployment of VM from Local OVF
    vm_from_local_ovf = vsphere.VirtualMachine("vmFromLocalOvf",
        network_interfaces=[{"key": k, "value": v} for k, v in ovf_local.ovf_network_map.items()].apply(lambda entries: [{
            "networkId": entry["value"],
        } for entry in entries]),
        name="ubuntu-server-cloud-image-02",
        datacenter_id=datacenter.id,
        datastore_id=datastore.id,
        resource_pool_id=default.id,
        num_cpus=ovf_local.num_cpus,
        num_cores_per_socket=ovf_local.num_cores_per_socket,
        memory=ovf_local.memory,
        guest_id=ovf_local.guest_id,
        firmware=ovf_local.firmware,
        scsi_type=ovf_local.scsi_type,
        wait_for_guest_net_timeout=0,
        wait_for_guest_ip_timeout=0,
        ovf_deploy={
            "allow_unverified_ssl_cert": False,
            "local_ovf_path": ovf_local.local_ovf_path,
            "disk_provisioning": ovf_local.disk_provisioning,
            "ovf_network_map": ovf_local.ovf_network_map,
        },
        cdroms=[{
            "client_device": True,
        }],
        vapp={
            "properties": {
                "hostname": local_ovf_name,
                "instance-id": local_ovf_uuid,
                "public-keys": local_ovf_public_keys,
                "password": local_ovf_password,
                "user-data": std.index.base64encode(input=local_ovf_user_data)["result"],
            },
        })
    
    Example coming soon!
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Std = Pulumi.Std;
    using VSphere = Pulumi.VSphere;
    
    return await Deployment.RunAsync(() => 
    {
        var datacenter = VSphere.GetDatacenter.Invoke(new()
        {
            Name = "dc-01",
        });
    
        var datastore = VSphere.GetDatastore.Invoke(new()
        {
            Name = "datastore-01",
            DatacenterId = datacenter.Apply(getDatacenterResult => getDatacenterResult.Id),
        });
    
        var cluster = VSphere.GetComputeCluster.Invoke(new()
        {
            Name = "cluster-01",
            DatacenterId = datacenter.Apply(getDatacenterResult => getDatacenterResult.Id),
        });
    
        var @default = VSphere.GetResourcePool.Invoke(new()
        {
            Name = Std.Index.Format.Invoke(new()
            {
                Input = "%s%s",
                Args = new[]
                {
                    cluster.Apply(getComputeClusterResult => getComputeClusterResult.Name),
                    "/Resources",
                },
            }).Result,
            DatacenterId = datacenter.Apply(getDatacenterResult => getDatacenterResult.Id),
        });
    
        var host = VSphere.GetHost.Invoke(new()
        {
            Name = "esxi-01.example.com",
            DatacenterId = datacenter.Apply(getDatacenterResult => getDatacenterResult.Id),
        });
    
        var network = VSphere.GetNetwork.Invoke(new()
        {
            Name = "172.16.11.0",
            DatacenterId = datacenter.Apply(getDatacenterResult => getDatacenterResult.Id),
        });
    
        //# Remote OVF/OVA Source
        var ovfRemote = VSphere.GetOvfVmTemplate.Invoke(new()
        {
            Name = "ubuntu-xx.xx-server-cloudimg-amd64.ova",
            DiskProvisioning = "thin",
            ResourcePoolId = @default.Apply(getResourcePoolResult => getResourcePoolResult.Id),
            DatastoreId = datastore.Apply(getDatastoreResult => getDatastoreResult.Id),
            RemoteOvfUrl = "https://cloud-images.ubuntu.com/releases/xx.xx/release/ubuntu-xx.xx-server-cloudimg-amd64.ova",
            OvfNetworkMap = 
            {
                { "VM Network", network.Apply(getNetworkResult => getNetworkResult.Id) },
            },
        });
    
        //# Local OVF/OVA Source
        var ovfLocal = VSphere.GetOvfVmTemplate.Invoke(new()
        {
            Name = "ubuntu-xx.xx-server-cloudimg-amd64.ova",
            DiskProvisioning = "thin",
            ResourcePoolId = @default.Apply(getResourcePoolResult => getResourcePoolResult.Id),
            DatastoreId = datastore.Apply(getDatastoreResult => getDatastoreResult.Id),
            LocalOvfPath = "/Volume/Storage/OVA/ubuntu-xx-xx-server-cloudimg-amd64.ova",
            OvfNetworkMap = 
            {
                { "VM Network", network.Apply(getNetworkResult => getNetworkResult.Id) },
            },
        });
    
        //# Deployment of VM from Remote OVF
        var vmFromRemoteOvf = new VSphere.VirtualMachine("vmFromRemoteOvf", new()
        {
            NetworkInterfaces = ,
            Name = "ubuntu-server-cloud-image-01",
            DatacenterId = datacenter.Apply(getDatacenterResult => getDatacenterResult.Id),
            DatastoreId = datastore.Apply(getDatastoreResult => getDatastoreResult.Id),
            ResourcePoolId = @default.Apply(@default => @default.Apply(getResourcePoolResult => getResourcePoolResult.Id)),
            NumCpus = ovfRemote.Apply(getOvfVmTemplateResult => getOvfVmTemplateResult.NumCpus),
            NumCoresPerSocket = ovfRemote.Apply(getOvfVmTemplateResult => getOvfVmTemplateResult.NumCoresPerSocket),
            Memory = ovfRemote.Apply(getOvfVmTemplateResult => getOvfVmTemplateResult.Memory),
            GuestId = ovfRemote.Apply(getOvfVmTemplateResult => getOvfVmTemplateResult.GuestId),
            Firmware = ovfRemote.Apply(getOvfVmTemplateResult => getOvfVmTemplateResult.Firmware),
            ScsiType = ovfRemote.Apply(getOvfVmTemplateResult => getOvfVmTemplateResult.ScsiType),
            WaitForGuestNetTimeout = 0,
            WaitForGuestIpTimeout = 0,
            OvfDeploy = new VSphere.Inputs.VirtualMachineOvfDeployArgs
            {
                RemoteOvfUrl = "https://cloud-images.ubuntu.com/releases/xx.xx/release/ubuntu-xx.xx-server-cloudimg-amd64.ova",
                OvfNetworkMap = ovfRemote.Apply(getOvfVmTemplateResult => getOvfVmTemplateResult.OvfNetworkMap),
            },
            Cdroms = new[]
            {
                new VSphere.Inputs.VirtualMachineCdromArgs
                {
                    ClientDevice = true,
                },
            },
            Vapp = new VSphere.Inputs.VirtualMachineVappArgs
            {
                Properties = 
                {
                    { "hostname", remoteOvfName },
                    { "instance-id", remoteOvfUuid },
                    { "public-keys", remoteOvfPublicKeys },
                    { "password", remoteOvfPassword },
                    { "user-data", Std.Index.Base64encode.Invoke(new()
                    {
                        Input = remoteOvfUserData,
                    }).Result },
                },
            },
        });
    
        //# Deployment of VM from Local OVF
        var vmFromLocalOvf = new VSphere.VirtualMachine("vmFromLocalOvf", new()
        {
            NetworkInterfaces = ,
            Name = "ubuntu-server-cloud-image-02",
            DatacenterId = datacenter.Apply(getDatacenterResult => getDatacenterResult.Id),
            DatastoreId = datastore.Apply(getDatastoreResult => getDatastoreResult.Id),
            ResourcePoolId = @default.Apply(@default => @default.Apply(getResourcePoolResult => getResourcePoolResult.Id)),
            NumCpus = ovfLocal.Apply(getOvfVmTemplateResult => getOvfVmTemplateResult.NumCpus),
            NumCoresPerSocket = ovfLocal.Apply(getOvfVmTemplateResult => getOvfVmTemplateResult.NumCoresPerSocket),
            Memory = ovfLocal.Apply(getOvfVmTemplateResult => getOvfVmTemplateResult.Memory),
            GuestId = ovfLocal.Apply(getOvfVmTemplateResult => getOvfVmTemplateResult.GuestId),
            Firmware = ovfLocal.Apply(getOvfVmTemplateResult => getOvfVmTemplateResult.Firmware),
            ScsiType = ovfLocal.Apply(getOvfVmTemplateResult => getOvfVmTemplateResult.ScsiType),
            WaitForGuestNetTimeout = 0,
            WaitForGuestIpTimeout = 0,
            OvfDeploy = new VSphere.Inputs.VirtualMachineOvfDeployArgs
            {
                AllowUnverifiedSslCert = false,
                LocalOvfPath = ovfLocal.Apply(getOvfVmTemplateResult => getOvfVmTemplateResult.LocalOvfPath),
                DiskProvisioning = ovfLocal.Apply(getOvfVmTemplateResult => getOvfVmTemplateResult.DiskProvisioning),
                OvfNetworkMap = ovfLocal.Apply(getOvfVmTemplateResult => getOvfVmTemplateResult.OvfNetworkMap),
            },
            Cdroms = new[]
            {
                new VSphere.Inputs.VirtualMachineCdromArgs
                {
                    ClientDevice = true,
                },
            },
            Vapp = new VSphere.Inputs.VirtualMachineVappArgs
            {
                Properties = 
                {
                    { "hostname", localOvfName },
                    { "instance-id", localOvfUuid },
                    { "public-keys", localOvfPublicKeys },
                    { "password", localOvfPassword },
                    { "user-data", Std.Index.Base64encode.Invoke(new()
                    {
                        Input = localOvfUserData,
                    }).Result },
                },
            },
        });
    
    });
    
    Example coming soon!
    
    Example coming soon!
    

    Cloning from an OVF/OVA with vApp Properties

    This alternate example illustrates how to clone a virtual machine from a template that originated from an OVF/OVA. This leverages the resource’s vApp properties capabilities to set appropriate keys that control various configuration settings on the virtual machine or virtual appliance. In this scenario, using customize is not recommended as the functionality tends to overlap.

    Example:

    import * as pulumi from "@pulumi/pulumi";
    import * as std from "@pulumi/std";
    import * as vsphere from "@pulumi/vsphere";
    
    const datacenter = vsphere.getDatacenter({
        name: "dc-01",
    });
    const datastore = datacenter.then(datacenter => vsphere.getDatastore({
        name: "datastore-01",
        datacenterId: datacenter.id,
    }));
    const cluster = datacenter.then(datacenter => vsphere.getComputeCluster({
        name: "cluster-01",
        datacenterId: datacenter.id,
    }));
    const _default = Promise.all([cluster, datacenter]).then(([cluster, datacenter]) => vsphere.getResourcePool({
        name: std.index.format({
            input: "%s%s",
            args: [
                cluster.name,
                "/Resources",
            ],
        }).result,
        datacenterId: datacenter.id,
    }));
    const host = datacenter.then(datacenter => vsphere.getHost({
        name: "esxi-01.example.com",
        datacenterId: datacenter.id,
    }));
    const network = datacenter.then(datacenter => vsphere.getNetwork({
        name: "172.16.11.0",
        datacenterId: datacenter.id,
    }));
    const templateFromOvf = datacenter.then(datacenter => vsphere.getVirtualMachine({
        name: "ubuntu-server-template-from-ova",
        datacenterId: datacenter.id,
    }));
    const vm = new vsphere.VirtualMachine("vm", {
        name: "foo",
        resourcePoolId: cluster.then(cluster => cluster.resourcePoolId),
        datastoreId: datastore.then(datastore => datastore.id),
        numCpus: 2,
        memory: 1024,
        guestId: template.guestId,
        scsiType: template.scsiType,
        networkInterfaces: [{
            networkId: network.then(network => network.id),
            adapterType: template.networkInterfaceTypes[0],
        }],
        disks: [{
            name: "Hard Disk 1",
            size: templateFromOvf.then(templateFromOvf => templateFromOvf.disks?.[0]?.size),
            thinProvisioned: templateFromOvf.then(templateFromOvf => templateFromOvf.disks?.[0]?.thinProvisioned),
        }],
        clone: {
            templateUuid: templateFromOvf.then(templateFromOvf => templateFromOvf.id),
        },
        vapp: {
            properties: {
                "guestinfo.hostname": "foo.example.com",
                "guestinfo.ipaddress": "172.16.11.101",
                "guestinfo.netmask": "255.255.255.0",
                "guestinfo.gateway": "172.16.11.1",
                "guestinfo.dns": "172.16.11.4",
                "guestinfo.domain": "example.com",
                "guestinfo.ntp": "ntp.example.com",
                "guestinfo.password": "VMware1!",
                "guestinfo.ssh": "True",
            },
        },
    });
    
    import pulumi
    import pulumi_std as std
    import pulumi_vsphere as vsphere
    
    datacenter = vsphere.get_datacenter(name="dc-01")
    datastore = vsphere.get_datastore(name="datastore-01",
        datacenter_id=datacenter.id)
    cluster = vsphere.get_compute_cluster(name="cluster-01",
        datacenter_id=datacenter.id)
    default = vsphere.get_resource_pool(name=std.index.format(input="%s%s",
            args=[
                cluster.name,
                "/Resources",
            ])["result"],
        datacenter_id=datacenter.id)
    host = vsphere.get_host(name="esxi-01.example.com",
        datacenter_id=datacenter.id)
    network = vsphere.get_network(name="172.16.11.0",
        datacenter_id=datacenter.id)
    template_from_ovf = vsphere.get_virtual_machine(name="ubuntu-server-template-from-ova",
        datacenter_id=datacenter.id)
    vm = vsphere.VirtualMachine("vm",
        name="foo",
        resource_pool_id=cluster.resource_pool_id,
        datastore_id=datastore.id,
        num_cpus=2,
        memory=1024,
        guest_id=template["guestId"],
        scsi_type=template["scsiType"],
        network_interfaces=[{
            "network_id": network.id,
            "adapter_type": template["networkInterfaceTypes"][0],
        }],
        disks=[{
            "name": "Hard Disk 1",
            "size": template_from_ovf.disks[0].size,
            "thin_provisioned": template_from_ovf.disks[0].thin_provisioned,
        }],
        clone={
            "template_uuid": template_from_ovf.id,
        },
        vapp={
            "properties": {
                "guestinfo.hostname": "foo.example.com",
                "guestinfo.ipaddress": "172.16.11.101",
                "guestinfo.netmask": "255.255.255.0",
                "guestinfo.gateway": "172.16.11.1",
                "guestinfo.dns": "172.16.11.4",
                "guestinfo.domain": "example.com",
                "guestinfo.ntp": "ntp.example.com",
                "guestinfo.password": "VMware1!",
                "guestinfo.ssh": "True",
            },
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-std/sdk/go/std"
    	"github.com/pulumi/pulumi-vsphere/sdk/v4/go/vsphere"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		datacenter, err := vsphere.LookupDatacenter(ctx, &vsphere.LookupDatacenterArgs{
    			Name: pulumi.StringRef("dc-01"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		datastore, err := vsphere.GetDatastore(ctx, &vsphere.GetDatastoreArgs{
    			Name:         "datastore-01",
    			DatacenterId: pulumi.StringRef(datacenter.Id),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		cluster, err := vsphere.LookupComputeCluster(ctx, &vsphere.LookupComputeClusterArgs{
    			Name:         "cluster-01",
    			DatacenterId: pulumi.StringRef(datacenter.Id),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = vsphere.LookupResourcePool(ctx, &vsphere.LookupResourcePoolArgs{
    			Name: pulumi.StringRef(std.Format(ctx, map[string]interface{}{
    				"input": "%s%s",
    				"args": []*string{
    					cluster.Name,
    					"/Resources",
    				},
    			}, nil).Result),
    			DatacenterId: pulumi.StringRef(datacenter.Id),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = vsphere.LookupHost(ctx, &vsphere.LookupHostArgs{
    			Name:         pulumi.StringRef("esxi-01.example.com"),
    			DatacenterId: datacenter.Id,
    		}, nil)
    		if err != nil {
    			return err
    		}
    		network, err := vsphere.GetNetwork(ctx, &vsphere.GetNetworkArgs{
    			Name:         "172.16.11.0",
    			DatacenterId: pulumi.StringRef(datacenter.Id),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		templateFromOvf, err := vsphere.LookupVirtualMachine(ctx, &vsphere.LookupVirtualMachineArgs{
    			Name:         pulumi.StringRef("ubuntu-server-template-from-ova"),
    			DatacenterId: pulumi.StringRef(datacenter.Id),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = vsphere.NewVirtualMachine(ctx, "vm", &vsphere.VirtualMachineArgs{
    			Name:           pulumi.String("foo"),
    			ResourcePoolId: pulumi.String(cluster.ResourcePoolId),
    			DatastoreId:    pulumi.String(datastore.Id),
    			NumCpus:        pulumi.Int(2),
    			Memory:         pulumi.Int(1024),
    			GuestId:        pulumi.Any(template.GuestId),
    			ScsiType:       pulumi.Any(template.ScsiType),
    			NetworkInterfaces: vsphere.VirtualMachineNetworkInterfaceArray{
    				&vsphere.VirtualMachineNetworkInterfaceArgs{
    					NetworkId:   pulumi.String(network.Id),
    					AdapterType: pulumi.Any(template.NetworkInterfaceTypes[0]),
    				},
    			},
    			Disks: vsphere.VirtualMachineDiskArray{
    				&vsphere.VirtualMachineDiskArgs{
    					Name:            "Hard Disk 1",
    					Size:            pulumi.Int(templateFromOvf.Disks[0].Size),
    					ThinProvisioned: pulumi.Bool(templateFromOvf.Disks[0].ThinProvisioned),
    				},
    			},
    			Clone: &vsphere.VirtualMachineCloneArgs{
    				TemplateUuid: pulumi.String(templateFromOvf.Id),
    			},
    			Vapp: &vsphere.VirtualMachineVappArgs{
    				Properties: pulumi.StringMap{
    					"guestinfo.hostname":  pulumi.String("foo.example.com"),
    					"guestinfo.ipaddress": pulumi.String("172.16.11.101"),
    					"guestinfo.netmask":   pulumi.String("255.255.255.0"),
    					"guestinfo.gateway":   pulumi.String("172.16.11.1"),
    					"guestinfo.dns":       pulumi.String("172.16.11.4"),
    					"guestinfo.domain":    pulumi.String("example.com"),
    					"guestinfo.ntp":       pulumi.String("ntp.example.com"),
    					"guestinfo.password":  pulumi.String("VMware1!"),
    					"guestinfo.ssh":       pulumi.String("True"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Std = Pulumi.Std;
    using VSphere = Pulumi.VSphere;
    
    return await Deployment.RunAsync(() => 
    {
        var datacenter = VSphere.GetDatacenter.Invoke(new()
        {
            Name = "dc-01",
        });
    
        var datastore = VSphere.GetDatastore.Invoke(new()
        {
            Name = "datastore-01",
            DatacenterId = datacenter.Apply(getDatacenterResult => getDatacenterResult.Id),
        });
    
        var cluster = VSphere.GetComputeCluster.Invoke(new()
        {
            Name = "cluster-01",
            DatacenterId = datacenter.Apply(getDatacenterResult => getDatacenterResult.Id),
        });
    
        var @default = VSphere.GetResourcePool.Invoke(new()
        {
            Name = Std.Index.Format.Invoke(new()
            {
                Input = "%s%s",
                Args = new[]
                {
                    cluster.Apply(getComputeClusterResult => getComputeClusterResult.Name),
                    "/Resources",
                },
            }).Result,
            DatacenterId = datacenter.Apply(getDatacenterResult => getDatacenterResult.Id),
        });
    
        var host = VSphere.GetHost.Invoke(new()
        {
            Name = "esxi-01.example.com",
            DatacenterId = datacenter.Apply(getDatacenterResult => getDatacenterResult.Id),
        });
    
        var network = VSphere.GetNetwork.Invoke(new()
        {
            Name = "172.16.11.0",
            DatacenterId = datacenter.Apply(getDatacenterResult => getDatacenterResult.Id),
        });
    
        var templateFromOvf = VSphere.GetVirtualMachine.Invoke(new()
        {
            Name = "ubuntu-server-template-from-ova",
            DatacenterId = datacenter.Apply(getDatacenterResult => getDatacenterResult.Id),
        });
    
        var vm = new VSphere.VirtualMachine("vm", new()
        {
            Name = "foo",
            ResourcePoolId = cluster.Apply(getComputeClusterResult => getComputeClusterResult.ResourcePoolId),
            DatastoreId = datastore.Apply(getDatastoreResult => getDatastoreResult.Id),
            NumCpus = 2,
            Memory = 1024,
            GuestId = template.GuestId,
            ScsiType = template.ScsiType,
            NetworkInterfaces = new[]
            {
                new VSphere.Inputs.VirtualMachineNetworkInterfaceArgs
                {
                    NetworkId = network.Apply(getNetworkResult => getNetworkResult.Id),
                    AdapterType = template.NetworkInterfaceTypes[0],
                },
            },
            Disks = new[]
            {
                new VSphere.Inputs.VirtualMachineDiskArgs
                {
                    Name = "Hard Disk 1",
                    Size = templateFromOvf.Apply(getVirtualMachineResult => getVirtualMachineResult.Disks[0]?.Size),
                    ThinProvisioned = templateFromOvf.Apply(getVirtualMachineResult => getVirtualMachineResult.Disks[0]?.ThinProvisioned),
                },
            },
            Clone = new VSphere.Inputs.VirtualMachineCloneArgs
            {
                TemplateUuid = templateFromOvf.Apply(getVirtualMachineResult => getVirtualMachineResult.Id),
            },
            Vapp = new VSphere.Inputs.VirtualMachineVappArgs
            {
                Properties = 
                {
                    { "guestinfo.hostname", "foo.example.com" },
                    { "guestinfo.ipaddress", "172.16.11.101" },
                    { "guestinfo.netmask", "255.255.255.0" },
                    { "guestinfo.gateway", "172.16.11.1" },
                    { "guestinfo.dns", "172.16.11.4" },
                    { "guestinfo.domain", "example.com" },
                    { "guestinfo.ntp", "ntp.example.com" },
                    { "guestinfo.password", "VMware1!" },
                    { "guestinfo.ssh", "True" },
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.vsphere.VsphereFunctions;
    import com.pulumi.vsphere.inputs.GetDatacenterArgs;
    import com.pulumi.vsphere.inputs.GetDatastoreArgs;
    import com.pulumi.vsphere.inputs.GetComputeClusterArgs;
    import com.pulumi.std.StdFunctions;
    import com.pulumi.vsphere.inputs.GetResourcePoolArgs;
    import com.pulumi.vsphere.inputs.GetHostArgs;
    import com.pulumi.vsphere.inputs.GetNetworkArgs;
    import com.pulumi.vsphere.inputs.GetVirtualMachineArgs;
    import com.pulumi.vsphere.VirtualMachine;
    import com.pulumi.vsphere.VirtualMachineArgs;
    import com.pulumi.vsphere.inputs.VirtualMachineNetworkInterfaceArgs;
    import com.pulumi.vsphere.inputs.VirtualMachineDiskArgs;
    import com.pulumi.vsphere.inputs.VirtualMachineCloneArgs;
    import com.pulumi.vsphere.inputs.VirtualMachineVappArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var datacenter = VsphereFunctions.getDatacenter(GetDatacenterArgs.builder()
                .name("dc-01")
                .build());
    
            final var datastore = VsphereFunctions.getDatastore(GetDatastoreArgs.builder()
                .name("datastore-01")
                .datacenterId(datacenter.id())
                .build());
    
            final var cluster = VsphereFunctions.getComputeCluster(GetComputeClusterArgs.builder()
                .name("cluster-01")
                .datacenterId(datacenter.id())
                .build());
    
            final var default = VsphereFunctions.getResourcePool(GetResourcePoolArgs.builder()
                .name(StdFunctions.format(Map.ofEntries(
                    Map.entry("input", "%s%s"),
                    Map.entry("args",                 
                        cluster.name(),
                        "/Resources")
                )).result())
                .datacenterId(datacenter.id())
                .build());
    
            final var host = VsphereFunctions.getHost(GetHostArgs.builder()
                .name("esxi-01.example.com")
                .datacenterId(datacenter.id())
                .build());
    
            final var network = VsphereFunctions.getNetwork(GetNetworkArgs.builder()
                .name("172.16.11.0")
                .datacenterId(datacenter.id())
                .build());
    
            final var templateFromOvf = VsphereFunctions.getVirtualMachine(GetVirtualMachineArgs.builder()
                .name("ubuntu-server-template-from-ova")
                .datacenterId(datacenter.id())
                .build());
    
            var vm = new VirtualMachine("vm", VirtualMachineArgs.builder()
                .name("foo")
                .resourcePoolId(cluster.resourcePoolId())
                .datastoreId(datastore.id())
                .numCpus(2)
                .memory(1024)
                .guestId(template.guestId())
                .scsiType(template.scsiType())
                .networkInterfaces(VirtualMachineNetworkInterfaceArgs.builder()
                    .networkId(network.id())
                    .adapterType(template.networkInterfaceTypes()[0])
                    .build())
                .disks(VirtualMachineDiskArgs.builder()
                    .name("Hard Disk 1")
                    .size(templateFromOvf.disks()[0].size())
                    .thinProvisioned(templateFromOvf.disks()[0].thinProvisioned())
                    .build())
                .clone(VirtualMachineCloneArgs.builder()
                    .templateUuid(templateFromOvf.id())
                    .build())
                .vapp(VirtualMachineVappArgs.builder()
                    .properties(Map.ofEntries(
                        Map.entry("guestinfo.hostname", "foo.example.com"),
                        Map.entry("guestinfo.ipaddress", "172.16.11.101"),
                        Map.entry("guestinfo.netmask", "255.255.255.0"),
                        Map.entry("guestinfo.gateway", "172.16.11.1"),
                        Map.entry("guestinfo.dns", "172.16.11.4"),
                        Map.entry("guestinfo.domain", "example.com"),
                        Map.entry("guestinfo.ntp", "ntp.example.com"),
                        Map.entry("guestinfo.password", "VMware1!"),
                        Map.entry("guestinfo.ssh", "True")
                    ))
                    .build())
                .build());
    
        }
    }
    
    resources:
      vm:
        type: vsphere:VirtualMachine
        properties:
          name: foo
          resourcePoolId: ${cluster.resourcePoolId}
          datastoreId: ${datastore.id}
          numCpus: 2
          memory: 1024
          guestId: ${template.guestId}
          scsiType: ${template.scsiType}
          networkInterfaces:
            - networkId: ${network.id}
              adapterType: ${template.networkInterfaceTypes[0]}
          disks:
            - name: Hard Disk 1
              size: ${templateFromOvf.disks[0].size}
              thinProvisioned: ${templateFromOvf.disks[0].thinProvisioned}
          clone:
            templateUuid: ${templateFromOvf.id}
          vapp:
            properties:
              guestinfo.hostname: foo.example.com
              guestinfo.ipaddress: 172.16.11.101
              guestinfo.netmask: 255.255.255.0
              guestinfo.gateway: 172.16.11.1
              guestinfo.dns: 172.16.11.4
              guestinfo.domain: example.com
              guestinfo.ntp: ntp.example.com
              guestinfo.password: VMware1!
              guestinfo.ssh: True
    variables:
      datacenter:
        fn::invoke:
          function: vsphere:getDatacenter
          arguments:
            name: dc-01
      datastore:
        fn::invoke:
          function: vsphere:getDatastore
          arguments:
            name: datastore-01
            datacenterId: ${datacenter.id}
      cluster:
        fn::invoke:
          function: vsphere:getComputeCluster
          arguments:
            name: cluster-01
            datacenterId: ${datacenter.id}
      default:
        fn::invoke:
          function: vsphere:getResourcePool
          arguments:
            name:
              fn::invoke:
                function: std:format
                arguments:
                  input: '%s%s'
                  args:
                    - ${cluster.name}
                    - /Resources
                return: result
            datacenterId: ${datacenter.id}
      host:
        fn::invoke:
          function: vsphere:getHost
          arguments:
            name: esxi-01.example.com
            datacenterId: ${datacenter.id}
      network:
        fn::invoke:
          function: vsphere:getNetwork
          arguments:
            name: 172.16.11.0
            datacenterId: ${datacenter.id}
      templateFromOvf:
        fn::invoke:
          function: vsphere:getVirtualMachine
          arguments:
            name: ubuntu-server-template-from-ova
            datacenterId: ${datacenter.id}
    

    Using vSphere Storage DRS

    The vsphere.VirtualMachine resource also supports vSphere Storage DRS, allowing the assignment of virtual machines to datastore clusters. When assigned to a datastore cluster, changes to a virtual machine’s underlying datastores are ignored unless disks drift outside of the datastore cluster. Note that the vsphere.DatastoreCluster resource also exists to allow for management of datastore clusters using the Terraform provider.

    The following example demonstrates the use of the [vsphere.DatastoreCluster] data sourcetf-vsphere-datastore-cluster-data-source, and the datastore_cluster_id configuration setting.

    NOTE: When managing datastore clusters, member datastores, and virtual machines within the same Terraform configuration, race conditions can apply. This is because datastore clusters must be created before datastores can be assigned to them, and the respective vsphere.VirtualMachine resources will no longer have an implicit dependency on the specific datastore resources. Use depends_on to create an explicit dependency on the datastores in the cluster, or manage datastore clusters and datastores in a separate configuration.

    Example:

    import * as pulumi from "@pulumi/pulumi";
    import * as vsphere from "@pulumi/vsphere";
    
    const datacenter = vsphere.getDatacenter({
        name: "dc-01",
    });
    const datastoreCluster = datacenter.then(datacenter => vsphere.getDatastoreCluster({
        name: "datastore-cluster-01",
        datacenterId: datacenter.id,
    }));
    const cluster = datacenter.then(datacenter => vsphere.getComputeCluster({
        name: "cluster-01",
        datacenterId: datacenter.id,
    }));
    const network = datacenter.then(datacenter => vsphere.getNetwork({
        name: "VM Network",
        datacenterId: datacenter.id,
    }));
    const vm = new vsphere.VirtualMachine("vm", {
        name: "foo",
        resourcePoolId: cluster.then(cluster => cluster.resourcePoolId),
        datastoreClusterId: datastoreCluster.then(datastoreCluster => datastoreCluster.id),
        numCpus: 1,
        memory: 1024,
        guestId: "otherLinux64Guest",
        networkInterfaces: [{
            networkId: network.then(network => network.id),
        }],
        disks: [{
            label: "Hard Disk 1",
            size: 20,
        }],
    });
    
    import pulumi
    import pulumi_vsphere as vsphere
    
    datacenter = vsphere.get_datacenter(name="dc-01")
    datastore_cluster = vsphere.get_datastore_cluster(name="datastore-cluster-01",
        datacenter_id=datacenter.id)
    cluster = vsphere.get_compute_cluster(name="cluster-01",
        datacenter_id=datacenter.id)
    network = vsphere.get_network(name="VM Network",
        datacenter_id=datacenter.id)
    vm = vsphere.VirtualMachine("vm",
        name="foo",
        resource_pool_id=cluster.resource_pool_id,
        datastore_cluster_id=datastore_cluster.id,
        num_cpus=1,
        memory=1024,
        guest_id="otherLinux64Guest",
        network_interfaces=[{
            "network_id": network.id,
        }],
        disks=[{
            "label": "Hard Disk 1",
            "size": 20,
        }])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-vsphere/sdk/v4/go/vsphere"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		datacenter, err := vsphere.LookupDatacenter(ctx, &vsphere.LookupDatacenterArgs{
    			Name: pulumi.StringRef("dc-01"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		datastoreCluster, err := vsphere.LookupDatastoreCluster(ctx, &vsphere.LookupDatastoreClusterArgs{
    			Name:         "datastore-cluster-01",
    			DatacenterId: pulumi.StringRef(datacenter.Id),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		cluster, err := vsphere.LookupComputeCluster(ctx, &vsphere.LookupComputeClusterArgs{
    			Name:         "cluster-01",
    			DatacenterId: pulumi.StringRef(datacenter.Id),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		network, err := vsphere.GetNetwork(ctx, &vsphere.GetNetworkArgs{
    			Name:         "VM Network",
    			DatacenterId: pulumi.StringRef(datacenter.Id),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = vsphere.NewVirtualMachine(ctx, "vm", &vsphere.VirtualMachineArgs{
    			Name:               pulumi.String("foo"),
    			ResourcePoolId:     pulumi.String(cluster.ResourcePoolId),
    			DatastoreClusterId: pulumi.String(datastoreCluster.Id),
    			NumCpus:            pulumi.Int(1),
    			Memory:             pulumi.Int(1024),
    			GuestId:            pulumi.String("otherLinux64Guest"),
    			NetworkInterfaces: vsphere.VirtualMachineNetworkInterfaceArray{
    				&vsphere.VirtualMachineNetworkInterfaceArgs{
    					NetworkId: pulumi.String(network.Id),
    				},
    			},
    			Disks: vsphere.VirtualMachineDiskArray{
    				&vsphere.VirtualMachineDiskArgs{
    					Label: pulumi.String("Hard Disk 1"),
    					Size:  pulumi.Int(20),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using VSphere = Pulumi.VSphere;
    
    return await Deployment.RunAsync(() => 
    {
        var datacenter = VSphere.GetDatacenter.Invoke(new()
        {
            Name = "dc-01",
        });
    
        var datastoreCluster = VSphere.GetDatastoreCluster.Invoke(new()
        {
            Name = "datastore-cluster-01",
            DatacenterId = datacenter.Apply(getDatacenterResult => getDatacenterResult.Id),
        });
    
        var cluster = VSphere.GetComputeCluster.Invoke(new()
        {
            Name = "cluster-01",
            DatacenterId = datacenter.Apply(getDatacenterResult => getDatacenterResult.Id),
        });
    
        var network = VSphere.GetNetwork.Invoke(new()
        {
            Name = "VM Network",
            DatacenterId = datacenter.Apply(getDatacenterResult => getDatacenterResult.Id),
        });
    
        var vm = new VSphere.VirtualMachine("vm", new()
        {
            Name = "foo",
            ResourcePoolId = cluster.Apply(getComputeClusterResult => getComputeClusterResult.ResourcePoolId),
            DatastoreClusterId = datastoreCluster.Apply(getDatastoreClusterResult => getDatastoreClusterResult.Id),
            NumCpus = 1,
            Memory = 1024,
            GuestId = "otherLinux64Guest",
            NetworkInterfaces = new[]
            {
                new VSphere.Inputs.VirtualMachineNetworkInterfaceArgs
                {
                    NetworkId = network.Apply(getNetworkResult => getNetworkResult.Id),
                },
            },
            Disks = new[]
            {
                new VSphere.Inputs.VirtualMachineDiskArgs
                {
                    Label = "Hard Disk 1",
                    Size = 20,
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.vsphere.VsphereFunctions;
    import com.pulumi.vsphere.inputs.GetDatacenterArgs;
    import com.pulumi.vsphere.inputs.GetDatastoreClusterArgs;
    import com.pulumi.vsphere.inputs.GetComputeClusterArgs;
    import com.pulumi.vsphere.inputs.GetNetworkArgs;
    import com.pulumi.vsphere.VirtualMachine;
    import com.pulumi.vsphere.VirtualMachineArgs;
    import com.pulumi.vsphere.inputs.VirtualMachineNetworkInterfaceArgs;
    import com.pulumi.vsphere.inputs.VirtualMachineDiskArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var datacenter = VsphereFunctions.getDatacenter(GetDatacenterArgs.builder()
                .name("dc-01")
                .build());
    
            final var datastoreCluster = VsphereFunctions.getDatastoreCluster(GetDatastoreClusterArgs.builder()
                .name("datastore-cluster-01")
                .datacenterId(datacenter.id())
                .build());
    
            final var cluster = VsphereFunctions.getComputeCluster(GetComputeClusterArgs.builder()
                .name("cluster-01")
                .datacenterId(datacenter.id())
                .build());
    
            final var network = VsphereFunctions.getNetwork(GetNetworkArgs.builder()
                .name("VM Network")
                .datacenterId(datacenter.id())
                .build());
    
            var vm = new VirtualMachine("vm", VirtualMachineArgs.builder()
                .name("foo")
                .resourcePoolId(cluster.resourcePoolId())
                .datastoreClusterId(datastoreCluster.id())
                .numCpus(1)
                .memory(1024)
                .guestId("otherLinux64Guest")
                .networkInterfaces(VirtualMachineNetworkInterfaceArgs.builder()
                    .networkId(network.id())
                    .build())
                .disks(VirtualMachineDiskArgs.builder()
                    .label("Hard Disk 1")
                    .size(20)
                    .build())
                .build());
    
        }
    }
    
    resources:
      vm:
        type: vsphere:VirtualMachine
        properties:
          name: foo
          resourcePoolId: ${cluster.resourcePoolId}
          datastoreClusterId: ${datastoreCluster.id}
          numCpus: 1
          memory: 1024
          guestId: otherLinux64Guest
          networkInterfaces:
            - networkId: ${network.id}
          disks:
            - label: Hard Disk 1
              size: 20
    variables:
      datacenter:
        fn::invoke:
          function: vsphere:getDatacenter
          arguments:
            name: dc-01
      datastoreCluster:
        fn::invoke:
          function: vsphere:getDatastoreCluster
          arguments:
            name: datastore-cluster-01
            datacenterId: ${datacenter.id}
      cluster:
        fn::invoke:
          function: vsphere:getComputeCluster
          arguments:
            name: cluster-01
            datacenterId: ${datacenter.id}
      network:
        fn::invoke:
          function: vsphere:getNetwork
          arguments:
            name: VM Network
            datacenterId: ${datacenter.id}
    

    Creating a Virtual Machine from a Template

    The clone block can be used to create a new virtual machine from an existing virtual machine or template. The resource supports both making a complete copy of a virtual machine, or cloning from a snapshot (also known as a linked clone).

    See the section on cloning and customization for more information.

    NOTE: Changing any option in clone after creation forces a new resource.

    NOTE: Cloning requires vCenter Server and is not supported on direct ESXi host connections.

    The options available in the clone block are:

    • template_uuid - (Required) The UUID of the source virtual machine or template.

    • linked_clone - (Optional) Clone the virtual machine from a snapshot or a template. Default: false.

    • timeout - (Optional) The timeout, in minutes, to wait for the cloning process to complete. Default: 30 minutes.

    • customize - (Optional) The customization spec for this clone. This allows the user to configure the virtual machine post-clone. For more details, see virtual machine customizations.

    Virtual Machine Customizations

    As part of the clone operation, a virtual machine can be customized to configure host, network, or licensing settings.

    To perform virtual machine customization as a part of the clone process, specify the customize block with the respective customization options, nested within the clone block. Windows guests are customized using Sysprep, which will result in the machine SID being reset. Before using customization, check is that your source virtual machine meets the requirements for guest OS customization on vSphere. See the section on cloning and customization for a usage synopsis.

    The settings for customize are as follows:

    Customization Timeout Settings

    • timeout - (Optional) The time, in minutes, that the provider waits for customization to complete before failing. The default is 10 minutes. Setting the value to 0 or a negative value disables the waiter.

    Network Interface Settings

    These settings, which should be specified in nested network_interface blocks within customize block, configure network interfaces on a per-interface basis and are matched up to network_interface devices in the order declared.

    Static IP Address Example:

    import * as pulumi from "@pulumi/pulumi";
    import * as vsphere from "@pulumi/vsphere";
    
    const vm = new vsphere.VirtualMachine("vm", {
        networkInterfaces: [
            {
                networkId: _public.id,
            },
            {
                networkId: _private.id,
            },
        ],
        clone: {
            customize: {
                networkInterfaces: [
                    {
                        ipv4Address: "10.0.0.10",
                        ipv4Netmask: 24,
                    },
                    {
                        ipv4Address: "172.16.0.10",
                        ipv4Netmask: 24,
                    },
                ],
                ipv4Gateway: "10.0.0.1",
            },
        },
    });
    
    import pulumi
    import pulumi_vsphere as vsphere
    
    vm = vsphere.VirtualMachine("vm",
        network_interfaces=[
            {
                "network_id": public["id"],
            },
            {
                "network_id": private["id"],
            },
        ],
        clone={
            "customize": {
                "network_interfaces": [
                    {
                        "ipv4_address": "10.0.0.10",
                        "ipv4_netmask": 24,
                    },
                    {
                        "ipv4_address": "172.16.0.10",
                        "ipv4_netmask": 24,
                    },
                ],
                "ipv4_gateway": "10.0.0.1",
            },
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-vsphere/sdk/v4/go/vsphere"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := vsphere.NewVirtualMachine(ctx, "vm", &vsphere.VirtualMachineArgs{
    			NetworkInterfaces: vsphere.VirtualMachineNetworkInterfaceArray{
    				&vsphere.VirtualMachineNetworkInterfaceArgs{
    					NetworkId: pulumi.Any(public.Id),
    				},
    				&vsphere.VirtualMachineNetworkInterfaceArgs{
    					NetworkId: pulumi.Any(private.Id),
    				},
    			},
    			Clone: &vsphere.VirtualMachineCloneArgs{
    				Customize: &vsphere.VirtualMachineCloneCustomizeArgs{
    					NetworkInterfaces: vsphere.VirtualMachineCloneCustomizeNetworkInterfaceArray{
    						&vsphere.VirtualMachineCloneCustomizeNetworkInterfaceArgs{
    							Ipv4Address: pulumi.String("10.0.0.10"),
    							Ipv4Netmask: pulumi.Int(24),
    						},
    						&vsphere.VirtualMachineCloneCustomizeNetworkInterfaceArgs{
    							Ipv4Address: pulumi.String("172.16.0.10"),
    							Ipv4Netmask: pulumi.Int(24),
    						},
    					},
    					Ipv4Gateway: pulumi.String("10.0.0.1"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using VSphere = Pulumi.VSphere;
    
    return await Deployment.RunAsync(() => 
    {
        var vm = new VSphere.VirtualMachine("vm", new()
        {
            NetworkInterfaces = new[]
            {
                new VSphere.Inputs.VirtualMachineNetworkInterfaceArgs
                {
                    NetworkId = @public.Id,
                },
                new VSphere.Inputs.VirtualMachineNetworkInterfaceArgs
                {
                    NetworkId = @private.Id,
                },
            },
            Clone = new VSphere.Inputs.VirtualMachineCloneArgs
            {
                Customize = new VSphere.Inputs.VirtualMachineCloneCustomizeArgs
                {
                    NetworkInterfaces = new[]
                    {
                        new VSphere.Inputs.VirtualMachineCloneCustomizeNetworkInterfaceArgs
                        {
                            Ipv4Address = "10.0.0.10",
                            Ipv4Netmask = 24,
                        },
                        new VSphere.Inputs.VirtualMachineCloneCustomizeNetworkInterfaceArgs
                        {
                            Ipv4Address = "172.16.0.10",
                            Ipv4Netmask = 24,
                        },
                    },
                    Ipv4Gateway = "10.0.0.1",
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.vsphere.VirtualMachine;
    import com.pulumi.vsphere.VirtualMachineArgs;
    import com.pulumi.vsphere.inputs.VirtualMachineNetworkInterfaceArgs;
    import com.pulumi.vsphere.inputs.VirtualMachineCloneArgs;
    import com.pulumi.vsphere.inputs.VirtualMachineCloneCustomizeArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var vm = new VirtualMachine("vm", VirtualMachineArgs.builder()
                .networkInterfaces(            
                    VirtualMachineNetworkInterfaceArgs.builder()
                        .networkId(public_.id())
                        .build(),
                    VirtualMachineNetworkInterfaceArgs.builder()
                        .networkId(private_.id())
                        .build())
                .clone(VirtualMachineCloneArgs.builder()
                    .customize(VirtualMachineCloneCustomizeArgs.builder()
                        .networkInterfaces(                    
                            VirtualMachineCloneCustomizeNetworkInterfaceArgs.builder()
                                .ipv4Address("10.0.0.10")
                                .ipv4Netmask(24)
                                .build(),
                            VirtualMachineCloneCustomizeNetworkInterfaceArgs.builder()
                                .ipv4Address("172.16.0.10")
                                .ipv4Netmask(24)
                                .build())
                        .ipv4Gateway("10.0.0.1")
                        .build())
                    .build())
                .build());
    
        }
    }
    
    resources:
      vm:
        type: vsphere:VirtualMachine
        properties:
          networkInterfaces:
            - networkId: ${public.id}
            - networkId: ${private.id}
          clone:
            customize:
              networkInterfaces:
                - ipv4Address: 10.0.0.10
                  ipv4Netmask: 24
                - ipv4Address: 172.16.0.10
                  ipv4Netmask: 24
              ipv4Gateway: 10.0.0.1
    

    The first network_interface would be assigned to the public interface, and the second to the private interface.

    To use DHCP, declare an empty network_interface block for each interface.

    Example:

    import * as pulumi from "@pulumi/pulumi";
    import * as vsphere from "@pulumi/vsphere";
    
    const vm = new vsphere.VirtualMachine("vm", {
        networkInterfaces: [
            {
                networkId: _public.id,
            },
            {
                networkId: _private.id,
            },
        ],
        clone: {
            customize: {
                networkInterfaces: [
                    {},
                    {},
                ],
            },
        },
    });
    
    import pulumi
    import pulumi_vsphere as vsphere
    
    vm = vsphere.VirtualMachine("vm",
        network_interfaces=[
            {
                "network_id": public["id"],
            },
            {
                "network_id": private["id"],
            },
        ],
        clone={
            "customize": {
                "network_interfaces": [
                    {},
                    {},
                ],
            },
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-vsphere/sdk/v4/go/vsphere"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := vsphere.NewVirtualMachine(ctx, "vm", &vsphere.VirtualMachineArgs{
    			NetworkInterfaces: vsphere.VirtualMachineNetworkInterfaceArray{
    				&vsphere.VirtualMachineNetworkInterfaceArgs{
    					NetworkId: pulumi.Any(public.Id),
    				},
    				&vsphere.VirtualMachineNetworkInterfaceArgs{
    					NetworkId: pulumi.Any(private.Id),
    				},
    			},
    			Clone: &vsphere.VirtualMachineCloneArgs{
    				Customize: &vsphere.VirtualMachineCloneCustomizeArgs{
    					NetworkInterfaces: vsphere.VirtualMachineCloneCustomizeNetworkInterfaceArray{
    						&vsphere.VirtualMachineCloneCustomizeNetworkInterfaceArgs{},
    						&vsphere.VirtualMachineCloneCustomizeNetworkInterfaceArgs{},
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using VSphere = Pulumi.VSphere;
    
    return await Deployment.RunAsync(() => 
    {
        var vm = new VSphere.VirtualMachine("vm", new()
        {
            NetworkInterfaces = new[]
            {
                new VSphere.Inputs.VirtualMachineNetworkInterfaceArgs
                {
                    NetworkId = @public.Id,
                },
                new VSphere.Inputs.VirtualMachineNetworkInterfaceArgs
                {
                    NetworkId = @private.Id,
                },
            },
            Clone = new VSphere.Inputs.VirtualMachineCloneArgs
            {
                Customize = new VSphere.Inputs.VirtualMachineCloneCustomizeArgs
                {
                    NetworkInterfaces = new[]
                    {
                        null,
                        null,
                    },
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.vsphere.VirtualMachine;
    import com.pulumi.vsphere.VirtualMachineArgs;
    import com.pulumi.vsphere.inputs.VirtualMachineNetworkInterfaceArgs;
    import com.pulumi.vsphere.inputs.VirtualMachineCloneArgs;
    import com.pulumi.vsphere.inputs.VirtualMachineCloneCustomizeArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var vm = new VirtualMachine("vm", VirtualMachineArgs.builder()
                .networkInterfaces(            
                    VirtualMachineNetworkInterfaceArgs.builder()
                        .networkId(public_.id())
                        .build(),
                    VirtualMachineNetworkInterfaceArgs.builder()
                        .networkId(private_.id())
                        .build())
                .clone(VirtualMachineCloneArgs.builder()
                    .customize(VirtualMachineCloneCustomizeArgs.builder()
                        .networkInterfaces(                    
                            VirtualMachineCloneCustomizeNetworkInterfaceArgs.builder()
                                .build(),
                            VirtualMachineCloneCustomizeNetworkInterfaceArgs.builder()
                                .build())
                        .build())
                    .build())
                .build());
    
        }
    }
    
    resources:
      vm:
        type: vsphere:VirtualMachine
        properties:
          networkInterfaces:
            - networkId: ${public.id}
            - networkId: ${private.id}
          clone:
            customize:
              networkInterfaces:
                - {}
                - {}
    

    The options are:

    • dns_server_list - (Optional) DNS servers for the network interface. Used by Windows guest operating systems, but ignored by Linux distribution guest operating systems. For Linux, please refer to the section on the global DNS settings.

    • dns_domain - (Optional) DNS search domain for the network interface. Used by Windows guest operating systems, but ignored by Linux distribution guest operating systems. For Linux, please refer to the section on the global DNS settings.

    • ipv4_address - (Optional) The IPv4 address assigned to the network adapter. If blank or not included, DHCP is used.

    • ipv4_netmask The IPv4 subnet mask, in bits (e.g. 24 for 255.255.255.0).

    • ipv6_address - (Optional) The IPv6 address assigned to the network adapter. If blank or not included, auto-configuration is used.

    • ipv6_netmask - (Optional) The IPv6 subnet mask, in bits (e.g. 32).

    NOTE: The minimum setting for IPv4 in a customization specification is DHCP. If you are setting up an IPv6-exclusive network without DHCP, you may need to set wait_for_guest_net_timeout to a high enough value to cover the DHCP timeout of your virtual machine, or disable by supplying a zero or negative value. Disabling wait_for_guest_net_timeout may result in IP addresses not being reported to any provisioners you may have configured on the resource.

    Global Routing Settings

    Virtual machine customization for the vsphere.VirtualMachine resource does not take a per-interface gateway setting. Default routes are configured on a global basis. See the section on network interface settings for more information.

    The settings must match the IP address and netmask of at least one network_interface supplied to customization.

    The options are:

    • ipv4_gateway - (Optional) The IPv4 default gateway when using network_interface customization on the virtual machine.

    • ipv6_gateway - (Optional) The IPv6 default gateway when using network_interface customization on the virtual machine.

    Global DNS Settings

    The following settings configure DNS globally, generally for Linux distribution guest operating systems. For Windows guest operating systems, this is performer per-interface. See the section on network interface settings for more information.

    • dns_server_list - The list of DNS servers to configure on the virtual machine.

    • dns_suffix_list - A list of DNS search domains to add to the DNS configuration on the virtual machine.

    Linux Customization Options

    The settings in the linux_options block pertain to Linux distribution guest operating system customization. If you are customizing a Linux guest operating system, this section must be included.

    Example:

    import * as pulumi from "@pulumi/pulumi";
    import * as vsphere from "@pulumi/vsphere";
    
    const vm = new vsphere.VirtualMachine("vm", {clone: {
        customize: {
            linuxOptions: {
                hostName: "foo",
                domain: "example.com",
            },
        },
    }});
    
    import pulumi
    import pulumi_vsphere as vsphere
    
    vm = vsphere.VirtualMachine("vm", clone={
        "customize": {
            "linux_options": {
                "host_name": "foo",
                "domain": "example.com",
            },
        },
    })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-vsphere/sdk/v4/go/vsphere"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := vsphere.NewVirtualMachine(ctx, "vm", &vsphere.VirtualMachineArgs{
    			Clone: &vsphere.VirtualMachineCloneArgs{
    				Customize: &vsphere.VirtualMachineCloneCustomizeArgs{
    					LinuxOptions: &vsphere.VirtualMachineCloneCustomizeLinuxOptionsArgs{
    						HostName: pulumi.String("foo"),
    						Domain:   pulumi.String("example.com"),
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using VSphere = Pulumi.VSphere;
    
    return await Deployment.RunAsync(() => 
    {
        var vm = new VSphere.VirtualMachine("vm", new()
        {
            Clone = new VSphere.Inputs.VirtualMachineCloneArgs
            {
                Customize = new VSphere.Inputs.VirtualMachineCloneCustomizeArgs
                {
                    LinuxOptions = new VSphere.Inputs.VirtualMachineCloneCustomizeLinuxOptionsArgs
                    {
                        HostName = "foo",
                        Domain = "example.com",
                    },
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.vsphere.VirtualMachine;
    import com.pulumi.vsphere.VirtualMachineArgs;
    import com.pulumi.vsphere.inputs.VirtualMachineCloneArgs;
    import com.pulumi.vsphere.inputs.VirtualMachineCloneCustomizeArgs;
    import com.pulumi.vsphere.inputs.VirtualMachineCloneCustomizeLinuxOptionsArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var vm = new VirtualMachine("vm", VirtualMachineArgs.builder()
                .clone(VirtualMachineCloneArgs.builder()
                    .customize(VirtualMachineCloneCustomizeArgs.builder()
                        .linuxOptions(VirtualMachineCloneCustomizeLinuxOptionsArgs.builder()
                            .hostName("foo")
                            .domain("example.com")
                            .build())
                        .build())
                    .build())
                .build());
    
        }
    }
    
    resources:
      vm:
        type: vsphere:VirtualMachine
        properties:
          clone:
            customize:
              linuxOptions:
                hostName: foo
                domain: example.com
    

    The options are:

    • host_name - (Required) The host name for this machine. This, along with domain, make up the FQDN of the virtual machine.

    • domain - (Required) The domain name for this machine. This, along with host_name, make up the FQDN of the virtual machine.

    • hw_clock_utc - (Optional) Tells the operating system that the hardware clock is set to UTC. Default: true.

    • script_text - (Optional) The customization script for the virtual machine that will be applied before and / or after guest customization. For more information on enabling and using a customization script, please refer to VMware KB 74880. The Heredoc style of string literal is recommended.

    • time_zone - (Optional) Sets the time zone. For a list of possible combinations, please refer to VMware KB 2145518. The default is UTC.

    Windows Customization Options

    The settings in the windows_options block pertain to Windows guest OS customization. If you are customizing a Windows operating system, this section must be included.

    Example:

    import * as pulumi from "@pulumi/pulumi";
    import * as vsphere from "@pulumi/vsphere";
    
    const vm = new vsphere.VirtualMachine("vm", {clone: {
        customize: {
            windowsOptions: {
                computerName: "foo",
                workgroup: "BAR",
                adminPassword: "VMware1!",
            },
        },
    }});
    
    import pulumi
    import pulumi_vsphere as vsphere
    
    vm = vsphere.VirtualMachine("vm", clone={
        "customize": {
            "windows_options": {
                "computer_name": "foo",
                "workgroup": "BAR",
                "admin_password": "VMware1!",
            },
        },
    })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-vsphere/sdk/v4/go/vsphere"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := vsphere.NewVirtualMachine(ctx, "vm", &vsphere.VirtualMachineArgs{
    			Clone: &vsphere.VirtualMachineCloneArgs{
    				Customize: &vsphere.VirtualMachineCloneCustomizeArgs{
    					WindowsOptions: &vsphere.VirtualMachineCloneCustomizeWindowsOptionsArgs{
    						ComputerName:  pulumi.String("foo"),
    						Workgroup:     pulumi.String("BAR"),
    						AdminPassword: pulumi.String("VMware1!"),
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using VSphere = Pulumi.VSphere;
    
    return await Deployment.RunAsync(() => 
    {
        var vm = new VSphere.VirtualMachine("vm", new()
        {
            Clone = new VSphere.Inputs.VirtualMachineCloneArgs
            {
                Customize = new VSphere.Inputs.VirtualMachineCloneCustomizeArgs
                {
                    WindowsOptions = new VSphere.Inputs.VirtualMachineCloneCustomizeWindowsOptionsArgs
                    {
                        ComputerName = "foo",
                        Workgroup = "BAR",
                        AdminPassword = "VMware1!",
                    },
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.vsphere.VirtualMachine;
    import com.pulumi.vsphere.VirtualMachineArgs;
    import com.pulumi.vsphere.inputs.VirtualMachineCloneArgs;
    import com.pulumi.vsphere.inputs.VirtualMachineCloneCustomizeArgs;
    import com.pulumi.vsphere.inputs.VirtualMachineCloneCustomizeWindowsOptionsArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var vm = new VirtualMachine("vm", VirtualMachineArgs.builder()
                .clone(VirtualMachineCloneArgs.builder()
                    .customize(VirtualMachineCloneCustomizeArgs.builder()
                        .windowsOptions(VirtualMachineCloneCustomizeWindowsOptionsArgs.builder()
                            .computerName("foo")
                            .workgroup("BAR")
                            .adminPassword("VMware1!")
                            .build())
                        .build())
                    .build())
                .build());
    
        }
    }
    
    resources:
      vm:
        type: vsphere:VirtualMachine
        properties:
          clone:
            customize:
              windowsOptions:
                computerName: foo
                workgroup: BAR
                adminPassword: VMware1!
    

    The options are:

    • computer_name - (Required) The computer name of the virtual machine.

    • admin_password - (Optional) The administrator password for the virtual machine.

    NOTE: admin_password is a sensitive field and will not be output on-screen, but is stored in state and sent to the virtual machine in plain text.

    • workgroup - (Optional) The workgroup name for the virtual machine. One of this or join_domain must be included.

    • join_domain - (Optional) The domain name in which to join the virtual machine. One of this or workgroup must be included.

    • domain_ou - (Optional) The MachineObjectOU which specifies the full LDAP path name of the OU to which the virtual machine belongs (e.g., OU=bar,OU=foo,DC=example,DC=com").

    NOTE: domain_ou is only available on vSphere 8.0 Update 2 and later.

    NOTE: domain_ou must not contain a spaces in the MachineObjectOU path (e.g., OU=foo bar,DC=example,DC=com").

    Example:

    import * as pulumi from "@pulumi/pulumi";
    import * as vsphere from "@pulumi/vsphere";
    
    const vm = new vsphere.VirtualMachine("vm", {clone: {
        customize: {
            windowsOptions: {
                domainOu: "OU=bar,OU=foo,DC=example,DC=com",
            },
        },
    }});
    
    import pulumi
    import pulumi_vsphere as vsphere
    
    vm = vsphere.VirtualMachine("vm", clone={
        "customize": {
            "windows_options": {
                "domain_ou": "OU=bar,OU=foo,DC=example,DC=com",
            },
        },
    })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-vsphere/sdk/v4/go/vsphere"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := vsphere.NewVirtualMachine(ctx, "vm", &vsphere.VirtualMachineArgs{
    			Clone: &vsphere.VirtualMachineCloneArgs{
    				Customize: &vsphere.VirtualMachineCloneCustomizeArgs{
    					WindowsOptions: &vsphere.VirtualMachineCloneCustomizeWindowsOptionsArgs{
    						DomainOu: pulumi.String("OU=bar,OU=foo,DC=example,DC=com"),
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using VSphere = Pulumi.VSphere;
    
    return await Deployment.RunAsync(() => 
    {
        var vm = new VSphere.VirtualMachine("vm", new()
        {
            Clone = new VSphere.Inputs.VirtualMachineCloneArgs
            {
                Customize = new VSphere.Inputs.VirtualMachineCloneCustomizeArgs
                {
                    WindowsOptions = new VSphere.Inputs.VirtualMachineCloneCustomizeWindowsOptionsArgs
                    {
                        DomainOu = "OU=bar,OU=foo,DC=example,DC=com",
                    },
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.vsphere.VirtualMachine;
    import com.pulumi.vsphere.VirtualMachineArgs;
    import com.pulumi.vsphere.inputs.VirtualMachineCloneArgs;
    import com.pulumi.vsphere.inputs.VirtualMachineCloneCustomizeArgs;
    import com.pulumi.vsphere.inputs.VirtualMachineCloneCustomizeWindowsOptionsArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var vm = new VirtualMachine("vm", VirtualMachineArgs.builder()
                .clone(VirtualMachineCloneArgs.builder()
                    .customize(VirtualMachineCloneCustomizeArgs.builder()
                        .windowsOptions(VirtualMachineCloneCustomizeWindowsOptionsArgs.builder()
                            .domainOu("OU=bar,OU=foo,DC=example,DC=com")
                            .build())
                        .build())
                    .build())
                .build());
    
        }
    }
    
    resources:
      vm:
        type: vsphere:VirtualMachine
        properties:
          clone:
            customize:
              windowsOptions:
                domainOu: OU=bar,OU=foo,DC=example,DC=com
    
    • domain_admin_user - (Optional) The user account with administrative privileges to use to join the guest operating system to the domain. Required if setting join_domain.

    • domain_admin_password - (Optional) The password user account with administrative privileges used to join the virtual machine to the domain. Required if setting join_domain.

    NOTE: domain_admin_password is a sensitive field and will not be output on-screen, but is stored in state and sent to the virtual machine in plain text

    • full_name - (Optional) The full name of the organization owner of the virtual machine. This populates the “user” field in the general Windows system information. Default: Administrator.

    • organization_name - (Optional) The name of the organization for the virtual machine. This option populates the “organization” field in the general Windows system information. Default: Managed by Terraform.

    • product_key - (Optional) The product key for the virtual machine Windows guest operating system. The default is no key.

    • run_once_command_list - (Optional) A list of commands to run at first user logon, after guest customization. Each run once command is limited by the API to 260 characters.

    • auto_logon - (Optional) Specifies whether or not the virtual machine automatically logs on as Administrator. Default: false.

    • auto_logon_count - (Optional) Specifies how many times the virtual machine should auto-logon the Administrator account when auto_logon is true. This option should be set accordingly to ensure that all of your commands that run in run_once_command_list can log in to run. Default: 1.

    • time_zone - (Optional) The time zone for the virtual machine. For a list of supported codes, please refer to the MIcrosoft documentation. The default is 85 (GMT/UTC).

    Using vApp Properties for OVF/OVA Configuration

    You can use the properties section of the vapp block to supply configuration parameters to a virtual machine cloned from a template that originated from an imported OVF/OVA file. Both GuestInfo and ISO transport methods are supported.

    For templates that use ISO transport, a CD-ROM backed by a client device must be included.

    Example:

    import * as pulumi from "@pulumi/pulumi";
    import * as vsphere from "@pulumi/vsphere";
    
    const vm = new vsphere.VirtualMachine("vm", {
        clone: {
            templateUuid: templateFromOvf.id,
        },
        cdroms: [{
            clientDevice: true,
        }],
        vapp: {
            properties: {
                [terraform.id]: "foo",
            },
        },
    });
    
    import pulumi
    import pulumi_vsphere as vsphere
    
    vm = vsphere.VirtualMachine("vm",
        clone={
            "template_uuid": template_from_ovf["id"],
        },
        cdroms=[{
            "client_device": True,
        }],
        vapp={
            "properties": {
                terraform["id"]: "foo",
            },
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-vsphere/sdk/v4/go/vsphere"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := vsphere.NewVirtualMachine(ctx, "vm", &vsphere.VirtualMachineArgs{
    			Clone: &vsphere.VirtualMachineCloneArgs{
    				TemplateUuid: pulumi.Any(templateFromOvf.Id),
    			},
    			Cdroms: vsphere.VirtualMachineCdromArray{
    				&vsphere.VirtualMachineCdromArgs{
    					ClientDevice: pulumi.Bool(true),
    				},
    			},
    			Vapp: &vsphere.VirtualMachineVappArgs{
    				Properties: pulumi.StringMap{
    					terraform.Id: "foo",
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using VSphere = Pulumi.VSphere;
    
    return await Deployment.RunAsync(() => 
    {
        var vm = new VSphere.VirtualMachine("vm", new()
        {
            Clone = new VSphere.Inputs.VirtualMachineCloneArgs
            {
                TemplateUuid = templateFromOvf.Id,
            },
            Cdroms = new[]
            {
                new VSphere.Inputs.VirtualMachineCdromArgs
                {
                    ClientDevice = true,
                },
            },
            Vapp = new VSphere.Inputs.VirtualMachineVappArgs
            {
                Properties = 
                {
                    { terraform.Id, "foo" },
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.vsphere.VirtualMachine;
    import com.pulumi.vsphere.VirtualMachineArgs;
    import com.pulumi.vsphere.inputs.VirtualMachineCloneArgs;
    import com.pulumi.vsphere.inputs.VirtualMachineCdromArgs;
    import com.pulumi.vsphere.inputs.VirtualMachineVappArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var vm = new VirtualMachine("vm", VirtualMachineArgs.builder()
                .clone(VirtualMachineCloneArgs.builder()
                    .templateUuid(templateFromOvf.id())
                    .build())
                .cdroms(VirtualMachineCdromArgs.builder()
                    .clientDevice(true)
                    .build())
                .vapp(VirtualMachineVappArgs.builder()
                    .properties(Map.of(terraform.id(), "foo"))
                    .build())
                .build());
    
        }
    }
    
    resources:
      vm:
        type: vsphere:VirtualMachine
        properties:
          clone:
            templateUuid: ${templateFromOvf.id}
          cdroms:
            - clientDevice: true
          vapp:
            properties:
              ${terraform.id}: foo
    

    See the section on CD-ROM options for more information.

    NOTE: The only supported usage path for vApp properties is for existing user-configurable keys. These generally come from an existing template created by importing an OVF or OVA file. You cannot set values for vApp properties on virtual machines created from scratch, virtual machines lacking a vApp configuration, or on property keys that do not exist.

    Example:

    import * as pulumi from "@pulumi/pulumi";
    import * as vsphere from "@pulumi/vsphere";
    
    const vm = new vsphere.VirtualMachine("vm", {
        clone: {
            templateUuid: templateFromOvf.id,
        },
        vapp: {
            properties: {
                [terraform.id]: "foo",
            },
        },
    });
    
    import pulumi
    import pulumi_vsphere as vsphere
    
    vm = vsphere.VirtualMachine("vm",
        clone={
            "template_uuid": template_from_ovf["id"],
        },
        vapp={
            "properties": {
                terraform["id"]: "foo",
            },
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-vsphere/sdk/v4/go/vsphere"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := vsphere.NewVirtualMachine(ctx, "vm", &vsphere.VirtualMachineArgs{
    			Clone: &vsphere.VirtualMachineCloneArgs{
    				TemplateUuid: pulumi.Any(templateFromOvf.Id),
    			},
    			Vapp: &vsphere.VirtualMachineVappArgs{
    				Properties: pulumi.StringMap{
    					terraform.Id: "foo",
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using VSphere = Pulumi.VSphere;
    
    return await Deployment.RunAsync(() => 
    {
        var vm = new VSphere.VirtualMachine("vm", new()
        {
            Clone = new VSphere.Inputs.VirtualMachineCloneArgs
            {
                TemplateUuid = templateFromOvf.Id,
            },
            Vapp = new VSphere.Inputs.VirtualMachineVappArgs
            {
                Properties = 
                {
                    { terraform.Id, "foo" },
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.vsphere.VirtualMachine;
    import com.pulumi.vsphere.VirtualMachineArgs;
    import com.pulumi.vsphere.inputs.VirtualMachineCloneArgs;
    import com.pulumi.vsphere.inputs.VirtualMachineVappArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var vm = new VirtualMachine("vm", VirtualMachineArgs.builder()
                .clone(VirtualMachineCloneArgs.builder()
                    .templateUuid(templateFromOvf.id())
                    .build())
                .vapp(VirtualMachineVappArgs.builder()
                    .properties(Map.of(terraform.id(), "foo"))
                    .build())
                .build());
    
        }
    }
    
    resources:
      vm:
        type: vsphere:VirtualMachine
        properties:
          clone:
            templateUuid: ${templateFromOvf.id}
          vapp:
            properties:
              ${terraform.id}: foo
    

    The vApp Properties for some OVF/OVA may require boolean values.

    In Terraform a boolean is defined as bool with a value of either true or false.

    Example: A boolean variable type for the Terraform provider configuration.

    import * as pulumi from "@pulumi/pulumi";
    
    const config = new pulumi.Config();
    // Allow insecure connections. Set to `true` for self-signed certificates.
    const vsphereInsecure = config.getBoolean("vsphereInsecure") || false;
    
    import pulumi
    
    config = pulumi.Config()
    # Allow insecure connections. Set to `true` for self-signed certificates.
    vsphere_insecure = config.get_bool("vsphereInsecure")
    if vsphere_insecure is None:
        vsphere_insecure = False
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		cfg := config.New(ctx, "")
    		// Allow insecure connections. Set to `true` for self-signed certificates.
    		vsphereInsecure := false
    		if param := cfg.GetBool("vsphereInsecure"); param {
    			vsphereInsecure = param
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Config();
        // Allow insecure connections. Set to `true` for self-signed certificates.
        var vsphereInsecure = config.GetBoolean("vsphereInsecure") ?? false;
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var config = ctx.config();
            final var vsphereInsecure = config.get("vsphereInsecure").orElse(false);
        }
    }
    
    configuration:
      vsphereInsecure:
        type: bool
        default: false
    

    However, for OVF properties, even though the type is boolean, the vApp Options in vSphere only accepts the values of "True" or "False".

    In these instances, it is recommended to define the variable as a string and pass the value in title case.

    Example: A string variable for to pass to an OVF/OVA boolean OVF property.

    import * as pulumi from "@pulumi/pulumi";
    import * as vsphere from "@pulumi/vsphere";
    
    const config = new pulumi.Config();
    // Enable SSH on the virtual appliance. One of `True` or `False`.
    const sshEnabled = config.get("sshEnabled") || "False";
    const vm = new vsphere.VirtualMachine("vm", {vapp: {
        properties: {
            ssh_enabled: sshEnabled,
        },
    }});
    
    import pulumi
    import pulumi_vsphere as vsphere
    
    config = pulumi.Config()
    # Enable SSH on the virtual appliance. One of `True` or `False`.
    ssh_enabled = config.get("sshEnabled")
    if ssh_enabled is None:
        ssh_enabled = "False"
    vm = vsphere.VirtualMachine("vm", vapp={
        "properties": {
            "ssh_enabled": ssh_enabled,
        },
    })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-vsphere/sdk/v4/go/vsphere"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		cfg := config.New(ctx, "")
    		// Enable SSH on the virtual appliance. One of `True` or `False`.
    		sshEnabled := "False"
    		if param := cfg.Get("sshEnabled"); param != "" {
    			sshEnabled = param
    		}
    		_, err := vsphere.NewVirtualMachine(ctx, "vm", &vsphere.VirtualMachineArgs{
    			Vapp: &vsphere.VirtualMachineVappArgs{
    				Properties: pulumi.StringMap{
    					"ssh_enabled": pulumi.String(sshEnabled),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using VSphere = Pulumi.VSphere;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Config();
        // Enable SSH on the virtual appliance. One of `True` or `False`.
        var sshEnabled = config.Get("sshEnabled") ?? "False";
        var vm = new VSphere.VirtualMachine("vm", new()
        {
            Vapp = new VSphere.Inputs.VirtualMachineVappArgs
            {
                Properties = 
                {
                    { "ssh_enabled", sshEnabled },
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.vsphere.VirtualMachine;
    import com.pulumi.vsphere.VirtualMachineArgs;
    import com.pulumi.vsphere.inputs.VirtualMachineVappArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var config = ctx.config();
            final var sshEnabled = config.get("sshEnabled").orElse("False");
            var vm = new VirtualMachine("vm", VirtualMachineArgs.builder()
                .vapp(VirtualMachineVappArgs.builder()
                    .properties(Map.of("ssh_enabled", sshEnabled))
                    .build())
                .build());
    
        }
    }
    
    configuration:
      sshEnabled:
        type: string
        default: False
    resources:
      vm:
        type: vsphere:VirtualMachine
        properties:
          vapp:
            properties:
              ssh_enabled: ${sshEnabled}
    

    Additional Requirements for Cloning

    When cloning from a template, there are additional requirements in both the resource configuration and source template:

    • The virtual machine must not be powered on at the time of cloning.
    • All disks on the virtual machine must be SCSI disks.
    • You must specify at least the same number of disk devices as there are disks that exist in the template. These devices are ordered and lined up by the unit_number attribute. Additional disks can be added past this.
    • The size of a virtual disk must be at least the same size as its counterpart disk in the source template.
    • When using linked_clone, the size, thin_provisioned, and eagerly_scrub settings for each disk must be an exact match to the individual disk’s counterpart in the source template.
    • The storage controller count settings should be configured as necessary to cover all of the disks on the template. For best results, only configure this setting for the number of controllers you will need to cover your disk quantity and bandwidth needs, and configure your template accordingly. For most workloads, this setting should be kept at the default of 1 SCSI controller, and all disks in the template should reside on the single, primary controller.
    • Some operating systems do not respond well to a change in disk controller type. Ensure that scsi_type is set to an exact match of the template’s controller set. For maximum compatibility, make sure the SCSI controllers on the source template are all the same type.

    You can use the vsphere.VirtualMachine data source, which provides disk attributes, network interface types, SCSI bus types, and the guest ID of the source template, to return this information. See the section on cloning and customization for more information.

    Trusted Platform Module

    When creating a virtual machine or cloning one from a template, you have the option to add a virtual Trusted Platform Module device. Refer to the requirements in the VMware vSphere product documentation.

    Example:

    import * as pulumi from "@pulumi/pulumi";
    import * as vsphere from "@pulumi/vsphere";
    
    const vm = new vsphere.VirtualMachine("vm", {vtpm: {
        version: "2.0",
    }});
    
    import pulumi
    import pulumi_vsphere as vsphere
    
    vm = vsphere.VirtualMachine("vm", vtpm={
        "version": "2.0",
    })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-vsphere/sdk/v4/go/vsphere"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := vsphere.NewVirtualMachine(ctx, "vm", &vsphere.VirtualMachineArgs{
    			Vtpm: &vsphere.VirtualMachineVtpmArgs{
    				Version: pulumi.String("2.0"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using VSphere = Pulumi.VSphere;
    
    return await Deployment.RunAsync(() => 
    {
        var vm = new VSphere.VirtualMachine("vm", new()
        {
            Vtpm = new VSphere.Inputs.VirtualMachineVtpmArgs
            {
                Version = "2.0",
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.vsphere.VirtualMachine;
    import com.pulumi.vsphere.VirtualMachineArgs;
    import com.pulumi.vsphere.inputs.VirtualMachineVtpmArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var vm = new VirtualMachine("vm", VirtualMachineArgs.builder()
                .vtpm(VirtualMachineVtpmArgs.builder()
                    .version("2.0")
                    .build())
                .build());
    
        }
    }
    
    resources:
      vm:
        type: vsphere:VirtualMachine
        properties:
          vtpm:
            version: '2.0'
    

    NOTE: Supported versions include 1.2 or 2.0.

    Virtual Machine Migration

    The vsphere.VirtualMachine resource supports live migration both on the host and storage level. You can migrate the virtual machine to another host, cluster, resource pool, or datastore. You can also migrate or pin a virtual disk to a specific datastore.

    Host, Cluster, and Resource Pool Migration

    To migrate the virtual machine to another host or resource pool, change the host_system_id or resource_pool_id to the managed object IDs of the new host or resource pool. To change the virtual machine’s cluster or standalone host, select a resource pool within the specific target.

    The same rules apply for migration as they do for virtual machine creation - any host specified must contribute the resource pool supplied. When moving a virtual machine to a resource pool in another cluster (or standalone host), ensure that all hosts in the cluster (or the single standalone host) have access to the datastore on which the virtual machine is placed.

    Storage Migration

    Storage migration can be done on two levels:

    • Global datastore migration can be handled by changing the global datastore_id attribute. This triggers a storage migration for all disks that do not have an explicit datastore_id specified.
    • When using Storage DRS through the datastore_cluster_id attribute, the entire virtual machine can be migrated from one datastore cluster to another by changing the value of this setting. In addition, when datastore_cluster_id is in use, any disks that drift to datastores outside of the datastore cluster via such actions as manual modification will be migrated back to the datastore cluster on the next apply.
    • An individual disk device can be migrated by manually specifying the datastore_id in its configuration block. This also pins it to the specific datastore that is specified - if at a later time the virtual machine and any unpinned disks migrate to another host, the disk will stay on the specified datastore.

    An example of datastore pinning is below. As long as the datastore in the pinned_datastore data source does not change, any change to the standard vm_datastore data source will not affect the data disk - the disk will stay where it is.

    Example:

    import * as pulumi from "@pulumi/pulumi";
    import * as vsphere from "@pulumi/vsphere";
    
    const vm = new vsphere.VirtualMachine("vm", {
        datastoreId: vmDatastore.id,
        disks: [
            {
                label: "Hard Disk 1",
                size: 10,
            },
            {
                datastoreId: pinnedDatastore.id,
                label: "Hard Disk 2",
                size: 100,
                unitNumber: 1,
            },
        ],
    });
    
    import pulumi
    import pulumi_vsphere as vsphere
    
    vm = vsphere.VirtualMachine("vm",
        datastore_id=vm_datastore["id"],
        disks=[
            {
                "label": "Hard Disk 1",
                "size": 10,
            },
            {
                "datastore_id": pinned_datastore["id"],
                "label": "Hard Disk 2",
                "size": 100,
                "unit_number": 1,
            },
        ])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-vsphere/sdk/v4/go/vsphere"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := vsphere.NewVirtualMachine(ctx, "vm", &vsphere.VirtualMachineArgs{
    			DatastoreId: pulumi.Any(vmDatastore.Id),
    			Disks: vsphere.VirtualMachineDiskArray{
    				&vsphere.VirtualMachineDiskArgs{
    					Label: pulumi.String("Hard Disk 1"),
    					Size:  pulumi.Int(10),
    				},
    				&vsphere.VirtualMachineDiskArgs{
    					DatastoreId: pulumi.Any(pinnedDatastore.Id),
    					Label:       pulumi.String("Hard Disk 2"),
    					Size:        pulumi.Int(100),
    					UnitNumber:  pulumi.Int(1),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using VSphere = Pulumi.VSphere;
    
    return await Deployment.RunAsync(() => 
    {
        var vm = new VSphere.VirtualMachine("vm", new()
        {
            DatastoreId = vmDatastore.Id,
            Disks = new[]
            {
                new VSphere.Inputs.VirtualMachineDiskArgs
                {
                    Label = "Hard Disk 1",
                    Size = 10,
                },
                new VSphere.Inputs.VirtualMachineDiskArgs
                {
                    DatastoreId = pinnedDatastore.Id,
                    Label = "Hard Disk 2",
                    Size = 100,
                    UnitNumber = 1,
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.vsphere.VirtualMachine;
    import com.pulumi.vsphere.VirtualMachineArgs;
    import com.pulumi.vsphere.inputs.VirtualMachineDiskArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var vm = new VirtualMachine("vm", VirtualMachineArgs.builder()
                .datastoreId(vmDatastore.id())
                .disks(            
                    VirtualMachineDiskArgs.builder()
                        .label("Hard Disk 1")
                        .size(10)
                        .build(),
                    VirtualMachineDiskArgs.builder()
                        .datastoreId(pinnedDatastore.id())
                        .label("Hard Disk 2")
                        .size(100)
                        .unitNumber(1)
                        .build())
                .build());
    
        }
    }
    
    resources:
      vm:
        type: vsphere:VirtualMachine
        properties:
          datastoreId: ${vmDatastore.id}
          disks:
            - label: Hard Disk 1
              size: 10
            - datastoreId: ${pinnedDatastore.id}
              label: Hard Disk 2
              size: 100
              unitNumber: 1
    

    Storage Migration Restrictions

    You cannot migrate external disks added with the attach parameter. Typically, these disks are created and assigned to a datastore outside the scope of the vsphere.VirtualMachine resource. For example, using the vsphere.VirtualDisk resource, management of the disks would render their configuration unstable.

    Virtual Machine Reboot

    The virtual machine will be rebooted if any of the following parameters are changed:

    • alternate_guest_name
    • cpu_hot_add_enabled
    • cpu_hot_remove_enabled
    • cpu_performance_counters_enabled
    • disk.controller_type
    • disk.unit_number
    • disk.disk_mode
    • disk.write_through
    • disk.disk_sharing
    • efi_secure_boot_enabled
    • ept_rvi_mode
    • enable_disk_uuid
    • enable_logging
    • extra_config
    • firmware
    • guest_id
    • hardware_version
    • hv_mode
    • memory - When reducing the memory size, or when increasing the memory size and memory_hot_add_enabled is set to false
    • memory_hot_add_enabled
    • nested_hv_enabled
    • network_interface - When deleting a network interface and VMware Tools is not running.
    • network_interface.adapter_type - When VMware Tools is not running.
    • num_cores_per_socket
    • pci_device_id
    • run_tools_scripts_after_power_on
    • run_tools_scripts_after_resume
    • run_tools_scripts_before_guest_standby
    • run_tools_scripts_before_guest_shutdown
    • run_tools_scripts_before_guest_reboot
    • swap_placement_policy
    • tools_upgrade_policy
    • vbs_enabled
    • vvtd_enabled
    • vtpm

    Migrating from a Previous Version of the Resource

    NOTE: This section only applies this resource available in v0.4.2 or earlier of this provider.

    The path for migrating to the current version of this resource is very similar to the import path; however, with the exception that the pulumi import command does not need to be run. See that section for details on what is required before you run pulumi preview on a provider resource that must be migrated.

    A successful migration usually only results in a configuration-only diff - that is, Terraform reconciles the configuration settings that can not be set during the migration process with he Terraform state. In this event, no reconfiguration operations are sent to vSphere during the next pulumi up. For more information, see the importing section.

    Create VirtualMachine Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new VirtualMachine(name: string, args: VirtualMachineArgs, opts?: CustomResourceOptions);
    @overload
    def VirtualMachine(resource_name: str,
                       args: VirtualMachineArgs,
                       opts: Optional[ResourceOptions] = None)
    
    @overload
    def VirtualMachine(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       resource_pool_id: Optional[str] = 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_reservation_locked_to_max: Optional[bool] = 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,
                       nvme_controller_count: 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,
                       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,
                       vtpm: Optional[VirtualMachineVtpmArgs] = 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)
    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.
    
    

    Parameters

    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.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var virtualMachineResource = new VSphere.VirtualMachine("virtualMachineResource", new()
    {
        ResourcePoolId = "string",
        AlternateGuestName = "string",
        Annotation = "string",
        BootDelay = 0,
        BootRetryDelay = 0,
        BootRetryEnabled = false,
        Cdroms = new[]
        {
            new VSphere.Inputs.VirtualMachineCdromArgs
            {
                ClientDevice = false,
                DatastoreId = "string",
                DeviceAddress = "string",
                Key = 0,
                Path = "string",
            },
        },
        Clone = new VSphere.Inputs.VirtualMachineCloneArgs
        {
            TemplateUuid = "string",
            CustomizationSpec = new VSphere.Inputs.VirtualMachineCloneCustomizationSpecArgs
            {
                Id = "string",
                Timeout = 0,
            },
            Customize = new VSphere.Inputs.VirtualMachineCloneCustomizeArgs
            {
                DnsServerLists = new[]
                {
                    "string",
                },
                DnsSuffixLists = new[]
                {
                    "string",
                },
                Ipv4Gateway = "string",
                Ipv6Gateway = "string",
                LinuxOptions = new VSphere.Inputs.VirtualMachineCloneCustomizeLinuxOptionsArgs
                {
                    Domain = "string",
                    HostName = "string",
                    HwClockUtc = false,
                    ScriptText = "string",
                    TimeZone = "string",
                },
                NetworkInterfaces = new[]
                {
                    new VSphere.Inputs.VirtualMachineCloneCustomizeNetworkInterfaceArgs
                    {
                        DnsDomain = "string",
                        DnsServerLists = new[]
                        {
                            "string",
                        },
                        Ipv4Address = "string",
                        Ipv4Netmask = 0,
                        Ipv6Address = "string",
                        Ipv6Netmask = 0,
                    },
                },
                Timeout = 0,
                WindowsOptions = new VSphere.Inputs.VirtualMachineCloneCustomizeWindowsOptionsArgs
                {
                    ComputerName = "string",
                    DomainOu = "string",
                    AutoLogonCount = 0,
                    AutoLogon = false,
                    DomainAdminPassword = "string",
                    DomainAdminUser = "string",
                    AdminPassword = "string",
                    FullName = "string",
                    JoinDomain = "string",
                    OrganizationName = "string",
                    ProductKey = "string",
                    RunOnceCommandLists = new[]
                    {
                        "string",
                    },
                    TimeZone = 0,
                    Workgroup = "string",
                },
                WindowsSysprepText = "string",
            },
            LinkedClone = false,
            OvfNetworkMap = 
            {
                { "string", "string" },
            },
            OvfStorageMap = 
            {
                { "string", "string" },
            },
            Timeout = 0,
        },
        CpuHotAddEnabled = false,
        CpuHotRemoveEnabled = false,
        CpuLimit = 0,
        CpuPerformanceCountersEnabled = false,
        CpuReservation = 0,
        CpuShareCount = 0,
        CpuShareLevel = "string",
        CustomAttributes = 
        {
            { "string", "string" },
        },
        DatacenterId = "string",
        DatastoreClusterId = "string",
        DatastoreId = "string",
        Disks = new[]
        {
            new VSphere.Inputs.VirtualMachineDiskArgs
            {
                Label = "string",
                IoShareLevel = "string",
                DatastoreId = "string",
                DeviceAddress = "string",
                DiskMode = "string",
                DiskSharing = "string",
                EagerlyScrub = false,
                IoLimit = 0,
                IoReservation = 0,
                Attach = false,
                IoShareCount = 0,
                ControllerType = "string",
                Key = 0,
                KeepOnRemove = false,
                Path = "string",
                Size = 0,
                StoragePolicyId = "string",
                ThinProvisioned = false,
                UnitNumber = 0,
                Uuid = "string",
                WriteThrough = false,
            },
        },
        EfiSecureBootEnabled = false,
        EnableDiskUuid = false,
        EnableLogging = false,
        EptRviMode = "string",
        ExtraConfig = 
        {
            { "string", "string" },
        },
        ExtraConfigRebootRequired = false,
        Firmware = "string",
        Folder = "string",
        ForcePowerOff = false,
        GuestId = "string",
        HardwareVersion = 0,
        HostSystemId = "string",
        HvMode = "string",
        IdeControllerCount = 0,
        IgnoredGuestIps = new[]
        {
            "string",
        },
        LatencySensitivity = "string",
        Memory = 0,
        MemoryHotAddEnabled = false,
        MemoryLimit = 0,
        MemoryReservation = 0,
        MemoryReservationLockedToMax = false,
        MemoryShareCount = 0,
        MemoryShareLevel = "string",
        MigrateWaitTimeout = 0,
        Name = "string",
        NestedHvEnabled = false,
        NetworkInterfaces = new[]
        {
            new VSphere.Inputs.VirtualMachineNetworkInterfaceArgs
            {
                NetworkId = "string",
                AdapterType = "string",
                BandwidthLimit = 0,
                BandwidthReservation = 0,
                BandwidthShareCount = 0,
                BandwidthShareLevel = "string",
                DeviceAddress = "string",
                Key = 0,
                MacAddress = "string",
                OvfMapping = "string",
                PhysicalFunction = "string",
                UseStaticMac = false,
            },
        },
        NumCoresPerSocket = 0,
        NumCpus = 0,
        NvmeControllerCount = 0,
        OvfDeploy = new VSphere.Inputs.VirtualMachineOvfDeployArgs
        {
            AllowUnverifiedSslCert = false,
            DeploymentOption = "string",
            DiskProvisioning = "string",
            EnableHiddenProperties = false,
            IpAllocationPolicy = "string",
            IpProtocol = "string",
            LocalOvfPath = "string",
            OvfNetworkMap = 
            {
                { "string", "string" },
            },
            RemoteOvfUrl = "string",
        },
        PciDeviceIds = new[]
        {
            "string",
        },
        PoweronTimeout = 0,
        ReplaceTrigger = "string",
        RunToolsScriptsAfterPowerOn = false,
        RunToolsScriptsAfterResume = false,
        RunToolsScriptsBeforeGuestReboot = false,
        RunToolsScriptsBeforeGuestShutdown = false,
        RunToolsScriptsBeforeGuestStandby = false,
        SataControllerCount = 0,
        ScsiBusSharing = "string",
        ScsiControllerCount = 0,
        ScsiType = "string",
        ShutdownWaitTimeout = 0,
        StoragePolicyId = "string",
        SwapPlacementPolicy = "string",
        SyncTimeWithHost = false,
        SyncTimeWithHostPeriodically = false,
        Tags = new[]
        {
            "string",
        },
        ToolsUpgradePolicy = "string",
        Vapp = new VSphere.Inputs.VirtualMachineVappArgs
        {
            Properties = 
            {
                { "string", "string" },
            },
        },
        VbsEnabled = false,
        Vtpm = new VSphere.Inputs.VirtualMachineVtpmArgs
        {
            Version = "string",
        },
        VvtdEnabled = false,
        WaitForGuestIpTimeout = 0,
        WaitForGuestNetRoutable = false,
        WaitForGuestNetTimeout = 0,
    });
    
    example, err := vsphere.NewVirtualMachine(ctx, "virtualMachineResource", &vsphere.VirtualMachineArgs{
    	ResourcePoolId:     pulumi.String("string"),
    	AlternateGuestName: pulumi.String("string"),
    	Annotation:         pulumi.String("string"),
    	BootDelay:          pulumi.Int(0),
    	BootRetryDelay:     pulumi.Int(0),
    	BootRetryEnabled:   pulumi.Bool(false),
    	Cdroms: vsphere.VirtualMachineCdromArray{
    		&vsphere.VirtualMachineCdromArgs{
    			ClientDevice:  pulumi.Bool(false),
    			DatastoreId:   pulumi.String("string"),
    			DeviceAddress: pulumi.String("string"),
    			Key:           pulumi.Int(0),
    			Path:          pulumi.String("string"),
    		},
    	},
    	Clone: &vsphere.VirtualMachineCloneArgs{
    		TemplateUuid: pulumi.String("string"),
    		CustomizationSpec: &vsphere.VirtualMachineCloneCustomizationSpecArgs{
    			Id:      pulumi.String("string"),
    			Timeout: pulumi.Int(0),
    		},
    		Customize: &vsphere.VirtualMachineCloneCustomizeArgs{
    			DnsServerLists: pulumi.StringArray{
    				pulumi.String("string"),
    			},
    			DnsSuffixLists: pulumi.StringArray{
    				pulumi.String("string"),
    			},
    			Ipv4Gateway: pulumi.String("string"),
    			Ipv6Gateway: pulumi.String("string"),
    			LinuxOptions: &vsphere.VirtualMachineCloneCustomizeLinuxOptionsArgs{
    				Domain:     pulumi.String("string"),
    				HostName:   pulumi.String("string"),
    				HwClockUtc: pulumi.Bool(false),
    				ScriptText: pulumi.String("string"),
    				TimeZone:   pulumi.String("string"),
    			},
    			NetworkInterfaces: vsphere.VirtualMachineCloneCustomizeNetworkInterfaceArray{
    				&vsphere.VirtualMachineCloneCustomizeNetworkInterfaceArgs{
    					DnsDomain: pulumi.String("string"),
    					DnsServerLists: pulumi.StringArray{
    						pulumi.String("string"),
    					},
    					Ipv4Address: pulumi.String("string"),
    					Ipv4Netmask: pulumi.Int(0),
    					Ipv6Address: pulumi.String("string"),
    					Ipv6Netmask: pulumi.Int(0),
    				},
    			},
    			Timeout: pulumi.Int(0),
    			WindowsOptions: &vsphere.VirtualMachineCloneCustomizeWindowsOptionsArgs{
    				ComputerName:        pulumi.String("string"),
    				DomainOu:            pulumi.String("string"),
    				AutoLogonCount:      pulumi.Int(0),
    				AutoLogon:           pulumi.Bool(false),
    				DomainAdminPassword: pulumi.String("string"),
    				DomainAdminUser:     pulumi.String("string"),
    				AdminPassword:       pulumi.String("string"),
    				FullName:            pulumi.String("string"),
    				JoinDomain:          pulumi.String("string"),
    				OrganizationName:    pulumi.String("string"),
    				ProductKey:          pulumi.String("string"),
    				RunOnceCommandLists: pulumi.StringArray{
    					pulumi.String("string"),
    				},
    				TimeZone:  pulumi.Int(0),
    				Workgroup: pulumi.String("string"),
    			},
    			WindowsSysprepText: pulumi.String("string"),
    		},
    		LinkedClone: pulumi.Bool(false),
    		OvfNetworkMap: pulumi.StringMap{
    			"string": pulumi.String("string"),
    		},
    		OvfStorageMap: pulumi.StringMap{
    			"string": pulumi.String("string"),
    		},
    		Timeout: pulumi.Int(0),
    	},
    	CpuHotAddEnabled:              pulumi.Bool(false),
    	CpuHotRemoveEnabled:           pulumi.Bool(false),
    	CpuLimit:                      pulumi.Int(0),
    	CpuPerformanceCountersEnabled: pulumi.Bool(false),
    	CpuReservation:                pulumi.Int(0),
    	CpuShareCount:                 pulumi.Int(0),
    	CpuShareLevel:                 pulumi.String("string"),
    	CustomAttributes: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	DatacenterId:       pulumi.String("string"),
    	DatastoreClusterId: pulumi.String("string"),
    	DatastoreId:        pulumi.String("string"),
    	Disks: vsphere.VirtualMachineDiskArray{
    		&vsphere.VirtualMachineDiskArgs{
    			Label:           pulumi.String("string"),
    			IoShareLevel:    pulumi.String("string"),
    			DatastoreId:     pulumi.String("string"),
    			DeviceAddress:   pulumi.String("string"),
    			DiskMode:        pulumi.String("string"),
    			DiskSharing:     pulumi.String("string"),
    			EagerlyScrub:    pulumi.Bool(false),
    			IoLimit:         pulumi.Int(0),
    			IoReservation:   pulumi.Int(0),
    			Attach:          pulumi.Bool(false),
    			IoShareCount:    pulumi.Int(0),
    			ControllerType:  pulumi.String("string"),
    			Key:             pulumi.Int(0),
    			KeepOnRemove:    pulumi.Bool(false),
    			Path:            pulumi.String("string"),
    			Size:            pulumi.Int(0),
    			StoragePolicyId: pulumi.String("string"),
    			ThinProvisioned: pulumi.Bool(false),
    			UnitNumber:      pulumi.Int(0),
    			Uuid:            pulumi.String("string"),
    			WriteThrough:    pulumi.Bool(false),
    		},
    	},
    	EfiSecureBootEnabled: pulumi.Bool(false),
    	EnableDiskUuid:       pulumi.Bool(false),
    	EnableLogging:        pulumi.Bool(false),
    	EptRviMode:           pulumi.String("string"),
    	ExtraConfig: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	ExtraConfigRebootRequired: pulumi.Bool(false),
    	Firmware:                  pulumi.String("string"),
    	Folder:                    pulumi.String("string"),
    	ForcePowerOff:             pulumi.Bool(false),
    	GuestId:                   pulumi.String("string"),
    	HardwareVersion:           pulumi.Int(0),
    	HostSystemId:              pulumi.String("string"),
    	HvMode:                    pulumi.String("string"),
    	IdeControllerCount:        pulumi.Int(0),
    	IgnoredGuestIps: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	LatencySensitivity:           pulumi.String("string"),
    	Memory:                       pulumi.Int(0),
    	MemoryHotAddEnabled:          pulumi.Bool(false),
    	MemoryLimit:                  pulumi.Int(0),
    	MemoryReservation:            pulumi.Int(0),
    	MemoryReservationLockedToMax: pulumi.Bool(false),
    	MemoryShareCount:             pulumi.Int(0),
    	MemoryShareLevel:             pulumi.String("string"),
    	MigrateWaitTimeout:           pulumi.Int(0),
    	Name:                         pulumi.String("string"),
    	NestedHvEnabled:              pulumi.Bool(false),
    	NetworkInterfaces: vsphere.VirtualMachineNetworkInterfaceArray{
    		&vsphere.VirtualMachineNetworkInterfaceArgs{
    			NetworkId:            pulumi.String("string"),
    			AdapterType:          pulumi.String("string"),
    			BandwidthLimit:       pulumi.Int(0),
    			BandwidthReservation: pulumi.Int(0),
    			BandwidthShareCount:  pulumi.Int(0),
    			BandwidthShareLevel:  pulumi.String("string"),
    			DeviceAddress:        pulumi.String("string"),
    			Key:                  pulumi.Int(0),
    			MacAddress:           pulumi.String("string"),
    			OvfMapping:           pulumi.String("string"),
    			PhysicalFunction:     pulumi.String("string"),
    			UseStaticMac:         pulumi.Bool(false),
    		},
    	},
    	NumCoresPerSocket:   pulumi.Int(0),
    	NumCpus:             pulumi.Int(0),
    	NvmeControllerCount: pulumi.Int(0),
    	OvfDeploy: &vsphere.VirtualMachineOvfDeployArgs{
    		AllowUnverifiedSslCert: pulumi.Bool(false),
    		DeploymentOption:       pulumi.String("string"),
    		DiskProvisioning:       pulumi.String("string"),
    		EnableHiddenProperties: pulumi.Bool(false),
    		IpAllocationPolicy:     pulumi.String("string"),
    		IpProtocol:             pulumi.String("string"),
    		LocalOvfPath:           pulumi.String("string"),
    		OvfNetworkMap: pulumi.StringMap{
    			"string": pulumi.String("string"),
    		},
    		RemoteOvfUrl: pulumi.String("string"),
    	},
    	PciDeviceIds: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	PoweronTimeout:                     pulumi.Int(0),
    	ReplaceTrigger:                     pulumi.String("string"),
    	RunToolsScriptsAfterPowerOn:        pulumi.Bool(false),
    	RunToolsScriptsAfterResume:         pulumi.Bool(false),
    	RunToolsScriptsBeforeGuestReboot:   pulumi.Bool(false),
    	RunToolsScriptsBeforeGuestShutdown: pulumi.Bool(false),
    	RunToolsScriptsBeforeGuestStandby:  pulumi.Bool(false),
    	SataControllerCount:                pulumi.Int(0),
    	ScsiBusSharing:                     pulumi.String("string"),
    	ScsiControllerCount:                pulumi.Int(0),
    	ScsiType:                           pulumi.String("string"),
    	ShutdownWaitTimeout:                pulumi.Int(0),
    	StoragePolicyId:                    pulumi.String("string"),
    	SwapPlacementPolicy:                pulumi.String("string"),
    	SyncTimeWithHost:                   pulumi.Bool(false),
    	SyncTimeWithHostPeriodically:       pulumi.Bool(false),
    	Tags: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	ToolsUpgradePolicy: pulumi.String("string"),
    	Vapp: &vsphere.VirtualMachineVappArgs{
    		Properties: pulumi.StringMap{
    			"string": pulumi.String("string"),
    		},
    	},
    	VbsEnabled: pulumi.Bool(false),
    	Vtpm: &vsphere.VirtualMachineVtpmArgs{
    		Version: pulumi.String("string"),
    	},
    	VvtdEnabled:             pulumi.Bool(false),
    	WaitForGuestIpTimeout:   pulumi.Int(0),
    	WaitForGuestNetRoutable: pulumi.Bool(false),
    	WaitForGuestNetTimeout:  pulumi.Int(0),
    })
    
    var virtualMachineResource = new VirtualMachine("virtualMachineResource", VirtualMachineArgs.builder()
        .resourcePoolId("string")
        .alternateGuestName("string")
        .annotation("string")
        .bootDelay(0)
        .bootRetryDelay(0)
        .bootRetryEnabled(false)
        .cdroms(VirtualMachineCdromArgs.builder()
            .clientDevice(false)
            .datastoreId("string")
            .deviceAddress("string")
            .key(0)
            .path("string")
            .build())
        .clone(VirtualMachineCloneArgs.builder()
            .templateUuid("string")
            .customizationSpec(VirtualMachineCloneCustomizationSpecArgs.builder()
                .id("string")
                .timeout(0)
                .build())
            .customize(VirtualMachineCloneCustomizeArgs.builder()
                .dnsServerLists("string")
                .dnsSuffixLists("string")
                .ipv4Gateway("string")
                .ipv6Gateway("string")
                .linuxOptions(VirtualMachineCloneCustomizeLinuxOptionsArgs.builder()
                    .domain("string")
                    .hostName("string")
                    .hwClockUtc(false)
                    .scriptText("string")
                    .timeZone("string")
                    .build())
                .networkInterfaces(VirtualMachineCloneCustomizeNetworkInterfaceArgs.builder()
                    .dnsDomain("string")
                    .dnsServerLists("string")
                    .ipv4Address("string")
                    .ipv4Netmask(0)
                    .ipv6Address("string")
                    .ipv6Netmask(0)
                    .build())
                .timeout(0)
                .windowsOptions(VirtualMachineCloneCustomizeWindowsOptionsArgs.builder()
                    .computerName("string")
                    .domainOu("string")
                    .autoLogonCount(0)
                    .autoLogon(false)
                    .domainAdminPassword("string")
                    .domainAdminUser("string")
                    .adminPassword("string")
                    .fullName("string")
                    .joinDomain("string")
                    .organizationName("string")
                    .productKey("string")
                    .runOnceCommandLists("string")
                    .timeZone(0)
                    .workgroup("string")
                    .build())
                .windowsSysprepText("string")
                .build())
            .linkedClone(false)
            .ovfNetworkMap(Map.of("string", "string"))
            .ovfStorageMap(Map.of("string", "string"))
            .timeout(0)
            .build())
        .cpuHotAddEnabled(false)
        .cpuHotRemoveEnabled(false)
        .cpuLimit(0)
        .cpuPerformanceCountersEnabled(false)
        .cpuReservation(0)
        .cpuShareCount(0)
        .cpuShareLevel("string")
        .customAttributes(Map.of("string", "string"))
        .datacenterId("string")
        .datastoreClusterId("string")
        .datastoreId("string")
        .disks(VirtualMachineDiskArgs.builder()
            .label("string")
            .ioShareLevel("string")
            .datastoreId("string")
            .deviceAddress("string")
            .diskMode("string")
            .diskSharing("string")
            .eagerlyScrub(false)
            .ioLimit(0)
            .ioReservation(0)
            .attach(false)
            .ioShareCount(0)
            .controllerType("string")
            .key(0)
            .keepOnRemove(false)
            .path("string")
            .size(0)
            .storagePolicyId("string")
            .thinProvisioned(false)
            .unitNumber(0)
            .uuid("string")
            .writeThrough(false)
            .build())
        .efiSecureBootEnabled(false)
        .enableDiskUuid(false)
        .enableLogging(false)
        .eptRviMode("string")
        .extraConfig(Map.of("string", "string"))
        .extraConfigRebootRequired(false)
        .firmware("string")
        .folder("string")
        .forcePowerOff(false)
        .guestId("string")
        .hardwareVersion(0)
        .hostSystemId("string")
        .hvMode("string")
        .ideControllerCount(0)
        .ignoredGuestIps("string")
        .latencySensitivity("string")
        .memory(0)
        .memoryHotAddEnabled(false)
        .memoryLimit(0)
        .memoryReservation(0)
        .memoryReservationLockedToMax(false)
        .memoryShareCount(0)
        .memoryShareLevel("string")
        .migrateWaitTimeout(0)
        .name("string")
        .nestedHvEnabled(false)
        .networkInterfaces(VirtualMachineNetworkInterfaceArgs.builder()
            .networkId("string")
            .adapterType("string")
            .bandwidthLimit(0)
            .bandwidthReservation(0)
            .bandwidthShareCount(0)
            .bandwidthShareLevel("string")
            .deviceAddress("string")
            .key(0)
            .macAddress("string")
            .ovfMapping("string")
            .physicalFunction("string")
            .useStaticMac(false)
            .build())
        .numCoresPerSocket(0)
        .numCpus(0)
        .nvmeControllerCount(0)
        .ovfDeploy(VirtualMachineOvfDeployArgs.builder()
            .allowUnverifiedSslCert(false)
            .deploymentOption("string")
            .diskProvisioning("string")
            .enableHiddenProperties(false)
            .ipAllocationPolicy("string")
            .ipProtocol("string")
            .localOvfPath("string")
            .ovfNetworkMap(Map.of("string", "string"))
            .remoteOvfUrl("string")
            .build())
        .pciDeviceIds("string")
        .poweronTimeout(0)
        .replaceTrigger("string")
        .runToolsScriptsAfterPowerOn(false)
        .runToolsScriptsAfterResume(false)
        .runToolsScriptsBeforeGuestReboot(false)
        .runToolsScriptsBeforeGuestShutdown(false)
        .runToolsScriptsBeforeGuestStandby(false)
        .sataControllerCount(0)
        .scsiBusSharing("string")
        .scsiControllerCount(0)
        .scsiType("string")
        .shutdownWaitTimeout(0)
        .storagePolicyId("string")
        .swapPlacementPolicy("string")
        .syncTimeWithHost(false)
        .syncTimeWithHostPeriodically(false)
        .tags("string")
        .toolsUpgradePolicy("string")
        .vapp(VirtualMachineVappArgs.builder()
            .properties(Map.of("string", "string"))
            .build())
        .vbsEnabled(false)
        .vtpm(VirtualMachineVtpmArgs.builder()
            .version("string")
            .build())
        .vvtdEnabled(false)
        .waitForGuestIpTimeout(0)
        .waitForGuestNetRoutable(false)
        .waitForGuestNetTimeout(0)
        .build());
    
    virtual_machine_resource = vsphere.VirtualMachine("virtualMachineResource",
        resource_pool_id="string",
        alternate_guest_name="string",
        annotation="string",
        boot_delay=0,
        boot_retry_delay=0,
        boot_retry_enabled=False,
        cdroms=[{
            "client_device": False,
            "datastore_id": "string",
            "device_address": "string",
            "key": 0,
            "path": "string",
        }],
        clone={
            "template_uuid": "string",
            "customization_spec": {
                "id": "string",
                "timeout": 0,
            },
            "customize": {
                "dns_server_lists": ["string"],
                "dns_suffix_lists": ["string"],
                "ipv4_gateway": "string",
                "ipv6_gateway": "string",
                "linux_options": {
                    "domain": "string",
                    "host_name": "string",
                    "hw_clock_utc": False,
                    "script_text": "string",
                    "time_zone": "string",
                },
                "network_interfaces": [{
                    "dns_domain": "string",
                    "dns_server_lists": ["string"],
                    "ipv4_address": "string",
                    "ipv4_netmask": 0,
                    "ipv6_address": "string",
                    "ipv6_netmask": 0,
                }],
                "timeout": 0,
                "windows_options": {
                    "computer_name": "string",
                    "domain_ou": "string",
                    "auto_logon_count": 0,
                    "auto_logon": False,
                    "domain_admin_password": "string",
                    "domain_admin_user": "string",
                    "admin_password": "string",
                    "full_name": "string",
                    "join_domain": "string",
                    "organization_name": "string",
                    "product_key": "string",
                    "run_once_command_lists": ["string"],
                    "time_zone": 0,
                    "workgroup": "string",
                },
                "windows_sysprep_text": "string",
            },
            "linked_clone": False,
            "ovf_network_map": {
                "string": "string",
            },
            "ovf_storage_map": {
                "string": "string",
            },
            "timeout": 0,
        },
        cpu_hot_add_enabled=False,
        cpu_hot_remove_enabled=False,
        cpu_limit=0,
        cpu_performance_counters_enabled=False,
        cpu_reservation=0,
        cpu_share_count=0,
        cpu_share_level="string",
        custom_attributes={
            "string": "string",
        },
        datacenter_id="string",
        datastore_cluster_id="string",
        datastore_id="string",
        disks=[{
            "label": "string",
            "io_share_level": "string",
            "datastore_id": "string",
            "device_address": "string",
            "disk_mode": "string",
            "disk_sharing": "string",
            "eagerly_scrub": False,
            "io_limit": 0,
            "io_reservation": 0,
            "attach": False,
            "io_share_count": 0,
            "controller_type": "string",
            "key": 0,
            "keep_on_remove": False,
            "path": "string",
            "size": 0,
            "storage_policy_id": "string",
            "thin_provisioned": False,
            "unit_number": 0,
            "uuid": "string",
            "write_through": False,
        }],
        efi_secure_boot_enabled=False,
        enable_disk_uuid=False,
        enable_logging=False,
        ept_rvi_mode="string",
        extra_config={
            "string": "string",
        },
        extra_config_reboot_required=False,
        firmware="string",
        folder="string",
        force_power_off=False,
        guest_id="string",
        hardware_version=0,
        host_system_id="string",
        hv_mode="string",
        ide_controller_count=0,
        ignored_guest_ips=["string"],
        latency_sensitivity="string",
        memory=0,
        memory_hot_add_enabled=False,
        memory_limit=0,
        memory_reservation=0,
        memory_reservation_locked_to_max=False,
        memory_share_count=0,
        memory_share_level="string",
        migrate_wait_timeout=0,
        name="string",
        nested_hv_enabled=False,
        network_interfaces=[{
            "network_id": "string",
            "adapter_type": "string",
            "bandwidth_limit": 0,
            "bandwidth_reservation": 0,
            "bandwidth_share_count": 0,
            "bandwidth_share_level": "string",
            "device_address": "string",
            "key": 0,
            "mac_address": "string",
            "ovf_mapping": "string",
            "physical_function": "string",
            "use_static_mac": False,
        }],
        num_cores_per_socket=0,
        num_cpus=0,
        nvme_controller_count=0,
        ovf_deploy={
            "allow_unverified_ssl_cert": False,
            "deployment_option": "string",
            "disk_provisioning": "string",
            "enable_hidden_properties": False,
            "ip_allocation_policy": "string",
            "ip_protocol": "string",
            "local_ovf_path": "string",
            "ovf_network_map": {
                "string": "string",
            },
            "remote_ovf_url": "string",
        },
        pci_device_ids=["string"],
        poweron_timeout=0,
        replace_trigger="string",
        run_tools_scripts_after_power_on=False,
        run_tools_scripts_after_resume=False,
        run_tools_scripts_before_guest_reboot=False,
        run_tools_scripts_before_guest_shutdown=False,
        run_tools_scripts_before_guest_standby=False,
        sata_controller_count=0,
        scsi_bus_sharing="string",
        scsi_controller_count=0,
        scsi_type="string",
        shutdown_wait_timeout=0,
        storage_policy_id="string",
        swap_placement_policy="string",
        sync_time_with_host=False,
        sync_time_with_host_periodically=False,
        tags=["string"],
        tools_upgrade_policy="string",
        vapp={
            "properties": {
                "string": "string",
            },
        },
        vbs_enabled=False,
        vtpm={
            "version": "string",
        },
        vvtd_enabled=False,
        wait_for_guest_ip_timeout=0,
        wait_for_guest_net_routable=False,
        wait_for_guest_net_timeout=0)
    
    const virtualMachineResource = new vsphere.VirtualMachine("virtualMachineResource", {
        resourcePoolId: "string",
        alternateGuestName: "string",
        annotation: "string",
        bootDelay: 0,
        bootRetryDelay: 0,
        bootRetryEnabled: false,
        cdroms: [{
            clientDevice: false,
            datastoreId: "string",
            deviceAddress: "string",
            key: 0,
            path: "string",
        }],
        clone: {
            templateUuid: "string",
            customizationSpec: {
                id: "string",
                timeout: 0,
            },
            customize: {
                dnsServerLists: ["string"],
                dnsSuffixLists: ["string"],
                ipv4Gateway: "string",
                ipv6Gateway: "string",
                linuxOptions: {
                    domain: "string",
                    hostName: "string",
                    hwClockUtc: false,
                    scriptText: "string",
                    timeZone: "string",
                },
                networkInterfaces: [{
                    dnsDomain: "string",
                    dnsServerLists: ["string"],
                    ipv4Address: "string",
                    ipv4Netmask: 0,
                    ipv6Address: "string",
                    ipv6Netmask: 0,
                }],
                timeout: 0,
                windowsOptions: {
                    computerName: "string",
                    domainOu: "string",
                    autoLogonCount: 0,
                    autoLogon: false,
                    domainAdminPassword: "string",
                    domainAdminUser: "string",
                    adminPassword: "string",
                    fullName: "string",
                    joinDomain: "string",
                    organizationName: "string",
                    productKey: "string",
                    runOnceCommandLists: ["string"],
                    timeZone: 0,
                    workgroup: "string",
                },
                windowsSysprepText: "string",
            },
            linkedClone: false,
            ovfNetworkMap: {
                string: "string",
            },
            ovfStorageMap: {
                string: "string",
            },
            timeout: 0,
        },
        cpuHotAddEnabled: false,
        cpuHotRemoveEnabled: false,
        cpuLimit: 0,
        cpuPerformanceCountersEnabled: false,
        cpuReservation: 0,
        cpuShareCount: 0,
        cpuShareLevel: "string",
        customAttributes: {
            string: "string",
        },
        datacenterId: "string",
        datastoreClusterId: "string",
        datastoreId: "string",
        disks: [{
            label: "string",
            ioShareLevel: "string",
            datastoreId: "string",
            deviceAddress: "string",
            diskMode: "string",
            diskSharing: "string",
            eagerlyScrub: false,
            ioLimit: 0,
            ioReservation: 0,
            attach: false,
            ioShareCount: 0,
            controllerType: "string",
            key: 0,
            keepOnRemove: false,
            path: "string",
            size: 0,
            storagePolicyId: "string",
            thinProvisioned: false,
            unitNumber: 0,
            uuid: "string",
            writeThrough: false,
        }],
        efiSecureBootEnabled: false,
        enableDiskUuid: false,
        enableLogging: false,
        eptRviMode: "string",
        extraConfig: {
            string: "string",
        },
        extraConfigRebootRequired: false,
        firmware: "string",
        folder: "string",
        forcePowerOff: false,
        guestId: "string",
        hardwareVersion: 0,
        hostSystemId: "string",
        hvMode: "string",
        ideControllerCount: 0,
        ignoredGuestIps: ["string"],
        latencySensitivity: "string",
        memory: 0,
        memoryHotAddEnabled: false,
        memoryLimit: 0,
        memoryReservation: 0,
        memoryReservationLockedToMax: false,
        memoryShareCount: 0,
        memoryShareLevel: "string",
        migrateWaitTimeout: 0,
        name: "string",
        nestedHvEnabled: false,
        networkInterfaces: [{
            networkId: "string",
            adapterType: "string",
            bandwidthLimit: 0,
            bandwidthReservation: 0,
            bandwidthShareCount: 0,
            bandwidthShareLevel: "string",
            deviceAddress: "string",
            key: 0,
            macAddress: "string",
            ovfMapping: "string",
            physicalFunction: "string",
            useStaticMac: false,
        }],
        numCoresPerSocket: 0,
        numCpus: 0,
        nvmeControllerCount: 0,
        ovfDeploy: {
            allowUnverifiedSslCert: false,
            deploymentOption: "string",
            diskProvisioning: "string",
            enableHiddenProperties: false,
            ipAllocationPolicy: "string",
            ipProtocol: "string",
            localOvfPath: "string",
            ovfNetworkMap: {
                string: "string",
            },
            remoteOvfUrl: "string",
        },
        pciDeviceIds: ["string"],
        poweronTimeout: 0,
        replaceTrigger: "string",
        runToolsScriptsAfterPowerOn: false,
        runToolsScriptsAfterResume: false,
        runToolsScriptsBeforeGuestReboot: false,
        runToolsScriptsBeforeGuestShutdown: false,
        runToolsScriptsBeforeGuestStandby: false,
        sataControllerCount: 0,
        scsiBusSharing: "string",
        scsiControllerCount: 0,
        scsiType: "string",
        shutdownWaitTimeout: 0,
        storagePolicyId: "string",
        swapPlacementPolicy: "string",
        syncTimeWithHost: false,
        syncTimeWithHostPeriodically: false,
        tags: ["string"],
        toolsUpgradePolicy: "string",
        vapp: {
            properties: {
                string: "string",
            },
        },
        vbsEnabled: false,
        vtpm: {
            version: "string",
        },
        vvtdEnabled: false,
        waitForGuestIpTimeout: 0,
        waitForGuestNetRoutable: false,
        waitForGuestNetTimeout: 0,
    });
    
    type: vsphere:VirtualMachine
    properties:
        alternateGuestName: string
        annotation: string
        bootDelay: 0
        bootRetryDelay: 0
        bootRetryEnabled: false
        cdroms:
            - clientDevice: false
              datastoreId: string
              deviceAddress: string
              key: 0
              path: string
        clone:
            customizationSpec:
                id: string
                timeout: 0
            customize:
                dnsServerLists:
                    - string
                dnsSuffixLists:
                    - string
                ipv4Gateway: string
                ipv6Gateway: string
                linuxOptions:
                    domain: string
                    hostName: string
                    hwClockUtc: false
                    scriptText: string
                    timeZone: string
                networkInterfaces:
                    - dnsDomain: string
                      dnsServerLists:
                        - string
                      ipv4Address: string
                      ipv4Netmask: 0
                      ipv6Address: string
                      ipv6Netmask: 0
                timeout: 0
                windowsOptions:
                    adminPassword: string
                    autoLogon: false
                    autoLogonCount: 0
                    computerName: string
                    domainAdminPassword: string
                    domainAdminUser: string
                    domainOu: string
                    fullName: string
                    joinDomain: string
                    organizationName: string
                    productKey: string
                    runOnceCommandLists:
                        - string
                    timeZone: 0
                    workgroup: string
                windowsSysprepText: string
            linkedClone: false
            ovfNetworkMap:
                string: string
            ovfStorageMap:
                string: string
            templateUuid: string
            timeout: 0
        cpuHotAddEnabled: false
        cpuHotRemoveEnabled: false
        cpuLimit: 0
        cpuPerformanceCountersEnabled: false
        cpuReservation: 0
        cpuShareCount: 0
        cpuShareLevel: string
        customAttributes:
            string: string
        datacenterId: string
        datastoreClusterId: string
        datastoreId: string
        disks:
            - attach: false
              controllerType: string
              datastoreId: string
              deviceAddress: string
              diskMode: string
              diskSharing: string
              eagerlyScrub: false
              ioLimit: 0
              ioReservation: 0
              ioShareCount: 0
              ioShareLevel: string
              keepOnRemove: false
              key: 0
              label: string
              path: string
              size: 0
              storagePolicyId: string
              thinProvisioned: false
              unitNumber: 0
              uuid: string
              writeThrough: false
        efiSecureBootEnabled: false
        enableDiskUuid: false
        enableLogging: false
        eptRviMode: string
        extraConfig:
            string: string
        extraConfigRebootRequired: false
        firmware: string
        folder: string
        forcePowerOff: false
        guestId: string
        hardwareVersion: 0
        hostSystemId: string
        hvMode: string
        ideControllerCount: 0
        ignoredGuestIps:
            - string
        latencySensitivity: string
        memory: 0
        memoryHotAddEnabled: false
        memoryLimit: 0
        memoryReservation: 0
        memoryReservationLockedToMax: false
        memoryShareCount: 0
        memoryShareLevel: string
        migrateWaitTimeout: 0
        name: string
        nestedHvEnabled: false
        networkInterfaces:
            - adapterType: string
              bandwidthLimit: 0
              bandwidthReservation: 0
              bandwidthShareCount: 0
              bandwidthShareLevel: string
              deviceAddress: string
              key: 0
              macAddress: string
              networkId: string
              ovfMapping: string
              physicalFunction: string
              useStaticMac: false
        numCoresPerSocket: 0
        numCpus: 0
        nvmeControllerCount: 0
        ovfDeploy:
            allowUnverifiedSslCert: false
            deploymentOption: string
            diskProvisioning: string
            enableHiddenProperties: false
            ipAllocationPolicy: string
            ipProtocol: string
            localOvfPath: string
            ovfNetworkMap:
                string: string
            remoteOvfUrl: string
        pciDeviceIds:
            - string
        poweronTimeout: 0
        replaceTrigger: string
        resourcePoolId: string
        runToolsScriptsAfterPowerOn: false
        runToolsScriptsAfterResume: false
        runToolsScriptsBeforeGuestReboot: false
        runToolsScriptsBeforeGuestShutdown: false
        runToolsScriptsBeforeGuestStandby: false
        sataControllerCount: 0
        scsiBusSharing: string
        scsiControllerCount: 0
        scsiType: string
        shutdownWaitTimeout: 0
        storagePolicyId: string
        swapPlacementPolicy: string
        syncTimeWithHost: false
        syncTimeWithHostPeriodically: false
        tags:
            - string
        toolsUpgradePolicy: string
        vapp:
            properties:
                string: string
        vbsEnabled: false
        vtpm:
            version: string
        vvtdEnabled: false
        waitForGuestIpTimeout: 0
        waitForGuestNetRoutable: false
        waitForGuestNetTimeout: 0
    

    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

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The VirtualMachine resource accepts the following input properties:

    ResourcePoolId string
    The ID of a resource pool to put the virtual machine in.
    AlternateGuestName string
    The guest name for the operating system when guest_id is otherGuest or otherGuest64.
    Annotation string
    User-provided description of the virtual machine.
    BootDelay int
    The number of milliseconds to wait before starting the boot sequence.
    BootRetryDelay int
    The number of milliseconds to wait before retrying the boot sequence. This only valid if boot_retry_enabled is true.
    BootRetryEnabled bool
    If set to true, a virtual machine that fails to boot will try again after the delay defined in boot_retry_delay.
    Cdroms List<Pulumi.VSphere.Inputs.VirtualMachineCdrom>
    A specification for a CDROM device on this virtual machine.
    Clone Pulumi.VSphere.Inputs.VirtualMachineClone
    A specification for cloning a virtual machine from template.
    CpuHotAddEnabled bool
    Allow CPUs to be added to this virtual machine while it is running.
    CpuHotRemoveEnabled bool
    Allow CPUs to be added to this virtual machine while it is running.
    CpuLimit int
    The maximum amount of memory (in MB) or CPU (in MHz) that this virtual machine can consume, regardless of available resources.
    CpuPerformanceCountersEnabled bool
    Enable CPU performance counters on this virtual machine.
    CpuReservation int
    The amount of memory (in MB) or CPU (in MHz) that this virtual machine is guaranteed.
    CpuShareCount int
    The amount of shares to allocate to cpu for a custom share level.
    CpuShareLevel string
    The allocation level for cpu resources. Can be one of high, low, normal, or custom.
    CustomAttributes Dictionary<string, string>
    A list of custom attributes to set on this resource.
    DatacenterId string
    The ID of the datacenter where the VM is to be created.
    DatastoreClusterId string
    The ID of a datastore cluster to put the virtual machine in.
    DatastoreId string
    The ID of the virtual machine's datastore. The virtual machine configuration is placed here, along with any virtual disks that are created without datastores.
    Disks List<Pulumi.VSphere.Inputs.VirtualMachineDisk>
    A specification for a virtual disk device on this virtual machine.
    EfiSecureBootEnabled bool
    When the boot type set in firmware is efi, this enables EFI secure boot.
    EnableDiskUuid bool
    Expose the UUIDs of attached virtual disks to the virtual machine, allowing access to them in the guest.
    EnableLogging bool
    Enable logging on this virtual machine.
    EptRviMode string
    The EPT/RVI (hardware memory virtualization) setting for this virtual machine. Can be one of automatic, on, or off.
    ExtraConfig Dictionary<string, string>
    Extra configuration data for this virtual machine. Can be used to supply advanced parameters not normally in configuration, such as instance metadata, or configuration data for OVF images.
    ExtraConfigRebootRequired bool
    Allow the virtual machine to be rebooted when a change to extra_config occurs.
    Firmware string
    The firmware interface to use on the virtual machine. Can be one of bios or efi.
    Folder string
    The name of the folder to locate the virtual machine in.
    ForcePowerOff bool
    Set to true to force power-off a virtual machine if a graceful guest shutdown failed for a necessary operation.
    GuestId string
    The guest ID for the operating system.
    HardwareVersion int
    The hardware version for the virtual machine. Allows versions within ranges: 4, 7-11, 13-15, 17-22.
    HostSystemId string
    The ID of an optional host system to pin the virtual machine to.
    HvMode string
    The (non-nested) hardware virtualization setting for this virtual machine. Can be one of hvAuto, hvOn, or hvOff.
    IdeControllerCount int
    The number of IDE controllers that Terraform manages on this virtual machine. This directly affects the amount of disks you can add to the virtual machine and the maximum disk unit number. Note that lowering this value does not remove controllers.
    IgnoredGuestIps List<string>
    List of IP addresses and CIDR networks to ignore while waiting for an IP
    LatencySensitivity string
    Controls the scheduling delay of the virtual machine. Use a higher sensitivity for applications that require lower latency, such as VOIP, media player applications, or applications that require frequent access to mouse or keyboard devices. Can be one of low, normal, medium, or high.
    Memory int
    The size of the virtual machine's memory, in MB.
    MemoryHotAddEnabled bool
    Allow memory to be added to this virtual machine while it is running.
    MemoryLimit int
    The maximum amount of memory (in MB) or CPU (in MHz) that this virtual machine can consume, regardless of available resources.
    MemoryReservation int
    The amount of memory (in MB) or CPU (in MHz) that this virtual machine is guaranteed.
    MemoryReservationLockedToMax bool
    If set true, memory resource reservation for this virtual machine will always be equal to the virtual machine's memory size;increases in memory size will be rejected when a corresponding reservation increase is not possible. This feature may only be enabled if it is currently possible to reserve all of the virtual machine's memory.
    MemoryShareCount int
    The amount of shares to allocate to memory for a custom share level.
    MemoryShareLevel string
    The allocation level for memory resources. Can be one of high, low, normal, or custom.
    MigrateWaitTimeout int
    The amount of time, in minutes, to wait for a vMotion operation to complete before failing.
    Name string
    The name of this virtual machine.
    NestedHvEnabled bool
    Enable nested hardware virtualization on this virtual machine, facilitating nested virtualization in the guest.
    NetworkInterfaces List<Pulumi.VSphere.Inputs.VirtualMachineNetworkInterface>
    A specification for a virtual NIC on this virtual machine.
    NumCoresPerSocket int
    The number of cores to distribute amongst the CPUs in this virtual machine. If specified, the value supplied to num_cpus must be evenly divisible by this value.
    NumCpus int
    The number of virtual processors to assign to this virtual machine.
    NvmeControllerCount int
    The number of NVMe 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.
    OvfDeploy Pulumi.VSphere.Inputs.VirtualMachineOvfDeploy
    A specification for deploying a virtual machine from ovf/ova template.
    PciDeviceIds List<string>
    A list of PCI passthrough devices
    PoweronTimeout int
    The amount of time, in seconds, that we will be trying to power on a VM
    ReplaceTrigger string
    Triggers replacement of resource whenever it changes.
    RunToolsScriptsAfterPowerOn bool
    Enable the run of scripts after virtual machine power-on when VMware Tools is installed.
    RunToolsScriptsAfterResume bool
    Enable the run of scripts after virtual machine resume when when VMware Tools is installed.
    RunToolsScriptsBeforeGuestReboot bool
    Enable the run of scripts before guest operating system reboot when VMware Tools is installed.
    RunToolsScriptsBeforeGuestShutdown bool
    Enable the run of scripts before guest operating system shutdown when VMware Tools is installed.
    RunToolsScriptsBeforeGuestStandby bool
    Enable the run of scripts before guest operating system standby when VMware Tools is installed.
    SataControllerCount int
    The number of SATA controllers that Terraform manages on this virtual machine. This directly affects the amount of disks you can add to the virtual machine and the maximum disk unit number. Note that lowering this value does not remove controllers.
    ScsiBusSharing string
    Mode for sharing the SCSI bus. The modes are physicalSharing, virtualSharing, and noSharing.
    ScsiControllerCount int
    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.
    ScsiType string
    The type of SCSI bus this virtual machine will have. Can be one of lsilogic, lsilogic-sas or pvscsi.
    ShutdownWaitTimeout int
    The amount of time, in minutes, to wait for shutdown when making necessary updates to the virtual machine.
    StoragePolicyId string
    The ID of the storage policy to assign to the virtual machine home directory.
    SwapPlacementPolicy string
    The swap file placement policy for this virtual machine. Can be one of inherit, hostLocal, or vmDirectory.
    SyncTimeWithHost bool
    Enable guest clock synchronization with the host. On vSphere 7.0 U1 and above, with only this setting the clock is synchronized on startup and resume. Requires VMware Tools to be installed.
    SyncTimeWithHostPeriodically bool
    Enable periodic clock synchronization with the host. Supported only on vSphere 7.0 U1 and above. On prior versions setting sync_time_with_host is enough for periodic synchronization. Requires VMware Tools to be installed.
    Tags List<string>
    A list of tag IDs to apply to this object.
    ToolsUpgradePolicy string
    Set the upgrade policy for VMware Tools. Can be one of manual or upgradeAtPowerCycle.
    Vapp Pulumi.VSphere.Inputs.VirtualMachineVapp
    vApp configuration data for this virtual machine. Can be used to provide configuration data for OVF images.
    VbsEnabled bool
    Flag to specify if Virtualization-based security is enabled for this virtual machine.
    Vtpm Pulumi.VSphere.Inputs.VirtualMachineVtpm
    A specification for a virtual Trusted Platform Module (TPM) device on the virtual machine.
    VvtdEnabled bool
    Flag to specify if I/O MMU virtualization, also called Intel Virtualization Technology for Directed I/O (VT-d) and AMD I/O Virtualization (AMD-Vi or IOMMU), is enabled.
    WaitForGuestIpTimeout int
    The amount of time, in minutes, to wait for an available IP address on this virtual machine. A value less than 1 disables the waiter.
    WaitForGuestNetRoutable bool
    Controls whether or not the guest network waiter waits for a routable address. When false, the waiter does not wait for a default gateway, nor are IP addresses checked against any discovered default gateways as part of its success criteria.
    WaitForGuestNetTimeout int
    The amount of time, in minutes, to wait for an available IP address on this virtual machine. A value less than 1 disables the waiter.
    ResourcePoolId string
    The ID of a resource pool to put the virtual machine in.
    AlternateGuestName string
    The guest name for the operating system when guest_id is otherGuest or otherGuest64.
    Annotation string
    User-provided description of the virtual machine.
    BootDelay int
    The number of milliseconds to wait before starting the boot sequence.
    BootRetryDelay int
    The number of milliseconds to wait before retrying the boot sequence. This only valid if boot_retry_enabled is true.
    BootRetryEnabled bool
    If set to true, a virtual machine that fails to boot will try again after the delay defined in boot_retry_delay.
    Cdroms []VirtualMachineCdromArgs
    A specification for a CDROM device on this virtual machine.
    Clone VirtualMachineCloneArgs
    A specification for cloning a virtual machine from template.
    CpuHotAddEnabled bool
    Allow CPUs to be added to this virtual machine while it is running.
    CpuHotRemoveEnabled bool
    Allow CPUs to be added to this virtual machine while it is running.
    CpuLimit int
    The maximum amount of memory (in MB) or CPU (in MHz) that this virtual machine can consume, regardless of available resources.
    CpuPerformanceCountersEnabled bool
    Enable CPU performance counters on this virtual machine.
    CpuReservation int
    The amount of memory (in MB) or CPU (in MHz) that this virtual machine is guaranteed.
    CpuShareCount int
    The amount of shares to allocate to cpu for a custom share level.
    CpuShareLevel string
    The allocation level for cpu resources. Can be one of high, low, normal, or custom.
    CustomAttributes map[string]string
    A list of custom attributes to set on this resource.
    DatacenterId string
    The ID of the datacenter where the VM is to be created.
    DatastoreClusterId string
    The ID of a datastore cluster to put the virtual machine in.
    DatastoreId string
    The ID of the virtual machine's datastore. The virtual machine configuration is placed here, along with any virtual disks that are created without datastores.
    Disks []VirtualMachineDiskArgs
    A specification for a virtual disk device on this virtual machine.
    EfiSecureBootEnabled bool
    When the boot type set in firmware is efi, this enables EFI secure boot.
    EnableDiskUuid bool
    Expose the UUIDs of attached virtual disks to the virtual machine, allowing access to them in the guest.
    EnableLogging bool
    Enable logging on this virtual machine.
    EptRviMode string
    The EPT/RVI (hardware memory virtualization) setting for this virtual machine. Can be one of automatic, on, or off.
    ExtraConfig map[string]string
    Extra configuration data for this virtual machine. Can be used to supply advanced parameters not normally in configuration, such as instance metadata, or configuration data for OVF images.
    ExtraConfigRebootRequired bool
    Allow the virtual machine to be rebooted when a change to extra_config occurs.
    Firmware string
    The firmware interface to use on the virtual machine. Can be one of bios or efi.
    Folder string
    The name of the folder to locate the virtual machine in.
    ForcePowerOff bool
    Set to true to force power-off a virtual machine if a graceful guest shutdown failed for a necessary operation.
    GuestId string
    The guest ID for the operating system.
    HardwareVersion int
    The hardware version for the virtual machine. Allows versions within ranges: 4, 7-11, 13-15, 17-22.
    HostSystemId string
    The ID of an optional host system to pin the virtual machine to.
    HvMode string
    The (non-nested) hardware virtualization setting for this virtual machine. Can be one of hvAuto, hvOn, or hvOff.
    IdeControllerCount int
    The number of IDE controllers that Terraform manages on this virtual machine. This directly affects the amount of disks you can add to the virtual machine and the maximum disk unit number. Note that lowering this value does not remove controllers.
    IgnoredGuestIps []string
    List of IP addresses and CIDR networks to ignore while waiting for an IP
    LatencySensitivity string
    Controls the scheduling delay of the virtual machine. Use a higher sensitivity for applications that require lower latency, such as VOIP, media player applications, or applications that require frequent access to mouse or keyboard devices. Can be one of low, normal, medium, or high.
    Memory int
    The size of the virtual machine's memory, in MB.
    MemoryHotAddEnabled bool
    Allow memory to be added to this virtual machine while it is running.
    MemoryLimit int
    The maximum amount of memory (in MB) or CPU (in MHz) that this virtual machine can consume, regardless of available resources.
    MemoryReservation int
    The amount of memory (in MB) or CPU (in MHz) that this virtual machine is guaranteed.
    MemoryReservationLockedToMax bool
    If set true, memory resource reservation for this virtual machine will always be equal to the virtual machine's memory size;increases in memory size will be rejected when a corresponding reservation increase is not possible. This feature may only be enabled if it is currently possible to reserve all of the virtual machine's memory.
    MemoryShareCount int
    The amount of shares to allocate to memory for a custom share level.
    MemoryShareLevel string
    The allocation level for memory resources. Can be one of high, low, normal, or custom.
    MigrateWaitTimeout int
    The amount of time, in minutes, to wait for a vMotion operation to complete before failing.
    Name string
    The name of this virtual machine.
    NestedHvEnabled bool
    Enable nested hardware virtualization on this virtual machine, facilitating nested virtualization in the guest.
    NetworkInterfaces []VirtualMachineNetworkInterfaceArgs
    A specification for a virtual NIC on this virtual machine.
    NumCoresPerSocket int
    The number of cores to distribute amongst the CPUs in this virtual machine. If specified, the value supplied to num_cpus must be evenly divisible by this value.
    NumCpus int
    The number of virtual processors to assign to this virtual machine.
    NvmeControllerCount int
    The number of NVMe 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.
    OvfDeploy VirtualMachineOvfDeployArgs
    A specification for deploying a virtual machine from ovf/ova template.
    PciDeviceIds []string
    A list of PCI passthrough devices
    PoweronTimeout int
    The amount of time, in seconds, that we will be trying to power on a VM
    ReplaceTrigger string
    Triggers replacement of resource whenever it changes.
    RunToolsScriptsAfterPowerOn bool
    Enable the run of scripts after virtual machine power-on when VMware Tools is installed.
    RunToolsScriptsAfterResume bool
    Enable the run of scripts after virtual machine resume when when VMware Tools is installed.
    RunToolsScriptsBeforeGuestReboot bool
    Enable the run of scripts before guest operating system reboot when VMware Tools is installed.
    RunToolsScriptsBeforeGuestShutdown bool
    Enable the run of scripts before guest operating system shutdown when VMware Tools is installed.
    RunToolsScriptsBeforeGuestStandby bool
    Enable the run of scripts before guest operating system standby when VMware Tools is installed.
    SataControllerCount int
    The number of SATA controllers that Terraform manages on this virtual machine. This directly affects the amount of disks you can add to the virtual machine and the maximum disk unit number. Note that lowering this value does not remove controllers.
    ScsiBusSharing string
    Mode for sharing the SCSI bus. The modes are physicalSharing, virtualSharing, and noSharing.
    ScsiControllerCount int
    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.
    ScsiType string
    The type of SCSI bus this virtual machine will have. Can be one of lsilogic, lsilogic-sas or pvscsi.
    ShutdownWaitTimeout int
    The amount of time, in minutes, to wait for shutdown when making necessary updates to the virtual machine.
    StoragePolicyId string
    The ID of the storage policy to assign to the virtual machine home directory.
    SwapPlacementPolicy string
    The swap file placement policy for this virtual machine. Can be one of inherit, hostLocal, or vmDirectory.
    SyncTimeWithHost bool
    Enable guest clock synchronization with the host. On vSphere 7.0 U1 and above, with only this setting the clock is synchronized on startup and resume. Requires VMware Tools to be installed.
    SyncTimeWithHostPeriodically bool
    Enable periodic clock synchronization with the host. Supported only on vSphere 7.0 U1 and above. On prior versions setting sync_time_with_host is enough for periodic synchronization. Requires VMware Tools to be installed.
    Tags []string
    A list of tag IDs to apply to this object.
    ToolsUpgradePolicy string
    Set the upgrade policy for VMware Tools. Can be one of manual or upgradeAtPowerCycle.
    Vapp VirtualMachineVappArgs
    vApp configuration data for this virtual machine. Can be used to provide configuration data for OVF images.
    VbsEnabled bool
    Flag to specify if Virtualization-based security is enabled for this virtual machine.
    Vtpm VirtualMachineVtpmArgs
    A specification for a virtual Trusted Platform Module (TPM) device on the virtual machine.
    VvtdEnabled bool
    Flag to specify if I/O MMU virtualization, also called Intel Virtualization Technology for Directed I/O (VT-d) and AMD I/O Virtualization (AMD-Vi or IOMMU), is enabled.
    WaitForGuestIpTimeout int
    The amount of time, in minutes, to wait for an available IP address on this virtual machine. A value less than 1 disables the waiter.
    WaitForGuestNetRoutable bool
    Controls whether or not the guest network waiter waits for a routable address. When false, the waiter does not wait for a default gateway, nor are IP addresses checked against any discovered default gateways as part of its success criteria.
    WaitForGuestNetTimeout int
    The amount of time, in minutes, to wait for an available IP address on this virtual machine. A value less than 1 disables the waiter.
    resourcePoolId String
    The ID of a resource pool to put the virtual machine in.
    alternateGuestName String
    The guest name for the operating system when guest_id is otherGuest or otherGuest64.
    annotation String
    User-provided description of the virtual machine.
    bootDelay Integer
    The number of milliseconds to wait before starting the boot sequence.
    bootRetryDelay Integer
    The number of milliseconds to wait before retrying the boot sequence. This only valid if boot_retry_enabled is true.
    bootRetryEnabled Boolean
    If set to true, a virtual machine that fails to boot will try again after the delay defined in boot_retry_delay.
    cdroms List<VirtualMachineCdrom>
    A specification for a CDROM device on this virtual machine.
    clone_ VirtualMachineClone
    A specification for cloning a virtual machine from template.
    cpuHotAddEnabled Boolean
    Allow CPUs to be added to this virtual machine while it is running.
    cpuHotRemoveEnabled Boolean
    Allow CPUs to be added to this virtual machine while it is running.
    cpuLimit Integer
    The maximum amount of memory (in MB) or CPU (in MHz) that this virtual machine can consume, regardless of available resources.
    cpuPerformanceCountersEnabled Boolean
    Enable CPU performance counters on this virtual machine.
    cpuReservation Integer
    The amount of memory (in MB) or CPU (in MHz) that this virtual machine is guaranteed.
    cpuShareCount Integer
    The amount of shares to allocate to cpu for a custom share level.
    cpuShareLevel String
    The allocation level for cpu resources. Can be one of high, low, normal, or custom.
    customAttributes Map<String,String>
    A list of custom attributes to set on this resource.
    datacenterId String
    The ID of the datacenter where the VM is to be created.
    datastoreClusterId String
    The ID of a datastore cluster to put the virtual machine in.
    datastoreId String
    The ID of the virtual machine's datastore. The virtual machine configuration is placed here, along with any virtual disks that are created without datastores.
    disks List<VirtualMachineDisk>
    A specification for a virtual disk device on this virtual machine.
    efiSecureBootEnabled Boolean
    When the boot type set in firmware is efi, this enables EFI secure boot.
    enableDiskUuid Boolean
    Expose the UUIDs of attached virtual disks to the virtual machine, allowing access to them in the guest.
    enableLogging Boolean
    Enable logging on this virtual machine.
    eptRviMode String
    The EPT/RVI (hardware memory virtualization) setting for this virtual machine. Can be one of automatic, on, or off.
    extraConfig Map<String,String>
    Extra configuration data for this virtual machine. Can be used to supply advanced parameters not normally in configuration, such as instance metadata, or configuration data for OVF images.
    extraConfigRebootRequired Boolean
    Allow the virtual machine to be rebooted when a change to extra_config occurs.
    firmware String
    The firmware interface to use on the virtual machine. Can be one of bios or efi.
    folder String
    The name of the folder to locate the virtual machine in.
    forcePowerOff Boolean
    Set to true to force power-off a virtual machine if a graceful guest shutdown failed for a necessary operation.
    guestId String
    The guest ID for the operating system.
    hardwareVersion Integer
    The hardware version for the virtual machine. Allows versions within ranges: 4, 7-11, 13-15, 17-22.
    hostSystemId String
    The ID of an optional host system to pin the virtual machine to.
    hvMode String
    The (non-nested) hardware virtualization setting for this virtual machine. Can be one of hvAuto, hvOn, or hvOff.
    ideControllerCount Integer
    The number of IDE controllers that Terraform manages on this virtual machine. This directly affects the amount of disks you can add to the virtual machine and the maximum disk unit number. Note that lowering this value does not remove controllers.
    ignoredGuestIps List<String>
    List of IP addresses and CIDR networks to ignore while waiting for an IP
    latencySensitivity String
    Controls the scheduling delay of the virtual machine. Use a higher sensitivity for applications that require lower latency, such as VOIP, media player applications, or applications that require frequent access to mouse or keyboard devices. Can be one of low, normal, medium, or high.
    memory Integer
    The size of the virtual machine's memory, in MB.
    memoryHotAddEnabled Boolean
    Allow memory to be added to this virtual machine while it is running.
    memoryLimit Integer
    The maximum amount of memory (in MB) or CPU (in MHz) that this virtual machine can consume, regardless of available resources.
    memoryReservation Integer
    The amount of memory (in MB) or CPU (in MHz) that this virtual machine is guaranteed.
    memoryReservationLockedToMax Boolean
    If set true, memory resource reservation for this virtual machine will always be equal to the virtual machine's memory size;increases in memory size will be rejected when a corresponding reservation increase is not possible. This feature may only be enabled if it is currently possible to reserve all of the virtual machine's memory.
    memoryShareCount Integer
    The amount of shares to allocate to memory for a custom share level.
    memoryShareLevel String
    The allocation level for memory resources. Can be one of high, low, normal, or custom.
    migrateWaitTimeout Integer
    The amount of time, in minutes, to wait for a vMotion operation to complete before failing.
    name String
    The name of this virtual machine.
    nestedHvEnabled Boolean
    Enable nested hardware virtualization on this virtual machine, facilitating nested virtualization in the guest.
    networkInterfaces List<VirtualMachineNetworkInterface>
    A specification for a virtual NIC on this virtual machine.
    numCoresPerSocket Integer
    The number of cores to distribute amongst the CPUs in this virtual machine. If specified, the value supplied to num_cpus must be evenly divisible by this value.
    numCpus Integer
    The number of virtual processors to assign to this virtual machine.
    nvmeControllerCount Integer
    The number of NVMe 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.
    ovfDeploy VirtualMachineOvfDeploy
    A specification for deploying a virtual machine from ovf/ova template.
    pciDeviceIds List<String>
    A list of PCI passthrough devices
    poweronTimeout Integer
    The amount of time, in seconds, that we will be trying to power on a VM
    replaceTrigger String
    Triggers replacement of resource whenever it changes.
    runToolsScriptsAfterPowerOn Boolean
    Enable the run of scripts after virtual machine power-on when VMware Tools is installed.
    runToolsScriptsAfterResume Boolean
    Enable the run of scripts after virtual machine resume when when VMware Tools is installed.
    runToolsScriptsBeforeGuestReboot Boolean
    Enable the run of scripts before guest operating system reboot when VMware Tools is installed.
    runToolsScriptsBeforeGuestShutdown Boolean
    Enable the run of scripts before guest operating system shutdown when VMware Tools is installed.
    runToolsScriptsBeforeGuestStandby Boolean
    Enable the run of scripts before guest operating system standby when VMware Tools is installed.
    sataControllerCount Integer
    The number of SATA controllers that Terraform manages on this virtual machine. This directly affects the amount of disks you can add to the virtual machine and the maximum disk unit number. Note that lowering this value does not remove controllers.
    scsiBusSharing String
    Mode for sharing the SCSI bus. The modes are physicalSharing, virtualSharing, and noSharing.
    scsiControllerCount Integer
    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.
    scsiType String
    The type of SCSI bus this virtual machine will have. Can be one of lsilogic, lsilogic-sas or pvscsi.
    shutdownWaitTimeout Integer
    The amount of time, in minutes, to wait for shutdown when making necessary updates to the virtual machine.
    storagePolicyId String
    The ID of the storage policy to assign to the virtual machine home directory.
    swapPlacementPolicy String
    The swap file placement policy for this virtual machine. Can be one of inherit, hostLocal, or vmDirectory.
    syncTimeWithHost Boolean
    Enable guest clock synchronization with the host. On vSphere 7.0 U1 and above, with only this setting the clock is synchronized on startup and resume. Requires VMware Tools to be installed.
    syncTimeWithHostPeriodically Boolean
    Enable periodic clock synchronization with the host. Supported only on vSphere 7.0 U1 and above. On prior versions setting sync_time_with_host is enough for periodic synchronization. Requires VMware Tools to be installed.
    tags List<String>
    A list of tag IDs to apply to this object.
    toolsUpgradePolicy String
    Set the upgrade policy for VMware Tools. Can be one of manual or upgradeAtPowerCycle.
    vapp VirtualMachineVapp
    vApp configuration data for this virtual machine. Can be used to provide configuration data for OVF images.
    vbsEnabled Boolean
    Flag to specify if Virtualization-based security is enabled for this virtual machine.
    vtpm VirtualMachineVtpm
    A specification for a virtual Trusted Platform Module (TPM) device on the virtual machine.
    vvtdEnabled Boolean
    Flag to specify if I/O MMU virtualization, also called Intel Virtualization Technology for Directed I/O (VT-d) and AMD I/O Virtualization (AMD-Vi or IOMMU), is enabled.
    waitForGuestIpTimeout Integer
    The amount of time, in minutes, to wait for an available IP address on this virtual machine. A value less than 1 disables the waiter.
    waitForGuestNetRoutable Boolean
    Controls whether or not the guest network waiter waits for a routable address. When false, the waiter does not wait for a default gateway, nor are IP addresses checked against any discovered default gateways as part of its success criteria.
    waitForGuestNetTimeout Integer
    The amount of time, in minutes, to wait for an available IP address on this virtual machine. A value less than 1 disables the waiter.
    resourcePoolId string
    The ID of a resource pool to put the virtual machine in.
    alternateGuestName string
    The guest name for the operating system when guest_id is otherGuest or otherGuest64.
    annotation string
    User-provided description of the virtual machine.
    bootDelay number
    The number of milliseconds to wait before starting the boot sequence.
    bootRetryDelay number
    The number of milliseconds to wait before retrying the boot sequence. This only valid if boot_retry_enabled is true.
    bootRetryEnabled boolean
    If set to true, a virtual machine that fails to boot will try again after the delay defined in boot_retry_delay.
    cdroms VirtualMachineCdrom[]
    A specification for a CDROM device on this virtual machine.
    clone VirtualMachineClone
    A specification for cloning a virtual machine from template.
    cpuHotAddEnabled boolean
    Allow CPUs to be added to this virtual machine while it is running.
    cpuHotRemoveEnabled boolean
    Allow CPUs to be added to this virtual machine while it is running.
    cpuLimit number
    The maximum amount of memory (in MB) or CPU (in MHz) that this virtual machine can consume, regardless of available resources.
    cpuPerformanceCountersEnabled boolean
    Enable CPU performance counters on this virtual machine.
    cpuReservation number
    The amount of memory (in MB) or CPU (in MHz) that this virtual machine is guaranteed.
    cpuShareCount number
    The amount of shares to allocate to cpu for a custom share level.
    cpuShareLevel string
    The allocation level for cpu resources. Can be one of high, low, normal, or custom.
    customAttributes {[key: string]: string}
    A list of custom attributes to set on this resource.
    datacenterId string
    The ID of the datacenter where the VM is to be created.
    datastoreClusterId string
    The ID of a datastore cluster to put the virtual machine in.
    datastoreId string
    The ID of the virtual machine's datastore. The virtual machine configuration is placed here, along with any virtual disks that are created without datastores.
    disks VirtualMachineDisk[]
    A specification for a virtual disk device on this virtual machine.
    efiSecureBootEnabled boolean
    When the boot type set in firmware is efi, this enables EFI secure boot.
    enableDiskUuid boolean
    Expose the UUIDs of attached virtual disks to the virtual machine, allowing access to them in the guest.
    enableLogging boolean
    Enable logging on this virtual machine.
    eptRviMode string
    The EPT/RVI (hardware memory virtualization) setting for this virtual machine. Can be one of automatic, on, or off.
    extraConfig {[key: string]: string}
    Extra configuration data for this virtual machine. Can be used to supply advanced parameters not normally in configuration, such as instance metadata, or configuration data for OVF images.
    extraConfigRebootRequired boolean
    Allow the virtual machine to be rebooted when a change to extra_config occurs.
    firmware string
    The firmware interface to use on the virtual machine. Can be one of bios or efi.
    folder string
    The name of the folder to locate the virtual machine in.
    forcePowerOff boolean
    Set to true to force power-off a virtual machine if a graceful guest shutdown failed for a necessary operation.
    guestId string
    The guest ID for the operating system.
    hardwareVersion number
    The hardware version for the virtual machine. Allows versions within ranges: 4, 7-11, 13-15, 17-22.
    hostSystemId string
    The ID of an optional host system to pin the virtual machine to.
    hvMode string
    The (non-nested) hardware virtualization setting for this virtual machine. Can be one of hvAuto, hvOn, or hvOff.
    ideControllerCount number
    The number of IDE controllers that Terraform manages on this virtual machine. This directly affects the amount of disks you can add to the virtual machine and the maximum disk unit number. Note that lowering this value does not remove controllers.
    ignoredGuestIps string[]
    List of IP addresses and CIDR networks to ignore while waiting for an IP
    latencySensitivity string
    Controls the scheduling delay of the virtual machine. Use a higher sensitivity for applications that require lower latency, such as VOIP, media player applications, or applications that require frequent access to mouse or keyboard devices. Can be one of low, normal, medium, or high.
    memory number
    The size of the virtual machine's memory, in MB.
    memoryHotAddEnabled boolean
    Allow memory to be added to this virtual machine while it is running.
    memoryLimit number
    The maximum amount of memory (in MB) or CPU (in MHz) that this virtual machine can consume, regardless of available resources.
    memoryReservation number
    The amount of memory (in MB) or CPU (in MHz) that this virtual machine is guaranteed.
    memoryReservationLockedToMax boolean
    If set true, memory resource reservation for this virtual machine will always be equal to the virtual machine's memory size;increases in memory size will be rejected when a corresponding reservation increase is not possible. This feature may only be enabled if it is currently possible to reserve all of the virtual machine's memory.
    memoryShareCount number
    The amount of shares to allocate to memory for a custom share level.
    memoryShareLevel string
    The allocation level for memory resources. Can be one of high, low, normal, or custom.
    migrateWaitTimeout number
    The amount of time, in minutes, to wait for a vMotion operation to complete before failing.
    name string
    The name of this virtual machine.
    nestedHvEnabled boolean
    Enable nested hardware virtualization on this virtual machine, facilitating nested virtualization in the guest.
    networkInterfaces VirtualMachineNetworkInterface[]
    A specification for a virtual NIC on this virtual machine.
    numCoresPerSocket number
    The number of cores to distribute amongst the CPUs in this virtual machine. If specified, the value supplied to num_cpus must be evenly divisible by this value.
    numCpus number
    The number of virtual processors to assign to this virtual machine.
    nvmeControllerCount number
    The number of NVMe 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.
    ovfDeploy VirtualMachineOvfDeploy
    A specification for deploying a virtual machine from ovf/ova template.
    pciDeviceIds string[]
    A list of PCI passthrough devices
    poweronTimeout number
    The amount of time, in seconds, that we will be trying to power on a VM
    replaceTrigger string
    Triggers replacement of resource whenever it changes.
    runToolsScriptsAfterPowerOn boolean
    Enable the run of scripts after virtual machine power-on when VMware Tools is installed.
    runToolsScriptsAfterResume boolean
    Enable the run of scripts after virtual machine resume when when VMware Tools is installed.
    runToolsScriptsBeforeGuestReboot boolean
    Enable the run of scripts before guest operating system reboot when VMware Tools is installed.
    runToolsScriptsBeforeGuestShutdown boolean
    Enable the run of scripts before guest operating system shutdown when VMware Tools is installed.
    runToolsScriptsBeforeGuestStandby boolean
    Enable the run of scripts before guest operating system standby when VMware Tools is installed.
    sataControllerCount number
    The number of SATA controllers that Terraform manages on this virtual machine. This directly affects the amount of disks you can add to the virtual machine and the maximum disk unit number. Note that lowering this value does not remove controllers.
    scsiBusSharing string
    Mode for sharing the SCSI bus. The modes are physicalSharing, virtualSharing, and noSharing.
    scsiControllerCount number
    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.
    scsiType string
    The type of SCSI bus this virtual machine will have. Can be one of lsilogic, lsilogic-sas or pvscsi.
    shutdownWaitTimeout number
    The amount of time, in minutes, to wait for shutdown when making necessary updates to the virtual machine.
    storagePolicyId string
    The ID of the storage policy to assign to the virtual machine home directory.
    swapPlacementPolicy string
    The swap file placement policy for this virtual machine. Can be one of inherit, hostLocal, or vmDirectory.
    syncTimeWithHost boolean
    Enable guest clock synchronization with the host. On vSphere 7.0 U1 and above, with only this setting the clock is synchronized on startup and resume. Requires VMware Tools to be installed.
    syncTimeWithHostPeriodically boolean
    Enable periodic clock synchronization with the host. Supported only on vSphere 7.0 U1 and above. On prior versions setting sync_time_with_host is enough for periodic synchronization. Requires VMware Tools to be installed.
    tags string[]
    A list of tag IDs to apply to this object.
    toolsUpgradePolicy string
    Set the upgrade policy for VMware Tools. Can be one of manual or upgradeAtPowerCycle.
    vapp VirtualMachineVapp
    vApp configuration data for this virtual machine. Can be used to provide configuration data for OVF images.
    vbsEnabled boolean
    Flag to specify if Virtualization-based security is enabled for this virtual machine.
    vtpm VirtualMachineVtpm
    A specification for a virtual Trusted Platform Module (TPM) device on the virtual machine.
    vvtdEnabled boolean
    Flag to specify if I/O MMU virtualization, also called Intel Virtualization Technology for Directed I/O (VT-d) and AMD I/O Virtualization (AMD-Vi or IOMMU), is enabled.
    waitForGuestIpTimeout number
    The amount of time, in minutes, to wait for an available IP address on this virtual machine. A value less than 1 disables the waiter.
    waitForGuestNetRoutable boolean
    Controls whether or not the guest network waiter waits for a routable address. When false, the waiter does not wait for a default gateway, nor are IP addresses checked against any discovered default gateways as part of its success criteria.
    waitForGuestNetTimeout number
    The amount of time, in minutes, to wait for an available IP address on this virtual machine. A value less than 1 disables the waiter.
    resource_pool_id str
    The ID of a resource pool to put the virtual machine in.
    alternate_guest_name str
    The guest name for the operating system when guest_id is otherGuest or otherGuest64.
    annotation str
    User-provided description of the virtual machine.
    boot_delay int
    The number of milliseconds to wait before starting the boot sequence.
    boot_retry_delay int
    The number of milliseconds to wait before retrying the boot sequence. This only valid if boot_retry_enabled is true.
    boot_retry_enabled bool
    If set to true, a virtual machine that fails to boot will try again after the delay defined in boot_retry_delay.
    cdroms Sequence[VirtualMachineCdromArgs]
    A specification for a CDROM device on this virtual machine.
    clone VirtualMachineCloneArgs
    A specification for cloning a virtual machine from template.
    cpu_hot_add_enabled bool
    Allow CPUs to be added to this virtual machine while it is running.
    cpu_hot_remove_enabled bool
    Allow CPUs to be added to this virtual machine while it is running.
    cpu_limit int
    The maximum amount of memory (in MB) or CPU (in MHz) that this virtual machine can consume, regardless of available resources.
    cpu_performance_counters_enabled bool
    Enable CPU performance counters on this virtual machine.
    cpu_reservation int
    The amount of memory (in MB) or CPU (in MHz) that this virtual machine is guaranteed.
    cpu_share_count int
    The amount of shares to allocate to cpu for a custom share level.
    cpu_share_level str
    The allocation level for cpu resources. Can be one of high, low, normal, or custom.
    custom_attributes Mapping[str, str]
    A list of custom attributes to set on this resource.
    datacenter_id str
    The ID of the datacenter where the VM is to be created.
    datastore_cluster_id str
    The ID of a datastore cluster to put the virtual machine in.
    datastore_id str
    The ID of the virtual machine's datastore. The virtual machine configuration is placed here, along with any virtual disks that are created without datastores.
    disks Sequence[VirtualMachineDiskArgs]
    A specification for a virtual disk device on this virtual machine.
    efi_secure_boot_enabled bool
    When the boot type set in firmware is efi, this enables EFI secure boot.
    enable_disk_uuid bool
    Expose the UUIDs of attached virtual disks to the virtual machine, allowing access to them in the guest.
    enable_logging bool
    Enable logging on this virtual machine.
    ept_rvi_mode str
    The EPT/RVI (hardware memory virtualization) setting for this virtual machine. Can be one of automatic, on, or off.
    extra_config Mapping[str, str]
    Extra configuration data for this virtual machine. Can be used to supply advanced parameters not normally in configuration, such as instance metadata, or configuration data for OVF images.
    extra_config_reboot_required bool
    Allow the virtual machine to be rebooted when a change to extra_config occurs.
    firmware str
    The firmware interface to use on the virtual machine. Can be one of bios or efi.
    folder str
    The name of the folder to locate the virtual machine in.
    force_power_off bool
    Set to true to force power-off a virtual machine if a graceful guest shutdown failed for a necessary operation.
    guest_id str
    The guest ID for the operating system.
    hardware_version int
    The hardware version for the virtual machine. Allows versions within ranges: 4, 7-11, 13-15, 17-22.
    host_system_id str
    The ID of an optional host system to pin the virtual machine to.
    hv_mode str
    The (non-nested) hardware virtualization setting for this virtual machine. Can be one of hvAuto, hvOn, or hvOff.
    ide_controller_count int
    The number of IDE controllers that Terraform manages on this virtual machine. This directly affects the amount of disks you can add to the virtual machine and the maximum disk unit number. Note that lowering this value does not remove controllers.
    ignored_guest_ips Sequence[str]
    List of IP addresses and CIDR networks to ignore while waiting for an IP
    latency_sensitivity str
    Controls the scheduling delay of the virtual machine. Use a higher sensitivity for applications that require lower latency, such as VOIP, media player applications, or applications that require frequent access to mouse or keyboard devices. Can be one of low, normal, medium, or high.
    memory int
    The size of the virtual machine's memory, in MB.
    memory_hot_add_enabled bool
    Allow memory to be added to this virtual machine while it is running.
    memory_limit int
    The maximum amount of memory (in MB) or CPU (in MHz) that this virtual machine can consume, regardless of available resources.
    memory_reservation int
    The amount of memory (in MB) or CPU (in MHz) that this virtual machine is guaranteed.
    memory_reservation_locked_to_max bool
    If set true, memory resource reservation for this virtual machine will always be equal to the virtual machine's memory size;increases in memory size will be rejected when a corresponding reservation increase is not possible. This feature may only be enabled if it is currently possible to reserve all of the virtual machine's memory.
    memory_share_count int
    The amount of shares to allocate to memory for a custom share level.
    memory_share_level str
    The allocation level for memory resources. Can be one of high, low, normal, or custom.
    migrate_wait_timeout int
    The amount of time, in minutes, to wait for a vMotion operation to complete before failing.
    name str
    The name of this virtual machine.
    nested_hv_enabled bool
    Enable nested hardware virtualization on this virtual machine, facilitating nested virtualization in the guest.
    network_interfaces Sequence[VirtualMachineNetworkInterfaceArgs]
    A specification for a virtual NIC on this virtual machine.
    num_cores_per_socket int
    The number of cores to distribute amongst the CPUs in this virtual machine. If specified, the value supplied to num_cpus must be evenly divisible by this value.
    num_cpus int
    The number of virtual processors to assign to this virtual machine.
    nvme_controller_count int
    The number of NVMe 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.
    ovf_deploy VirtualMachineOvfDeployArgs
    A specification for deploying a virtual machine from ovf/ova template.
    pci_device_ids Sequence[str]
    A list of PCI passthrough devices
    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.
    run_tools_scripts_after_power_on bool
    Enable the run of scripts after virtual machine power-on when VMware Tools is installed.
    run_tools_scripts_after_resume bool
    Enable the run of scripts after virtual machine resume when when VMware Tools is installed.
    run_tools_scripts_before_guest_reboot bool
    Enable the run of scripts before guest operating system reboot when VMware Tools is installed.
    run_tools_scripts_before_guest_shutdown bool
    Enable the run of scripts before guest operating system shutdown when VMware Tools is installed.
    run_tools_scripts_before_guest_standby bool
    Enable the run of scripts before guest operating system standby when VMware Tools is installed.
    sata_controller_count int
    The number of SATA controllers that Terraform manages on this virtual machine. This directly affects the amount of disks you can add to the virtual machine and the maximum disk unit number. Note that lowering this value does not remove controllers.
    scsi_bus_sharing str
    Mode for sharing the SCSI bus. The modes are physicalSharing, virtualSharing, and noSharing.
    scsi_controller_count int
    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 type of SCSI bus this virtual machine will have. Can be one of lsilogic, lsilogic-sas or pvscsi.
    shutdown_wait_timeout int
    The amount of time, in minutes, to wait for shutdown when making necessary updates to the virtual machine.
    storage_policy_id str
    The ID of the storage policy to assign to the virtual machine home directory.
    swap_placement_policy str
    The swap file placement policy for this virtual machine. Can be one of inherit, hostLocal, or vmDirectory.
    sync_time_with_host bool
    Enable guest clock synchronization with the host. On vSphere 7.0 U1 and above, with only this setting the clock is synchronized on startup and resume. Requires VMware Tools to be installed.
    sync_time_with_host_periodically bool
    Enable periodic clock synchronization with the host. Supported only on vSphere 7.0 U1 and above. On prior versions setting sync_time_with_host is enough for periodic synchronization. Requires VMware Tools to be installed.
    tags Sequence[str]
    A list of tag IDs to apply to this object.
    tools_upgrade_policy str
    Set the upgrade policy for VMware Tools. Can be one of manual or upgradeAtPowerCycle.
    vapp VirtualMachineVappArgs
    vApp configuration data for this virtual machine. Can be used to provide configuration data for OVF images.
    vbs_enabled bool
    Flag to specify if Virtualization-based security is enabled for this virtual machine.
    vtpm VirtualMachineVtpmArgs
    A specification for a virtual Trusted Platform Module (TPM) device on the virtual machine.
    vvtd_enabled bool
    Flag to specify if I/O MMU virtualization, also called Intel Virtualization Technology for Directed I/O (VT-d) and AMD I/O Virtualization (AMD-Vi or IOMMU), is enabled.
    wait_for_guest_ip_timeout int
    The amount of time, in minutes, to wait for an available IP address on this virtual machine. A value less than 1 disables the waiter.
    wait_for_guest_net_routable bool
    Controls whether or not the guest network waiter waits for a routable address. When false, the waiter does not wait for a default gateway, nor are IP addresses checked against any discovered default gateways as part of its success criteria.
    wait_for_guest_net_timeout int
    The amount of time, in minutes, to wait for an available IP address on this virtual machine. A value less than 1 disables the waiter.
    resourcePoolId String
    The ID of a resource pool to put the virtual machine in.
    alternateGuestName String
    The guest name for the operating system when guest_id is otherGuest or otherGuest64.
    annotation String
    User-provided description of the virtual machine.
    bootDelay Number
    The number of milliseconds to wait before starting the boot sequence.
    bootRetryDelay Number
    The number of milliseconds to wait before retrying the boot sequence. This only valid if boot_retry_enabled is true.
    bootRetryEnabled Boolean
    If set to true, a virtual machine that fails to boot will try again after the delay defined in boot_retry_delay.
    cdroms List<Property Map>
    A specification for a CDROM device on this virtual machine.
    clone Property Map
    A specification for cloning a virtual machine from template.
    cpuHotAddEnabled Boolean
    Allow CPUs to be added to this virtual machine while it is running.
    cpuHotRemoveEnabled Boolean
    Allow CPUs to be added to this virtual machine while it is running.
    cpuLimit Number
    The maximum amount of memory (in MB) or CPU (in MHz) that this virtual machine can consume, regardless of available resources.
    cpuPerformanceCountersEnabled Boolean
    Enable CPU performance counters on this virtual machine.
    cpuReservation Number
    The amount of memory (in MB) or CPU (in MHz) that this virtual machine is guaranteed.
    cpuShareCount Number
    The amount of shares to allocate to cpu for a custom share level.
    cpuShareLevel String
    The allocation level for cpu resources. Can be one of high, low, normal, or custom.
    customAttributes Map<String>
    A list of custom attributes to set on this resource.
    datacenterId String
    The ID of the datacenter where the VM is to be created.
    datastoreClusterId String
    The ID of a datastore cluster to put the virtual machine in.
    datastoreId String
    The ID of the virtual machine's datastore. The virtual machine configuration is placed here, along with any virtual disks that are created without datastores.
    disks List<Property Map>
    A specification for a virtual disk device on this virtual machine.
    efiSecureBootEnabled Boolean
    When the boot type set in firmware is efi, this enables EFI secure boot.
    enableDiskUuid Boolean
    Expose the UUIDs of attached virtual disks to the virtual machine, allowing access to them in the guest.
    enableLogging Boolean
    Enable logging on this virtual machine.
    eptRviMode String
    The EPT/RVI (hardware memory virtualization) setting for this virtual machine. Can be one of automatic, on, or off.
    extraConfig Map<String>
    Extra configuration data for this virtual machine. Can be used to supply advanced parameters not normally in configuration, such as instance metadata, or configuration data for OVF images.
    extraConfigRebootRequired Boolean
    Allow the virtual machine to be rebooted when a change to extra_config occurs.
    firmware String
    The firmware interface to use on the virtual machine. Can be one of bios or efi.
    folder String
    The name of the folder to locate the virtual machine in.
    forcePowerOff Boolean
    Set to true to force power-off a virtual machine if a graceful guest shutdown failed for a necessary operation.
    guestId String
    The guest ID for the operating system.
    hardwareVersion Number
    The hardware version for the virtual machine. Allows versions within ranges: 4, 7-11, 13-15, 17-22.
    hostSystemId String
    The ID of an optional host system to pin the virtual machine to.
    hvMode String
    The (non-nested) hardware virtualization setting for this virtual machine. Can be one of hvAuto, hvOn, or hvOff.
    ideControllerCount Number
    The number of IDE controllers that Terraform manages on this virtual machine. This directly affects the amount of disks you can add to the virtual machine and the maximum disk unit number. Note that lowering this value does not remove controllers.
    ignoredGuestIps List<String>
    List of IP addresses and CIDR networks to ignore while waiting for an IP
    latencySensitivity String
    Controls the scheduling delay of the virtual machine. Use a higher sensitivity for applications that require lower latency, such as VOIP, media player applications, or applications that require frequent access to mouse or keyboard devices. Can be one of low, normal, medium, or high.
    memory Number
    The size of the virtual machine's memory, in MB.
    memoryHotAddEnabled Boolean
    Allow memory to be added to this virtual machine while it is running.
    memoryLimit Number
    The maximum amount of memory (in MB) or CPU (in MHz) that this virtual machine can consume, regardless of available resources.
    memoryReservation Number
    The amount of memory (in MB) or CPU (in MHz) that this virtual machine is guaranteed.
    memoryReservationLockedToMax Boolean
    If set true, memory resource reservation for this virtual machine will always be equal to the virtual machine's memory size;increases in memory size will be rejected when a corresponding reservation increase is not possible. This feature may only be enabled if it is currently possible to reserve all of the virtual machine's memory.
    memoryShareCount Number
    The amount of shares to allocate to memory for a custom share level.
    memoryShareLevel String
    The allocation level for memory resources. Can be one of high, low, normal, or custom.
    migrateWaitTimeout Number
    The amount of time, in minutes, to wait for a vMotion operation to complete before failing.
    name String
    The name of this virtual machine.
    nestedHvEnabled Boolean
    Enable nested hardware virtualization on this virtual machine, facilitating nested virtualization in the guest.
    networkInterfaces List<Property Map>
    A specification for a virtual NIC on this virtual machine.
    numCoresPerSocket Number
    The number of cores to distribute amongst the CPUs in this virtual machine. If specified, the value supplied to num_cpus must be evenly divisible by this value.
    numCpus Number
    The number of virtual processors to assign to this virtual machine.
    nvmeControllerCount Number
    The number of NVMe 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.
    ovfDeploy Property Map
    A specification for deploying a virtual machine from ovf/ova template.
    pciDeviceIds List<String>
    A list of PCI passthrough devices
    poweronTimeout Number
    The amount of time, in seconds, that we will be trying to power on a VM
    replaceTrigger String
    Triggers replacement of resource whenever it changes.
    runToolsScriptsAfterPowerOn Boolean
    Enable the run of scripts after virtual machine power-on when VMware Tools is installed.
    runToolsScriptsAfterResume Boolean
    Enable the run of scripts after virtual machine resume when when VMware Tools is installed.
    runToolsScriptsBeforeGuestReboot Boolean
    Enable the run of scripts before guest operating system reboot when VMware Tools is installed.
    runToolsScriptsBeforeGuestShutdown Boolean
    Enable the run of scripts before guest operating system shutdown when VMware Tools is installed.
    runToolsScriptsBeforeGuestStandby Boolean
    Enable the run of scripts before guest operating system standby when VMware Tools is installed.
    sataControllerCount Number
    The number of SATA controllers that Terraform manages on this virtual machine. This directly affects the amount of disks you can add to the virtual machine and the maximum disk unit number. Note that lowering this value does not remove controllers.
    scsiBusSharing String
    Mode for sharing the SCSI bus. The modes are physicalSharing, virtualSharing, and noSharing.
    scsiControllerCount Number
    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.
    scsiType String
    The type of SCSI bus this virtual machine will have. Can be one of lsilogic, lsilogic-sas or pvscsi.
    shutdownWaitTimeout Number
    The amount of time, in minutes, to wait for shutdown when making necessary updates to the virtual machine.
    storagePolicyId String
    The ID of the storage policy to assign to the virtual machine home directory.
    swapPlacementPolicy String
    The swap file placement policy for this virtual machine. Can be one of inherit, hostLocal, or vmDirectory.
    syncTimeWithHost Boolean
    Enable guest clock synchronization with the host. On vSphere 7.0 U1 and above, with only this setting the clock is synchronized on startup and resume. Requires VMware Tools to be installed.
    syncTimeWithHostPeriodically Boolean
    Enable periodic clock synchronization with the host. Supported only on vSphere 7.0 U1 and above. On prior versions setting sync_time_with_host is enough for periodic synchronization. Requires VMware Tools to be installed.
    tags List<String>
    A list of tag IDs to apply to this object.
    toolsUpgradePolicy String
    Set the upgrade policy for VMware Tools. Can be one of manual or upgradeAtPowerCycle.
    vapp Property Map
    vApp configuration data for this virtual machine. Can be used to provide configuration data for OVF images.
    vbsEnabled Boolean
    Flag to specify if Virtualization-based security is enabled for this virtual machine.
    vtpm Property Map
    A specification for a virtual Trusted Platform Module (TPM) device on the virtual machine.
    vvtdEnabled Boolean
    Flag to specify if I/O MMU virtualization, also called Intel Virtualization Technology for Directed I/O (VT-d) and AMD I/O Virtualization (AMD-Vi or IOMMU), is enabled.
    waitForGuestIpTimeout Number
    The amount of time, in minutes, to wait for an available IP address on this virtual machine. A value less than 1 disables the waiter.
    waitForGuestNetRoutable Boolean
    Controls whether or not the guest network waiter waits for a routable address. When false, the waiter does not wait for a default gateway, nor are IP addresses checked against any discovered default gateways as part of its success criteria.
    waitForGuestNetTimeout Number
    The amount of time, in minutes, to wait for an available IP address on this virtual machine. A value less than 1 disables the waiter.

    Outputs

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

    ChangeVersion string
    A unique identifier for a given version of the last configuration was applied.
    DefaultIpAddress string
    The IP address selected by Terraform 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.
    GuestIpAddresses List<string>
    The current list of IP addresses on this machine, including the value of default_ip_address. If VMware Tools is not running on the virtual machine, or if the virtual 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][docs-about-morefs] of the created virtual machine.
    PowerState string
    A computed value for the current power state of the virtual machine. One of on, off, or suspended.
    RebootRequired bool
    Value internal to Terraform used to determine if a configuration set change requires a reboot. This value is most useful during an update process and gets reset on refresh.
    Uuid string
    The UUID of the virtual machine. Also exposed as the id of the resource.
    VappTransports List<string>
    Computed value which is only valid for cloned virtual machines. A list of vApp transport methods supported by the source virtual machine or template.
    VmwareToolsStatus string
    The state of VMware Tools in the guest. This will determine the proper course of action for some device operations.
    VmxPath string
    The path of the virtual machine configuration file on the datastore in which the virtual machine is placed.
    ChangeVersion string
    A unique identifier for a given version of the last configuration was applied.
    DefaultIpAddress string
    The IP address selected by Terraform 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.
    GuestIpAddresses []string
    The current list of IP addresses on this machine, including the value of default_ip_address. If VMware Tools is not running on the virtual machine, or if the virtual 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][docs-about-morefs] of the created virtual machine.
    PowerState string
    A computed value for the current power state of the virtual machine. One of on, off, or suspended.
    RebootRequired bool
    Value internal to Terraform used to determine if a configuration set change requires a reboot. This value is most useful during an update process and gets reset on refresh.
    Uuid string
    The UUID of the virtual machine. Also exposed as the id of the resource.
    VappTransports []string
    Computed value which is only valid for cloned virtual machines. A list of vApp transport methods supported by the source virtual machine or template.
    VmwareToolsStatus string
    The state of VMware Tools in the guest. This will determine the proper course of action for some device operations.
    VmxPath string
    The path of the virtual machine configuration file on the datastore in which the virtual machine is placed.
    changeVersion String
    A unique identifier for a given version of the last configuration was applied.
    defaultIpAddress String
    The IP address selected by Terraform 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.
    guestIpAddresses List<String>
    The current list of IP addresses on this machine, including the value of default_ip_address. If VMware Tools is not running on the virtual machine, or if the virtual 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][docs-about-morefs] of the created virtual machine.
    powerState String
    A computed value for the current power state of the virtual machine. One of on, off, or suspended.
    rebootRequired Boolean
    Value internal to Terraform used to determine if a configuration set change requires a reboot. This value is most useful during an update process and gets reset on refresh.
    uuid String
    The UUID of the virtual machine. Also exposed as the id of the resource.
    vappTransports List<String>
    Computed value which is only valid for cloned virtual machines. A list of vApp transport methods supported by the source virtual machine or template.
    vmwareToolsStatus String
    The state of VMware Tools in the guest. This will determine the proper course of action for some device operations.
    vmxPath String
    The path of the virtual machine configuration file on the datastore in which the virtual machine is placed.
    changeVersion string
    A unique identifier for a given version of the last configuration was applied.
    defaultIpAddress string
    The IP address selected by Terraform 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.
    guestIpAddresses string[]
    The current list of IP addresses on this machine, including the value of default_ip_address. If VMware Tools is not running on the virtual machine, or if the virtual 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][docs-about-morefs] of the created virtual machine.
    powerState string
    A computed value for the current power state of the virtual machine. One of on, off, or suspended.
    rebootRequired boolean
    Value internal to Terraform used to determine if a configuration set change requires a reboot. This value is most useful during an update process and gets reset on refresh.
    uuid string
    The UUID of the virtual machine. Also exposed as the id of the resource.
    vappTransports string[]
    Computed value which is only valid for cloned virtual machines. A list of vApp transport methods supported by the source virtual machine or template.
    vmwareToolsStatus string
    The state of VMware Tools in the guest. This will determine the proper course of action for some device operations.
    vmxPath string
    The path of the virtual machine 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_address str
    The IP address selected by Terraform 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_addresses Sequence[str]
    The current list of IP addresses on this machine, including the value of default_ip_address. If VMware Tools is not running on the virtual machine, or if the virtual 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][docs-about-morefs] of the created virtual machine.
    power_state str
    A computed value for the current power state of the virtual machine. One of on, off, or suspended.
    reboot_required bool
    Value internal to Terraform used to determine if a configuration set change requires a reboot. This value is most useful during an update process and gets reset on refresh.
    uuid str
    The UUID of the virtual machine. Also exposed as the id of the resource.
    vapp_transports Sequence[str]
    Computed value which is only valid for cloned virtual machines. A list of vApp transport methods supported by the source virtual machine or template.
    vmware_tools_status str
    The state of VMware Tools in the guest. This will determine the proper course of action for some device operations.
    vmx_path str
    The path of the virtual machine configuration file on the datastore in which the virtual machine is placed.
    changeVersion String
    A unique identifier for a given version of the last configuration was applied.
    defaultIpAddress String
    The IP address selected by Terraform 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.
    guestIpAddresses List<String>
    The current list of IP addresses on this machine, including the value of default_ip_address. If VMware Tools is not running on the virtual machine, or if the virtual 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][docs-about-morefs] of the created virtual machine.
    powerState String
    A computed value for the current power state of the virtual machine. One of on, off, or suspended.
    rebootRequired Boolean
    Value internal to Terraform used to determine if a configuration set change requires a reboot. This value is most useful during an update process and gets reset on refresh.
    uuid String
    The UUID of the virtual machine. Also exposed as the id of the resource.
    vappTransports List<String>
    Computed value which is only valid for cloned virtual machines. A list of vApp transport methods supported by the source virtual machine or template.
    vmwareToolsStatus String
    The state of VMware Tools in the guest. This will determine the proper course of action for some device operations.
    vmxPath String
    The path of the virtual machine 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_reservation_locked_to_max: Optional[bool] = 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,
            nvme_controller_count: 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,
            vtpm: Optional[VirtualMachineVtpmArgs] = 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)
    resources:  _:    type: vsphere:VirtualMachine    get:      id: ${id}
    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.
    The following state arguments are supported:
    AlternateGuestName string
    The guest name for the operating system when guest_id is otherGuest or otherGuest64.
    Annotation string
    User-provided description of the virtual machine.
    BootDelay int
    The number of milliseconds to wait before starting the boot sequence.
    BootRetryDelay int
    The number of milliseconds to wait before retrying the boot sequence. This only valid if boot_retry_enabled is true.
    BootRetryEnabled bool
    If set to true, a virtual machine that fails to boot will try again after the delay defined in boot_retry_delay.
    Cdroms List<Pulumi.VSphere.Inputs.VirtualMachineCdrom>
    A specification for a CDROM device on this virtual machine.
    ChangeVersion string
    A unique identifier for a given version of the last configuration was applied.
    Clone Pulumi.VSphere.Inputs.VirtualMachineClone
    A specification for cloning a virtual machine from template.
    CpuHotAddEnabled bool
    Allow CPUs to be added to this virtual machine while it is running.
    CpuHotRemoveEnabled bool
    Allow CPUs to be added to this virtual machine while it is running.
    CpuLimit int
    The maximum amount of memory (in MB) or CPU (in MHz) that this virtual machine can consume, regardless of available resources.
    CpuPerformanceCountersEnabled bool
    Enable CPU performance counters on this virtual machine.
    CpuReservation int
    The amount of memory (in MB) or CPU (in MHz) that this virtual machine is guaranteed.
    CpuShareCount int
    The amount of shares to allocate to cpu for a custom share level.
    CpuShareLevel string
    The allocation level for cpu resources. Can be one of high, low, normal, or custom.
    CustomAttributes Dictionary<string, string>
    A list of custom attributes to set on this resource.
    DatacenterId string
    The ID of the datacenter where the VM is to be created.
    DatastoreClusterId string
    The ID of a datastore cluster to put the virtual machine in.
    DatastoreId string
    The ID of the virtual machine's datastore. The virtual machine configuration is placed here, along with any virtual disks that are created without datastores.
    DefaultIpAddress string
    The IP address selected by Terraform 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.VirtualMachineDisk>
    A specification for a virtual disk device on this virtual machine.
    EfiSecureBootEnabled bool
    When the boot type set in firmware is efi, this enables EFI secure boot.
    EnableDiskUuid bool
    Expose the UUIDs of attached virtual disks to the virtual machine, allowing access to them in the guest.
    EnableLogging bool
    Enable logging on this virtual machine.
    EptRviMode string
    The EPT/RVI (hardware memory virtualization) setting for this virtual machine. Can be one of automatic, on, or off.
    ExtraConfig Dictionary<string, string>
    Extra configuration data for this virtual machine. Can be used to supply advanced parameters not normally in configuration, such as instance metadata, or configuration data for OVF images.
    ExtraConfigRebootRequired bool
    Allow the virtual machine to be rebooted when a change to extra_config occurs.
    Firmware string
    The firmware interface to use on the virtual machine. Can be one of bios or efi.
    Folder string
    The name of the folder to locate the virtual machine in.
    ForcePowerOff bool
    Set to true to force power-off a virtual machine if a graceful guest shutdown failed for a necessary operation.
    GuestId string
    The guest ID for the operating system.
    GuestIpAddresses List<string>
    The current list of IP addresses on this machine, including the value of default_ip_address. If VMware Tools is not running on the virtual machine, or if the virtual machine is powered off, this list will be empty.
    HardwareVersion int
    The hardware version for the virtual machine. Allows versions within ranges: 4, 7-11, 13-15, 17-22.
    HostSystemId string
    The ID of an optional host system to pin the virtual machine to.
    HvMode string
    The (non-nested) hardware virtualization setting for this virtual machine. Can be one of hvAuto, hvOn, or hvOff.
    IdeControllerCount int
    The number of IDE controllers that Terraform manages on this virtual machine. This directly affects the amount of disks you can add to the virtual machine and the maximum disk unit number. Note that lowering this value does not remove controllers.
    IgnoredGuestIps List<string>
    List of IP addresses and CIDR networks to ignore while waiting for an IP
    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.
    LatencySensitivity string
    Controls the scheduling delay of the virtual machine. Use a higher sensitivity for applications that require lower latency, such as VOIP, media player applications, or applications that require frequent access to mouse or keyboard devices. Can be one of low, normal, medium, or high.
    Memory int
    The size of the virtual machine's memory, in MB.
    MemoryHotAddEnabled bool
    Allow memory to be added to this virtual machine while it is running.
    MemoryLimit int
    The maximum amount of memory (in MB) or CPU (in MHz) that this virtual machine can consume, regardless of available resources.
    MemoryReservation int
    The amount of memory (in MB) or CPU (in MHz) that this virtual machine is guaranteed.
    MemoryReservationLockedToMax bool
    If set true, memory resource reservation for this virtual machine will always be equal to the virtual machine's memory size;increases in memory size will be rejected when a corresponding reservation increase is not possible. This feature may only be enabled if it is currently possible to reserve all of the virtual machine's memory.
    MemoryShareCount int
    The amount of shares to allocate to memory for a custom share level.
    MemoryShareLevel string
    The allocation level for memory resources. Can be one of high, low, normal, or custom.
    MigrateWaitTimeout int
    The amount of time, in minutes, to wait for a vMotion operation to complete before failing.
    Moid string
    The [managed object reference ID][docs-about-morefs] of the created virtual machine.
    Name string
    The name of this virtual machine.
    NestedHvEnabled bool
    Enable nested hardware virtualization on this virtual machine, facilitating nested virtualization in the guest.
    NetworkInterfaces List<Pulumi.VSphere.Inputs.VirtualMachineNetworkInterface>
    A specification for a virtual NIC on this virtual machine.
    NumCoresPerSocket int
    The number of cores to distribute amongst the CPUs in this virtual machine. If specified, the value supplied to num_cpus must be evenly divisible by this value.
    NumCpus int
    The number of virtual processors to assign to this virtual machine.
    NvmeControllerCount int
    The number of NVMe 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.
    OvfDeploy Pulumi.VSphere.Inputs.VirtualMachineOvfDeploy
    A specification for deploying a virtual machine from ovf/ova template.
    PciDeviceIds List<string>
    A list of PCI passthrough devices
    PowerState string
    A computed value for the current power state of the virtual machine. One of on, off, or suspended.
    PoweronTimeout int
    The amount of time, in seconds, that we will be trying to power on a VM
    RebootRequired bool
    Value internal to Terraform used to determine if a configuration set change requires a reboot. This value is most useful during an update process and gets reset on refresh.
    ReplaceTrigger string
    Triggers replacement of resource whenever it changes.
    ResourcePoolId string
    The ID of a resource pool to put the virtual machine in.
    RunToolsScriptsAfterPowerOn bool
    Enable the run of scripts after virtual machine power-on when VMware Tools is installed.
    RunToolsScriptsAfterResume bool
    Enable the run of scripts after virtual machine resume when when VMware Tools is installed.
    RunToolsScriptsBeforeGuestReboot bool
    Enable the run of scripts before guest operating system reboot when VMware Tools is installed.
    RunToolsScriptsBeforeGuestShutdown bool
    Enable the run of scripts before guest operating system shutdown when VMware Tools is installed.
    RunToolsScriptsBeforeGuestStandby bool
    Enable the run of scripts before guest operating system standby when VMware Tools is installed.
    SataControllerCount int
    The number of SATA controllers that Terraform manages on this virtual machine. This directly affects the amount of disks you can add to the virtual machine and the maximum disk unit number. Note that lowering this value does not remove controllers.
    ScsiBusSharing string
    Mode for sharing the SCSI bus. The modes are physicalSharing, virtualSharing, and noSharing.
    ScsiControllerCount int
    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.
    ScsiType string
    The type of SCSI bus this virtual machine will have. Can be one of lsilogic, lsilogic-sas or pvscsi.
    ShutdownWaitTimeout int
    The amount of time, in minutes, to wait for shutdown when making necessary updates to the virtual machine.
    StoragePolicyId string
    The ID of the storage policy to assign to the virtual machine home directory.
    SwapPlacementPolicy string
    The swap file placement policy for this virtual machine. Can be one of inherit, hostLocal, or vmDirectory.
    SyncTimeWithHost bool
    Enable guest clock synchronization with the host. On vSphere 7.0 U1 and above, with only this setting the clock is synchronized on startup and resume. Requires VMware Tools to be installed.
    SyncTimeWithHostPeriodically bool
    Enable periodic clock synchronization with the host. Supported only on vSphere 7.0 U1 and above. On prior versions setting sync_time_with_host is enough for periodic synchronization. Requires VMware Tools to be installed.
    Tags List<string>
    A list of tag IDs to apply to this object.
    ToolsUpgradePolicy string
    Set the upgrade policy for VMware Tools. Can be one of manual or upgradeAtPowerCycle.
    Uuid string
    The UUID of the virtual machine. Also exposed as the id of the resource.
    Vapp Pulumi.VSphere.Inputs.VirtualMachineVapp
    vApp configuration data for this virtual machine. Can be used to provide configuration data for OVF images.
    VappTransports List<string>
    Computed value which is only valid for cloned virtual machines. A list of vApp transport methods supported by the source virtual machine or template.
    VbsEnabled bool
    Flag to specify if Virtualization-based security is enabled for this virtual machine.
    VmwareToolsStatus string
    The state of VMware Tools in the guest. This will determine the proper course of action for some device operations.
    VmxPath string
    The path of the virtual machine configuration file on the datastore in which the virtual machine is placed.
    Vtpm Pulumi.VSphere.Inputs.VirtualMachineVtpm
    A specification for a virtual Trusted Platform Module (TPM) device on the virtual machine.
    VvtdEnabled bool
    Flag to specify if I/O MMU virtualization, also called Intel Virtualization Technology for Directed I/O (VT-d) and AMD I/O Virtualization (AMD-Vi or IOMMU), is enabled.
    WaitForGuestIpTimeout int
    The amount of time, in minutes, to wait for an available IP address on this virtual machine. A value less than 1 disables the waiter.
    WaitForGuestNetRoutable bool
    Controls whether or not the guest network waiter waits for a routable address. When false, the waiter does not wait for a default gateway, nor are IP addresses checked against any discovered default gateways as part of its success criteria.
    WaitForGuestNetTimeout int
    The amount of time, in minutes, to wait for an available IP address on this virtual machine. A value less than 1 disables the waiter.
    AlternateGuestName string
    The guest name for the operating system when guest_id is otherGuest or otherGuest64.
    Annotation string
    User-provided description of the virtual machine.
    BootDelay int
    The number of milliseconds to wait before starting the boot sequence.
    BootRetryDelay int
    The number of milliseconds to wait before retrying the boot sequence. This only valid if boot_retry_enabled is true.
    BootRetryEnabled bool
    If set to true, a virtual machine that fails to boot will try again after the delay defined in boot_retry_delay.
    Cdroms []VirtualMachineCdromArgs
    A specification for a CDROM device on this virtual machine.
    ChangeVersion string
    A unique identifier for a given version of the last configuration was applied.
    Clone VirtualMachineCloneArgs
    A specification for cloning a virtual machine from template.
    CpuHotAddEnabled bool
    Allow CPUs to be added to this virtual machine while it is running.
    CpuHotRemoveEnabled bool
    Allow CPUs to be added to this virtual machine while it is running.
    CpuLimit int
    The maximum amount of memory (in MB) or CPU (in MHz) that this virtual machine can consume, regardless of available resources.
    CpuPerformanceCountersEnabled bool
    Enable CPU performance counters on this virtual machine.
    CpuReservation int
    The amount of memory (in MB) or CPU (in MHz) that this virtual machine is guaranteed.
    CpuShareCount int
    The amount of shares to allocate to cpu for a custom share level.
    CpuShareLevel string
    The allocation level for cpu resources. Can be one of high, low, normal, or custom.
    CustomAttributes map[string]string
    A list of custom attributes to set on this resource.
    DatacenterId string
    The ID of the datacenter where the VM is to be created.
    DatastoreClusterId string
    The ID of a datastore cluster to put the virtual machine in.
    DatastoreId string
    The ID of the virtual machine's datastore. The virtual machine configuration is placed here, along with any virtual disks that are created without datastores.
    DefaultIpAddress string
    The IP address selected by Terraform 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 []VirtualMachineDiskArgs
    A specification for a virtual disk device on this virtual machine.
    EfiSecureBootEnabled bool
    When the boot type set in firmware is efi, this enables EFI secure boot.
    EnableDiskUuid bool
    Expose the UUIDs of attached virtual disks to the virtual machine, allowing access to them in the guest.
    EnableLogging bool
    Enable logging on this virtual machine.
    EptRviMode string
    The EPT/RVI (hardware memory virtualization) setting for this virtual machine. Can be one of automatic, on, or off.
    ExtraConfig map[string]string
    Extra configuration data for this virtual machine. Can be used to supply advanced parameters not normally in configuration, such as instance metadata, or configuration data for OVF images.
    ExtraConfigRebootRequired bool
    Allow the virtual machine to be rebooted when a change to extra_config occurs.
    Firmware string
    The firmware interface to use on the virtual machine. Can be one of bios or efi.
    Folder string
    The name of the folder to locate the virtual machine in.
    ForcePowerOff bool
    Set to true to force power-off a virtual machine if a graceful guest shutdown failed for a necessary operation.
    GuestId string
    The guest ID for the operating system.
    GuestIpAddresses []string
    The current list of IP addresses on this machine, including the value of default_ip_address. If VMware Tools is not running on the virtual machine, or if the virtual machine is powered off, this list will be empty.
    HardwareVersion int
    The hardware version for the virtual machine. Allows versions within ranges: 4, 7-11, 13-15, 17-22.
    HostSystemId string
    The ID of an optional host system to pin the virtual machine to.
    HvMode string
    The (non-nested) hardware virtualization setting for this virtual machine. Can be one of hvAuto, hvOn, or hvOff.
    IdeControllerCount int
    The number of IDE controllers that Terraform manages on this virtual machine. This directly affects the amount of disks you can add to the virtual machine and the maximum disk unit number. Note that lowering this value does not remove controllers.
    IgnoredGuestIps []string
    List of IP addresses and CIDR networks to ignore while waiting for an IP
    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.
    LatencySensitivity string
    Controls the scheduling delay of the virtual machine. Use a higher sensitivity for applications that require lower latency, such as VOIP, media player applications, or applications that require frequent access to mouse or keyboard devices. Can be one of low, normal, medium, or high.
    Memory int
    The size of the virtual machine's memory, in MB.
    MemoryHotAddEnabled bool
    Allow memory to be added to this virtual machine while it is running.
    MemoryLimit int
    The maximum amount of memory (in MB) or CPU (in MHz) that this virtual machine can consume, regardless of available resources.
    MemoryReservation int
    The amount of memory (in MB) or CPU (in MHz) that this virtual machine is guaranteed.
    MemoryReservationLockedToMax bool
    If set true, memory resource reservation for this virtual machine will always be equal to the virtual machine's memory size;increases in memory size will be rejected when a corresponding reservation increase is not possible. This feature may only be enabled if it is currently possible to reserve all of the virtual machine's memory.
    MemoryShareCount int
    The amount of shares to allocate to memory for a custom share level.
    MemoryShareLevel string
    The allocation level for memory resources. Can be one of high, low, normal, or custom.
    MigrateWaitTimeout int
    The amount of time, in minutes, to wait for a vMotion operation to complete before failing.
    Moid string
    The [managed object reference ID][docs-about-morefs] of the created virtual machine.
    Name string
    The name of this virtual machine.
    NestedHvEnabled bool
    Enable nested hardware virtualization on this virtual machine, facilitating nested virtualization in the guest.
    NetworkInterfaces []VirtualMachineNetworkInterfaceArgs
    A specification for a virtual NIC on this virtual machine.
    NumCoresPerSocket int
    The number of cores to distribute amongst the CPUs in this virtual machine. If specified, the value supplied to num_cpus must be evenly divisible by this value.
    NumCpus int
    The number of virtual processors to assign to this virtual machine.
    NvmeControllerCount int
    The number of NVMe 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.
    OvfDeploy VirtualMachineOvfDeployArgs
    A specification for deploying a virtual machine from ovf/ova template.
    PciDeviceIds []string
    A list of PCI passthrough devices
    PowerState string
    A computed value for the current power state of the virtual machine. One of on, off, or suspended.
    PoweronTimeout int
    The amount of time, in seconds, that we will be trying to power on a VM
    RebootRequired bool
    Value internal to Terraform used to determine if a configuration set change requires a reboot. This value is most useful during an update process and gets reset on refresh.
    ReplaceTrigger string
    Triggers replacement of resource whenever it changes.
    ResourcePoolId string
    The ID of a resource pool to put the virtual machine in.
    RunToolsScriptsAfterPowerOn bool
    Enable the run of scripts after virtual machine power-on when VMware Tools is installed.
    RunToolsScriptsAfterResume bool
    Enable the run of scripts after virtual machine resume when when VMware Tools is installed.
    RunToolsScriptsBeforeGuestReboot bool
    Enable the run of scripts before guest operating system reboot when VMware Tools is installed.
    RunToolsScriptsBeforeGuestShutdown bool
    Enable the run of scripts before guest operating system shutdown when VMware Tools is installed.
    RunToolsScriptsBeforeGuestStandby bool
    Enable the run of scripts before guest operating system standby when VMware Tools is installed.
    SataControllerCount int
    The number of SATA controllers that Terraform manages on this virtual machine. This directly affects the amount of disks you can add to the virtual machine and the maximum disk unit number. Note that lowering this value does not remove controllers.
    ScsiBusSharing string
    Mode for sharing the SCSI bus. The modes are physicalSharing, virtualSharing, and noSharing.
    ScsiControllerCount int
    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.
    ScsiType string
    The type of SCSI bus this virtual machine will have. Can be one of lsilogic, lsilogic-sas or pvscsi.
    ShutdownWaitTimeout int
    The amount of time, in minutes, to wait for shutdown when making necessary updates to the virtual machine.
    StoragePolicyId string
    The ID of the storage policy to assign to the virtual machine home directory.
    SwapPlacementPolicy string
    The swap file placement policy for this virtual machine. Can be one of inherit, hostLocal, or vmDirectory.
    SyncTimeWithHost bool
    Enable guest clock synchronization with the host. On vSphere 7.0 U1 and above, with only this setting the clock is synchronized on startup and resume. Requires VMware Tools to be installed.
    SyncTimeWithHostPeriodically bool
    Enable periodic clock synchronization with the host. Supported only on vSphere 7.0 U1 and above. On prior versions setting sync_time_with_host is enough for periodic synchronization. Requires VMware Tools to be installed.
    Tags []string
    A list of tag IDs to apply to this object.
    ToolsUpgradePolicy string
    Set the upgrade policy for VMware Tools. Can be one of manual or upgradeAtPowerCycle.
    Uuid string
    The UUID of the virtual machine. Also exposed as the id of the resource.
    Vapp VirtualMachineVappArgs
    vApp configuration data for this virtual machine. Can be used to provide configuration data for OVF images.
    VappTransports []string
    Computed value which is only valid for cloned virtual machines. A list of vApp transport methods supported by the source virtual machine or template.
    VbsEnabled bool
    Flag to specify if Virtualization-based security is enabled for this virtual machine.
    VmwareToolsStatus string
    The state of VMware Tools in the guest. This will determine the proper course of action for some device operations.
    VmxPath string
    The path of the virtual machine configuration file on the datastore in which the virtual machine is placed.
    Vtpm VirtualMachineVtpmArgs
    A specification for a virtual Trusted Platform Module (TPM) device on the virtual machine.
    VvtdEnabled bool
    Flag to specify if I/O MMU virtualization, also called Intel Virtualization Technology for Directed I/O (VT-d) and AMD I/O Virtualization (AMD-Vi or IOMMU), is enabled.
    WaitForGuestIpTimeout int
    The amount of time, in minutes, to wait for an available IP address on this virtual machine. A value less than 1 disables the waiter.
    WaitForGuestNetRoutable bool
    Controls whether or not the guest network waiter waits for a routable address. When false, the waiter does not wait for a default gateway, nor are IP addresses checked against any discovered default gateways as part of its success criteria.
    WaitForGuestNetTimeout int
    The amount of time, in minutes, to wait for an available IP address on this virtual machine. A value less than 1 disables the waiter.
    alternateGuestName String
    The guest name for the operating system when guest_id is otherGuest or otherGuest64.
    annotation String
    User-provided description of the virtual machine.
    bootDelay Integer
    The number of milliseconds to wait before starting the boot sequence.
    bootRetryDelay Integer
    The number of milliseconds to wait before retrying the boot sequence. This only valid if boot_retry_enabled is true.
    bootRetryEnabled Boolean
    If set to true, a virtual machine that fails to boot will try again after the delay defined in boot_retry_delay.
    cdroms List<VirtualMachineCdrom>
    A specification for a CDROM device on this virtual machine.
    changeVersion String
    A unique identifier for a given version of the last configuration was applied.
    clone_ VirtualMachineClone
    A specification for cloning a virtual machine from template.
    cpuHotAddEnabled Boolean
    Allow CPUs to be added to this virtual machine while it is running.
    cpuHotRemoveEnabled Boolean
    Allow CPUs to be added to this virtual machine while it is running.
    cpuLimit Integer
    The maximum amount of memory (in MB) or CPU (in MHz) that this virtual machine can consume, regardless of available resources.
    cpuPerformanceCountersEnabled Boolean
    Enable CPU performance counters on this virtual machine.
    cpuReservation Integer
    The amount of memory (in MB) or CPU (in MHz) that this virtual machine is guaranteed.
    cpuShareCount Integer
    The amount of shares to allocate to cpu for a custom share level.
    cpuShareLevel String
    The allocation level for cpu resources. Can be one of high, low, normal, or custom.
    customAttributes Map<String,String>
    A list of custom attributes to set on this resource.
    datacenterId String
    The ID of the datacenter where the VM is to be created.
    datastoreClusterId String
    The ID of a datastore cluster to put the virtual machine in.
    datastoreId String
    The ID of the virtual machine's datastore. The virtual machine configuration is placed here, along with any virtual disks that are created without datastores.
    defaultIpAddress String
    The IP address selected by Terraform 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<VirtualMachineDisk>
    A specification for a virtual disk device on this virtual machine.
    efiSecureBootEnabled Boolean
    When the boot type set in firmware is efi, this enables EFI secure boot.
    enableDiskUuid Boolean
    Expose the UUIDs of attached virtual disks to the virtual machine, allowing access to them in the guest.
    enableLogging Boolean
    Enable logging on this virtual machine.
    eptRviMode String
    The EPT/RVI (hardware memory virtualization) setting for this virtual machine. Can be one of automatic, on, or off.
    extraConfig Map<String,String>
    Extra configuration data for this virtual machine. Can be used to supply advanced parameters not normally in configuration, such as instance metadata, or configuration data for OVF images.
    extraConfigRebootRequired Boolean
    Allow the virtual machine to be rebooted when a change to extra_config occurs.
    firmware String
    The firmware interface to use on the virtual machine. Can be one of bios or efi.
    folder String
    The name of the folder to locate the virtual machine in.
    forcePowerOff Boolean
    Set to true to force power-off a virtual machine if a graceful guest shutdown failed for a necessary operation.
    guestId String
    The guest ID for the operating system.
    guestIpAddresses List<String>
    The current list of IP addresses on this machine, including the value of default_ip_address. If VMware Tools is not running on the virtual machine, or if the virtual machine is powered off, this list will be empty.
    hardwareVersion Integer
    The hardware version for the virtual machine. Allows versions within ranges: 4, 7-11, 13-15, 17-22.
    hostSystemId String
    The ID of an optional host system to pin the virtual machine to.
    hvMode String
    The (non-nested) hardware virtualization setting for this virtual machine. Can be one of hvAuto, hvOn, or hvOff.
    ideControllerCount Integer
    The number of IDE controllers that Terraform manages on this virtual machine. This directly affects the amount of disks you can add to the virtual machine and the maximum disk unit number. Note that lowering this value does not remove controllers.
    ignoredGuestIps List<String>
    List of IP addresses and CIDR networks to ignore while waiting for an IP
    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.
    latencySensitivity String
    Controls the scheduling delay of the virtual machine. Use a higher sensitivity for applications that require lower latency, such as VOIP, media player applications, or applications that require frequent access to mouse or keyboard devices. Can be one of low, normal, medium, or high.
    memory Integer
    The size of the virtual machine's memory, in MB.
    memoryHotAddEnabled Boolean
    Allow memory to be added to this virtual machine while it is running.
    memoryLimit Integer
    The maximum amount of memory (in MB) or CPU (in MHz) that this virtual machine can consume, regardless of available resources.
    memoryReservation Integer
    The amount of memory (in MB) or CPU (in MHz) that this virtual machine is guaranteed.
    memoryReservationLockedToMax Boolean
    If set true, memory resource reservation for this virtual machine will always be equal to the virtual machine's memory size;increases in memory size will be rejected when a corresponding reservation increase is not possible. This feature may only be enabled if it is currently possible to reserve all of the virtual machine's memory.
    memoryShareCount Integer
    The amount of shares to allocate to memory for a custom share level.
    memoryShareLevel String
    The allocation level for memory resources. Can be one of high, low, normal, or custom.
    migrateWaitTimeout Integer
    The amount of time, in minutes, to wait for a vMotion operation to complete before failing.
    moid String
    The [managed object reference ID][docs-about-morefs] of the created virtual machine.
    name String
    The name of this virtual machine.
    nestedHvEnabled Boolean
    Enable nested hardware virtualization on this virtual machine, facilitating nested virtualization in the guest.
    networkInterfaces List<VirtualMachineNetworkInterface>
    A specification for a virtual NIC on this virtual machine.
    numCoresPerSocket Integer
    The number of cores to distribute amongst the CPUs in this virtual machine. If specified, the value supplied to num_cpus must be evenly divisible by this value.
    numCpus Integer
    The number of virtual processors to assign to this virtual machine.
    nvmeControllerCount Integer
    The number of NVMe 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.
    ovfDeploy VirtualMachineOvfDeploy
    A specification for deploying a virtual machine from ovf/ova template.
    pciDeviceIds List<String>
    A list of PCI passthrough devices
    powerState String
    A computed value for the current power state of the virtual machine. One of on, off, or suspended.
    poweronTimeout Integer
    The amount of time, in seconds, that we will be trying to power on a VM
    rebootRequired Boolean
    Value internal to Terraform used to determine if a configuration set change requires a reboot. This value is most useful during an update process and gets reset on refresh.
    replaceTrigger String
    Triggers replacement of resource whenever it changes.
    resourcePoolId String
    The ID of a resource pool to put the virtual machine in.
    runToolsScriptsAfterPowerOn Boolean
    Enable the run of scripts after virtual machine power-on when VMware Tools is installed.
    runToolsScriptsAfterResume Boolean
    Enable the run of scripts after virtual machine resume when when VMware Tools is installed.
    runToolsScriptsBeforeGuestReboot Boolean
    Enable the run of scripts before guest operating system reboot when VMware Tools is installed.
    runToolsScriptsBeforeGuestShutdown Boolean
    Enable the run of scripts before guest operating system shutdown when VMware Tools is installed.
    runToolsScriptsBeforeGuestStandby Boolean
    Enable the run of scripts before guest operating system standby when VMware Tools is installed.
    sataControllerCount Integer
    The number of SATA controllers that Terraform manages on this virtual machine. This directly affects the amount of disks you can add to the virtual machine and the maximum disk unit number. Note that lowering this value does not remove controllers.
    scsiBusSharing String
    Mode for sharing the SCSI bus. The modes are physicalSharing, virtualSharing, and noSharing.
    scsiControllerCount Integer
    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.
    scsiType String
    The type of SCSI bus this virtual machine will have. Can be one of lsilogic, lsilogic-sas or pvscsi.
    shutdownWaitTimeout Integer
    The amount of time, in minutes, to wait for shutdown when making necessary updates to the virtual machine.
    storagePolicyId String
    The ID of the storage policy to assign to the virtual machine home directory.
    swapPlacementPolicy String
    The swap file placement policy for this virtual machine. Can be one of inherit, hostLocal, or vmDirectory.
    syncTimeWithHost Boolean
    Enable guest clock synchronization with the host. On vSphere 7.0 U1 and above, with only this setting the clock is synchronized on startup and resume. Requires VMware Tools to be installed.
    syncTimeWithHostPeriodically Boolean
    Enable periodic clock synchronization with the host. Supported only on vSphere 7.0 U1 and above. On prior versions setting sync_time_with_host is enough for periodic synchronization. Requires VMware Tools to be installed.
    tags List<String>
    A list of tag IDs to apply to this object.
    toolsUpgradePolicy String
    Set the upgrade policy for VMware Tools. Can be one of manual or upgradeAtPowerCycle.
    uuid String
    The UUID of the virtual machine. Also exposed as the id of the resource.
    vapp VirtualMachineVapp
    vApp configuration data for this virtual machine. Can be used to provide configuration data for OVF images.
    vappTransports List<String>
    Computed value which is only valid for cloned virtual machines. A list of vApp transport methods supported by the source virtual machine or template.
    vbsEnabled Boolean
    Flag to specify if Virtualization-based security is enabled for this virtual machine.
    vmwareToolsStatus String
    The state of VMware Tools in the guest. This will determine the proper course of action for some device operations.
    vmxPath String
    The path of the virtual machine configuration file on the datastore in which the virtual machine is placed.
    vtpm VirtualMachineVtpm
    A specification for a virtual Trusted Platform Module (TPM) device on the virtual machine.
    vvtdEnabled Boolean
    Flag to specify if I/O MMU virtualization, also called Intel Virtualization Technology for Directed I/O (VT-d) and AMD I/O Virtualization (AMD-Vi or IOMMU), is enabled.
    waitForGuestIpTimeout Integer
    The amount of time, in minutes, to wait for an available IP address on this virtual machine. A value less than 1 disables the waiter.
    waitForGuestNetRoutable Boolean
    Controls whether or not the guest network waiter waits for a routable address. When false, the waiter does not wait for a default gateway, nor are IP addresses checked against any discovered default gateways as part of its success criteria.
    waitForGuestNetTimeout Integer
    The amount of time, in minutes, to wait for an available IP address on this virtual machine. A value less than 1 disables the waiter.
    alternateGuestName string
    The guest name for the operating system when guest_id is otherGuest or otherGuest64.
    annotation string
    User-provided description of the virtual machine.
    bootDelay number
    The number of milliseconds to wait before starting the boot sequence.
    bootRetryDelay number
    The number of milliseconds to wait before retrying the boot sequence. This only valid if boot_retry_enabled is true.
    bootRetryEnabled boolean
    If set to true, a virtual machine that fails to boot will try again after the delay defined in boot_retry_delay.
    cdroms VirtualMachineCdrom[]
    A specification for a CDROM device on this virtual machine.
    changeVersion string
    A unique identifier for a given version of the last configuration was applied.
    clone VirtualMachineClone
    A specification for cloning a virtual machine from template.
    cpuHotAddEnabled boolean
    Allow CPUs to be added to this virtual machine while it is running.
    cpuHotRemoveEnabled boolean
    Allow CPUs to be added to this virtual machine while it is running.
    cpuLimit number
    The maximum amount of memory (in MB) or CPU (in MHz) that this virtual machine can consume, regardless of available resources.
    cpuPerformanceCountersEnabled boolean
    Enable CPU performance counters on this virtual machine.
    cpuReservation number
    The amount of memory (in MB) or CPU (in MHz) that this virtual machine is guaranteed.
    cpuShareCount number
    The amount of shares to allocate to cpu for a custom share level.
    cpuShareLevel string
    The allocation level for cpu resources. Can be one of high, low, normal, or custom.
    customAttributes {[key: string]: string}
    A list of custom attributes to set on this resource.
    datacenterId string
    The ID of the datacenter where the VM is to be created.
    datastoreClusterId string
    The ID of a datastore cluster to put the virtual machine in.
    datastoreId string
    The ID of the virtual machine's datastore. The virtual machine configuration is placed here, along with any virtual disks that are created without datastores.
    defaultIpAddress string
    The IP address selected by Terraform 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 VirtualMachineDisk[]
    A specification for a virtual disk device on this virtual machine.
    efiSecureBootEnabled boolean
    When the boot type set in firmware is efi, this enables EFI secure boot.
    enableDiskUuid boolean
    Expose the UUIDs of attached virtual disks to the virtual machine, allowing access to them in the guest.
    enableLogging boolean
    Enable logging on this virtual machine.
    eptRviMode string
    The EPT/RVI (hardware memory virtualization) setting for this virtual machine. Can be one of automatic, on, or off.
    extraConfig {[key: string]: string}
    Extra configuration data for this virtual machine. Can be used to supply advanced parameters not normally in configuration, such as instance metadata, or configuration data for OVF images.
    extraConfigRebootRequired boolean
    Allow the virtual machine to be rebooted when a change to extra_config occurs.
    firmware string
    The firmware interface to use on the virtual machine. Can be one of bios or efi.
    folder string
    The name of the folder to locate the virtual machine in.
    forcePowerOff boolean
    Set to true to force power-off a virtual machine if a graceful guest shutdown failed for a necessary operation.
    guestId string
    The guest ID for the operating system.
    guestIpAddresses string[]
    The current list of IP addresses on this machine, including the value of default_ip_address. If VMware Tools is not running on the virtual machine, or if the virtual machine is powered off, this list will be empty.
    hardwareVersion number
    The hardware version for the virtual machine. Allows versions within ranges: 4, 7-11, 13-15, 17-22.
    hostSystemId string
    The ID of an optional host system to pin the virtual machine to.
    hvMode string
    The (non-nested) hardware virtualization setting for this virtual machine. Can be one of hvAuto, hvOn, or hvOff.
    ideControllerCount number
    The number of IDE controllers that Terraform manages on this virtual machine. This directly affects the amount of disks you can add to the virtual machine and the maximum disk unit number. Note that lowering this value does not remove controllers.
    ignoredGuestIps string[]
    List of IP addresses and CIDR networks to ignore while waiting for an IP
    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.
    latencySensitivity string
    Controls the scheduling delay of the virtual machine. Use a higher sensitivity for applications that require lower latency, such as VOIP, media player applications, or applications that require frequent access to mouse or keyboard devices. Can be one of low, normal, medium, or high.
    memory number
    The size of the virtual machine's memory, in MB.
    memoryHotAddEnabled boolean
    Allow memory to be added to this virtual machine while it is running.
    memoryLimit number
    The maximum amount of memory (in MB) or CPU (in MHz) that this virtual machine can consume, regardless of available resources.
    memoryReservation number
    The amount of memory (in MB) or CPU (in MHz) that this virtual machine is guaranteed.
    memoryReservationLockedToMax boolean
    If set true, memory resource reservation for this virtual machine will always be equal to the virtual machine's memory size;increases in memory size will be rejected when a corresponding reservation increase is not possible. This feature may only be enabled if it is currently possible to reserve all of the virtual machine's memory.
    memoryShareCount number
    The amount of shares to allocate to memory for a custom share level.
    memoryShareLevel string
    The allocation level for memory resources. Can be one of high, low, normal, or custom.
    migrateWaitTimeout number
    The amount of time, in minutes, to wait for a vMotion operation to complete before failing.
    moid string
    The [managed object reference ID][docs-about-morefs] of the created virtual machine.
    name string
    The name of this virtual machine.
    nestedHvEnabled boolean
    Enable nested hardware virtualization on this virtual machine, facilitating nested virtualization in the guest.
    networkInterfaces VirtualMachineNetworkInterface[]
    A specification for a virtual NIC on this virtual machine.
    numCoresPerSocket number
    The number of cores to distribute amongst the CPUs in this virtual machine. If specified, the value supplied to num_cpus must be evenly divisible by this value.
    numCpus number
    The number of virtual processors to assign to this virtual machine.
    nvmeControllerCount number
    The number of NVMe 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.
    ovfDeploy VirtualMachineOvfDeploy
    A specification for deploying a virtual machine from ovf/ova template.
    pciDeviceIds string[]
    A list of PCI passthrough devices
    powerState string
    A computed value for the current power state of the virtual machine. One of on, off, or suspended.
    poweronTimeout number
    The amount of time, in seconds, that we will be trying to power on a VM
    rebootRequired boolean
    Value internal to Terraform used to determine if a configuration set change requires a reboot. This value is most useful during an update process and gets reset on refresh.
    replaceTrigger string
    Triggers replacement of resource whenever it changes.
    resourcePoolId string
    The ID of a resource pool to put the virtual machine in.
    runToolsScriptsAfterPowerOn boolean
    Enable the run of scripts after virtual machine power-on when VMware Tools is installed.
    runToolsScriptsAfterResume boolean
    Enable the run of scripts after virtual machine resume when when VMware Tools is installed.
    runToolsScriptsBeforeGuestReboot boolean
    Enable the run of scripts before guest operating system reboot when VMware Tools is installed.
    runToolsScriptsBeforeGuestShutdown boolean
    Enable the run of scripts before guest operating system shutdown when VMware Tools is installed.
    runToolsScriptsBeforeGuestStandby boolean
    Enable the run of scripts before guest operating system standby when VMware Tools is installed.
    sataControllerCount number
    The number of SATA controllers that Terraform manages on this virtual machine. This directly affects the amount of disks you can add to the virtual machine and the maximum disk unit number. Note that lowering this value does not remove controllers.
    scsiBusSharing string
    Mode for sharing the SCSI bus. The modes are physicalSharing, virtualSharing, and noSharing.
    scsiControllerCount number
    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.
    scsiType string
    The type of SCSI bus this virtual machine will have. Can be one of lsilogic, lsilogic-sas or pvscsi.
    shutdownWaitTimeout number
    The amount of time, in minutes, to wait for shutdown when making necessary updates to the virtual machine.
    storagePolicyId string
    The ID of the storage policy to assign to the virtual machine home directory.
    swapPlacementPolicy string
    The swap file placement policy for this virtual machine. Can be one of inherit, hostLocal, or vmDirectory.
    syncTimeWithHost boolean
    Enable guest clock synchronization with the host. On vSphere 7.0 U1 and above, with only this setting the clock is synchronized on startup and resume. Requires VMware Tools to be installed.
    syncTimeWithHostPeriodically boolean
    Enable periodic clock synchronization with the host. Supported only on vSphere 7.0 U1 and above. On prior versions setting sync_time_with_host is enough for periodic synchronization. Requires VMware Tools to be installed.
    tags string[]
    A list of tag IDs to apply to this object.
    toolsUpgradePolicy string
    Set the upgrade policy for VMware Tools. Can be one of manual or upgradeAtPowerCycle.
    uuid string
    The UUID of the virtual machine. Also exposed as the id of the resource.
    vapp VirtualMachineVapp
    vApp configuration data for this virtual machine. Can be used to provide configuration data for OVF images.
    vappTransports string[]
    Computed value which is only valid for cloned virtual machines. A list of vApp transport methods supported by the source virtual machine or template.
    vbsEnabled boolean
    Flag to specify if Virtualization-based security is enabled for this virtual machine.
    vmwareToolsStatus string
    The state of VMware Tools in the guest. This will determine the proper course of action for some device operations.
    vmxPath string
    The path of the virtual machine configuration file on the datastore in which the virtual machine is placed.
    vtpm VirtualMachineVtpm
    A specification for a virtual Trusted Platform Module (TPM) device on the virtual machine.
    vvtdEnabled boolean
    Flag to specify if I/O MMU virtualization, also called Intel Virtualization Technology for Directed I/O (VT-d) and AMD I/O Virtualization (AMD-Vi or IOMMU), is enabled.
    waitForGuestIpTimeout number
    The amount of time, in minutes, to wait for an available IP address on this virtual machine. A value less than 1 disables the waiter.
    waitForGuestNetRoutable boolean
    Controls whether or not the guest network waiter waits for a routable address. When false, the waiter does not wait for a default gateway, nor are IP addresses checked against any discovered default gateways as part of its success criteria.
    waitForGuestNetTimeout number
    The amount of time, in minutes, to wait for an available IP address on this virtual machine. A value less than 1 disables the waiter.
    alternate_guest_name str
    The guest name for the operating system when guest_id is otherGuest or otherGuest64.
    annotation str
    User-provided description of the virtual machine.
    boot_delay int
    The number of milliseconds to wait before starting the boot sequence.
    boot_retry_delay int
    The number of milliseconds to wait before retrying the boot sequence. This only valid if boot_retry_enabled is true.
    boot_retry_enabled bool
    If set to true, a virtual machine that fails to boot will try again after the delay defined in boot_retry_delay.
    cdroms Sequence[VirtualMachineCdromArgs]
    A specification for a CDROM device on this virtual machine.
    change_version str
    A unique identifier for a given version of the last configuration was applied.
    clone VirtualMachineCloneArgs
    A specification for cloning a virtual machine from template.
    cpu_hot_add_enabled bool
    Allow CPUs to be added to this virtual machine while it is running.
    cpu_hot_remove_enabled bool
    Allow CPUs to be added to this virtual machine while it is running.
    cpu_limit int
    The maximum amount of memory (in MB) or CPU (in MHz) that this virtual machine can consume, regardless of available resources.
    cpu_performance_counters_enabled bool
    Enable CPU performance counters on this virtual machine.
    cpu_reservation int
    The amount of memory (in MB) or CPU (in MHz) that this virtual machine is guaranteed.
    cpu_share_count int
    The amount of shares to allocate to cpu for a custom share level.
    cpu_share_level str
    The allocation level for cpu resources. Can be one of high, low, normal, or custom.
    custom_attributes Mapping[str, str]
    A list of custom attributes to set on this resource.
    datacenter_id str
    The ID of the datacenter where the VM is to be created.
    datastore_cluster_id str
    The ID of a datastore cluster to put the virtual machine in.
    datastore_id str
    The ID of the virtual machine's datastore. The virtual machine configuration is placed here, along with any virtual disks that are created without datastores.
    default_ip_address str
    The IP address selected by Terraform 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[VirtualMachineDiskArgs]
    A specification for a virtual disk device on this virtual machine.
    efi_secure_boot_enabled bool
    When the boot type set in firmware is efi, this enables EFI secure boot.
    enable_disk_uuid bool
    Expose the UUIDs of attached virtual disks to the virtual machine, allowing access to them in the guest.
    enable_logging bool
    Enable logging on this virtual machine.
    ept_rvi_mode str
    The EPT/RVI (hardware memory virtualization) setting for this virtual machine. Can be one of automatic, on, or off.
    extra_config Mapping[str, str]
    Extra configuration data for this virtual machine. Can be used to supply advanced parameters not normally in configuration, such as instance metadata, or configuration data for OVF images.
    extra_config_reboot_required bool
    Allow the virtual machine to be rebooted when a change to extra_config occurs.
    firmware str
    The firmware interface to use on the virtual machine. Can be one of bios or efi.
    folder str
    The name of the folder to locate the virtual machine in.
    force_power_off bool
    Set to true to force power-off a virtual machine if a graceful guest shutdown failed for a necessary operation.
    guest_id str
    The guest ID for the operating system.
    guest_ip_addresses Sequence[str]
    The current list of IP addresses on this machine, including the value of default_ip_address. If VMware Tools is not running on the virtual machine, or if the virtual machine is powered off, this list will be empty.
    hardware_version int
    The hardware version for the virtual machine. Allows versions within ranges: 4, 7-11, 13-15, 17-22.
    host_system_id str
    The ID of an optional host system to pin the virtual machine to.
    hv_mode str
    The (non-nested) hardware virtualization setting for this virtual machine. Can be one of hvAuto, hvOn, or hvOff.
    ide_controller_count int
    The number of IDE controllers that Terraform manages on this virtual machine. This directly affects the amount of disks you can add to the virtual machine and the maximum disk unit number. Note that lowering this value does not remove controllers.
    ignored_guest_ips Sequence[str]
    List of IP addresses and CIDR networks to ignore while waiting for an IP
    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. Can be one of low, normal, medium, or high.
    memory int
    The size of the virtual machine's memory, in MB.
    memory_hot_add_enabled bool
    Allow memory to be added to this virtual machine while it is running.
    memory_limit int
    The maximum amount of memory (in MB) or CPU (in MHz) that this virtual machine can consume, regardless of available resources.
    memory_reservation int
    The amount of memory (in MB) or CPU (in MHz) that this virtual machine is guaranteed.
    memory_reservation_locked_to_max bool
    If set true, memory resource reservation for this virtual machine will always be equal to the virtual machine's memory size;increases in memory size will be rejected when a corresponding reservation increase is not possible. This feature may only be enabled if it is currently possible to reserve all of the virtual machine's memory.
    memory_share_count int
    The amount of shares to allocate to memory for a custom share level.
    memory_share_level str
    The allocation level for memory resources. Can be one of high, low, normal, or custom.
    migrate_wait_timeout int
    The amount of time, in minutes, to wait for a vMotion operation to complete before failing.
    moid str
    The [managed object reference ID][docs-about-morefs] of the created virtual machine.
    name str
    The name of this virtual machine.
    nested_hv_enabled bool
    Enable nested hardware virtualization on this virtual machine, facilitating nested virtualization in the guest.
    network_interfaces Sequence[VirtualMachineNetworkInterfaceArgs]
    A specification for a virtual NIC on this virtual machine.
    num_cores_per_socket int
    The number of cores to distribute amongst the CPUs in this virtual machine. If specified, the value supplied to num_cpus must be evenly divisible by this value.
    num_cpus int
    The number of virtual processors to assign to this virtual machine.
    nvme_controller_count int
    The number of NVMe 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.
    ovf_deploy VirtualMachineOvfDeployArgs
    A specification for deploying a virtual machine from ovf/ova template.
    pci_device_ids Sequence[str]
    A list of PCI passthrough devices
    power_state str
    A computed value for the current power state of the virtual machine. One of on, off, or suspended.
    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. This value is most useful during an update process and gets reset on refresh.
    replace_trigger str
    Triggers replacement of resource whenever it changes.
    resource_pool_id str
    The ID of a resource pool to put the virtual machine in.
    run_tools_scripts_after_power_on bool
    Enable the run of scripts after virtual machine power-on when VMware Tools is installed.
    run_tools_scripts_after_resume bool
    Enable the run of scripts after virtual machine resume when when VMware Tools is installed.
    run_tools_scripts_before_guest_reboot bool
    Enable the run of scripts before guest operating system reboot when VMware Tools is installed.
    run_tools_scripts_before_guest_shutdown bool
    Enable the run of scripts before guest operating system shutdown when VMware Tools is installed.
    run_tools_scripts_before_guest_standby bool
    Enable the run of scripts before guest operating system standby when VMware Tools is installed.
    sata_controller_count int
    The number of SATA controllers that Terraform manages on this virtual machine. This directly affects the amount of disks you can add to the virtual machine and the maximum disk unit number. Note that lowering this value does not remove controllers.
    scsi_bus_sharing str
    Mode for sharing the SCSI bus. The modes are physicalSharing, virtualSharing, and noSharing.
    scsi_controller_count int
    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 type of SCSI bus this virtual machine will have. Can be one of lsilogic, lsilogic-sas or pvscsi.
    shutdown_wait_timeout int
    The amount of time, in minutes, to wait for shutdown when making necessary updates to the virtual machine.
    storage_policy_id str
    The ID of the storage policy to assign to the virtual machine home directory.
    swap_placement_policy str
    The swap file placement policy for this virtual machine. Can be one of inherit, hostLocal, or vmDirectory.
    sync_time_with_host bool
    Enable guest clock synchronization with the host. On vSphere 7.0 U1 and above, with only this setting the clock is synchronized on startup and resume. Requires VMware Tools to be installed.
    sync_time_with_host_periodically bool
    Enable periodic clock synchronization with the host. Supported only on vSphere 7.0 U1 and above. On prior versions setting sync_time_with_host is enough for periodic synchronization. Requires VMware Tools to be installed.
    tags Sequence[str]
    A list of tag IDs to apply to this object.
    tools_upgrade_policy str
    Set the upgrade policy for VMware Tools. Can be one of manual or upgradeAtPowerCycle.
    uuid str
    The UUID of the virtual machine. Also exposed as the id of the resource.
    vapp VirtualMachineVappArgs
    vApp configuration data for this virtual machine. Can be used to provide configuration data for OVF images.
    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
    Flag to specify if Virtualization-based security is enabled for this virtual machine.
    vmware_tools_status str
    The state of VMware Tools in the guest. This will determine the proper course of action for some device operations.
    vmx_path str
    The path of the virtual machine configuration file on the datastore in which the virtual machine is placed.
    vtpm VirtualMachineVtpmArgs
    A specification for a virtual Trusted Platform Module (TPM) device on the virtual machine.
    vvtd_enabled bool
    Flag to specify if I/O MMU virtualization, also called Intel Virtualization Technology for Directed I/O (VT-d) and AMD I/O Virtualization (AMD-Vi or IOMMU), is enabled.
    wait_for_guest_ip_timeout int
    The amount of time, in minutes, to wait for an available IP address on this virtual machine. A value less than 1 disables the waiter.
    wait_for_guest_net_routable bool
    Controls whether or not the guest network waiter waits for a routable address. When false, the waiter does not wait for a default gateway, nor are IP addresses checked against any discovered default gateways as part of its success criteria.
    wait_for_guest_net_timeout int
    The amount of time, in minutes, to wait for an available IP address on this virtual machine. A value less than 1 disables the waiter.
    alternateGuestName String
    The guest name for the operating system when guest_id is otherGuest or otherGuest64.
    annotation String
    User-provided description of the virtual machine.
    bootDelay Number
    The number of milliseconds to wait before starting the boot sequence.
    bootRetryDelay Number
    The number of milliseconds to wait before retrying the boot sequence. This only valid if boot_retry_enabled is true.
    bootRetryEnabled Boolean
    If set to true, a virtual machine that fails to boot will try again after the delay defined in boot_retry_delay.
    cdroms List<Property Map>
    A specification for a CDROM device on this virtual machine.
    changeVersion String
    A unique identifier for a given version of the last configuration was applied.
    clone Property Map
    A specification for cloning a virtual machine from template.
    cpuHotAddEnabled Boolean
    Allow CPUs to be added to this virtual machine while it is running.
    cpuHotRemoveEnabled Boolean
    Allow CPUs to be added to this virtual machine while it is running.
    cpuLimit Number
    The maximum amount of memory (in MB) or CPU (in MHz) that this virtual machine can consume, regardless of available resources.
    cpuPerformanceCountersEnabled Boolean
    Enable CPU performance counters on this virtual machine.
    cpuReservation Number
    The amount of memory (in MB) or CPU (in MHz) that this virtual machine is guaranteed.
    cpuShareCount Number
    The amount of shares to allocate to cpu for a custom share level.
    cpuShareLevel String
    The allocation level for cpu resources. Can be one of high, low, normal, or custom.
    customAttributes Map<String>
    A list of custom attributes to set on this resource.
    datacenterId String
    The ID of the datacenter where the VM is to be created.
    datastoreClusterId String
    The ID of a datastore cluster to put the virtual machine in.
    datastoreId String
    The ID of the virtual machine's datastore. The virtual machine configuration is placed here, along with any virtual disks that are created without datastores.
    defaultIpAddress String
    The IP address selected by Terraform 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 this virtual machine.
    efiSecureBootEnabled Boolean
    When the boot type set in firmware is efi, this enables EFI secure boot.
    enableDiskUuid Boolean
    Expose the UUIDs of attached virtual disks to the virtual machine, allowing access to them in the guest.
    enableLogging Boolean
    Enable logging on this virtual machine.
    eptRviMode String
    The EPT/RVI (hardware memory virtualization) setting for this virtual machine. Can be one of automatic, on, or off.
    extraConfig Map<String>
    Extra configuration data for this virtual machine. Can be used to supply advanced parameters not normally in configuration, such as instance metadata, or configuration data for OVF images.
    extraConfigRebootRequired Boolean
    Allow the virtual machine to be rebooted when a change to extra_config occurs.
    firmware String
    The firmware interface to use on the virtual machine. Can be one of bios or efi.
    folder String
    The name of the folder to locate the virtual machine in.
    forcePowerOff Boolean
    Set to true to force power-off a virtual machine if a graceful guest shutdown failed for a necessary operation.
    guestId String
    The guest ID for the operating system.
    guestIpAddresses List<String>
    The current list of IP addresses on this machine, including the value of default_ip_address. If VMware Tools is not running on the virtual machine, or if the virtual machine is powered off, this list will be empty.
    hardwareVersion Number
    The hardware version for the virtual machine. Allows versions within ranges: 4, 7-11, 13-15, 17-22.
    hostSystemId String
    The ID of an optional host system to pin the virtual machine to.
    hvMode String
    The (non-nested) hardware virtualization setting for this virtual machine. Can be one of hvAuto, hvOn, or hvOff.
    ideControllerCount Number
    The number of IDE controllers that Terraform manages on this virtual machine. This directly affects the amount of disks you can add to the virtual machine and the maximum disk unit number. Note that lowering this value does not remove controllers.
    ignoredGuestIps List<String>
    List of IP addresses and CIDR networks to ignore while waiting for an IP
    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.
    latencySensitivity String
    Controls the scheduling delay of the virtual machine. Use a higher sensitivity for applications that require lower latency, such as VOIP, media player applications, or applications that require frequent access to mouse or keyboard devices. Can be one of low, normal, medium, or high.
    memory Number
    The size of the virtual machine's memory, in MB.
    memoryHotAddEnabled Boolean
    Allow memory to be added to this virtual machine while it is running.
    memoryLimit Number
    The maximum amount of memory (in MB) or CPU (in MHz) that this virtual machine can consume, regardless of available resources.
    memoryReservation Number
    The amount of memory (in MB) or CPU (in MHz) that this virtual machine is guaranteed.
    memoryReservationLockedToMax Boolean
    If set true, memory resource reservation for this virtual machine will always be equal to the virtual machine's memory size;increases in memory size will be rejected when a corresponding reservation increase is not possible. This feature may only be enabled if it is currently possible to reserve all of the virtual machine's memory.
    memoryShareCount Number
    The amount of shares to allocate to memory for a custom share level.
    memoryShareLevel String
    The allocation level for memory resources. Can be one of high, low, normal, or custom.
    migrateWaitTimeout Number
    The amount of time, in minutes, to wait for a vMotion operation to complete before failing.
    moid String
    The [managed object reference ID][docs-about-morefs] of the created virtual machine.
    name String
    The name of this virtual machine.
    nestedHvEnabled Boolean
    Enable nested hardware virtualization on this virtual machine, facilitating nested virtualization in the guest.
    networkInterfaces List<Property Map>
    A specification for a virtual NIC on this virtual machine.
    numCoresPerSocket Number
    The number of cores to distribute amongst the CPUs in this virtual machine. If specified, the value supplied to num_cpus must be evenly divisible by this value.
    numCpus Number
    The number of virtual processors to assign to this virtual machine.
    nvmeControllerCount Number
    The number of NVMe 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.
    ovfDeploy Property Map
    A specification for deploying a virtual machine from ovf/ova template.
    pciDeviceIds List<String>
    A list of PCI passthrough devices
    powerState String
    A computed value for the current power state of the virtual machine. One of on, off, or suspended.
    poweronTimeout Number
    The amount of time, in seconds, that we will be trying to power on a VM
    rebootRequired Boolean
    Value internal to Terraform used to determine if a configuration set change requires a reboot. This value is most useful during an update process and gets reset on refresh.
    replaceTrigger String
    Triggers replacement of resource whenever it changes.
    resourcePoolId String
    The ID of a resource pool to put the virtual machine in.
    runToolsScriptsAfterPowerOn Boolean
    Enable the run of scripts after virtual machine power-on when VMware Tools is installed.
    runToolsScriptsAfterResume Boolean
    Enable the run of scripts after virtual machine resume when when VMware Tools is installed.
    runToolsScriptsBeforeGuestReboot Boolean
    Enable the run of scripts before guest operating system reboot when VMware Tools is installed.
    runToolsScriptsBeforeGuestShutdown Boolean
    Enable the run of scripts before guest operating system shutdown when VMware Tools is installed.
    runToolsScriptsBeforeGuestStandby Boolean
    Enable the run of scripts before guest operating system standby when VMware Tools is installed.
    sataControllerCount Number
    The number of SATA controllers that Terraform manages on this virtual machine. This directly affects the amount of disks you can add to the virtual machine and the maximum disk unit number. Note that lowering this value does not remove controllers.
    scsiBusSharing String
    Mode for sharing the SCSI bus. The modes are physicalSharing, virtualSharing, and noSharing.
    scsiControllerCount Number
    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.
    scsiType String
    The type of SCSI bus this virtual machine will have. Can be one of lsilogic, lsilogic-sas or pvscsi.
    shutdownWaitTimeout Number
    The amount of time, in minutes, to wait for shutdown when making necessary updates to the virtual machine.
    storagePolicyId String
    The ID of the storage policy to assign to the virtual machine home directory.
    swapPlacementPolicy String
    The swap file placement policy for this virtual machine. Can be one of inherit, hostLocal, or vmDirectory.
    syncTimeWithHost Boolean
    Enable guest clock synchronization with the host. On vSphere 7.0 U1 and above, with only this setting the clock is synchronized on startup and resume. Requires VMware Tools to be installed.
    syncTimeWithHostPeriodically Boolean
    Enable periodic clock synchronization with the host. Supported only on vSphere 7.0 U1 and above. On prior versions setting sync_time_with_host is enough for periodic synchronization. Requires VMware Tools to be installed.
    tags List<String>
    A list of tag IDs to apply to this object.
    toolsUpgradePolicy String
    Set the upgrade policy for VMware Tools. Can be one of manual or upgradeAtPowerCycle.
    uuid String
    The UUID of the virtual machine. Also exposed as the id of the resource.
    vapp Property Map
    vApp configuration data for this virtual machine. Can be used to provide configuration data for OVF images.
    vappTransports List<String>
    Computed value which is only valid for cloned virtual machines. A list of vApp transport methods supported by the source virtual machine or template.
    vbsEnabled Boolean
    Flag to specify if Virtualization-based security is enabled for this virtual machine.
    vmwareToolsStatus String
    The state of VMware Tools in the guest. This will determine the proper course of action for some device operations.
    vmxPath String
    The path of the virtual machine configuration file on the datastore in which the virtual machine is placed.
    vtpm Property Map
    A specification for a virtual Trusted Platform Module (TPM) device on the virtual machine.
    vvtdEnabled Boolean
    Flag to specify if I/O MMU virtualization, also called Intel Virtualization Technology for Directed I/O (VT-d) and AMD I/O Virtualization (AMD-Vi or IOMMU), is enabled.
    waitForGuestIpTimeout Number
    The amount of time, in minutes, to wait for an available IP address on this virtual machine. A value less than 1 disables the waiter.
    waitForGuestNetRoutable Boolean
    Controls whether or not the guest network waiter waits for a routable address. When false, the waiter does not wait for a default gateway, nor are IP addresses checked against any discovered default gateways as part of its success criteria.
    waitForGuestNetTimeout Number
    The amount of time, in minutes, to wait for an available IP address on this virtual machine. A value less than 1 disables the waiter.

    Supporting Types

    VirtualMachineCdrom, VirtualMachineCdromArgs

    ClientDevice bool
    Indicates whether the device should be mapped to a remote client device
    DatastoreId string
    The datastore ID the ISO is located on.
    DeviceAddress string
    An address internal to Terraform that helps locate the device when key is unavailable. This follows a convention of CONTROLLER_TYPE:BUS_NUMBER:UNIT_NUMBER. Example: scsi:0:1 means device unit 1 on SCSI bus 0.
    Key int
    The ID of the device within the virtual machine.
    Path string
    The path to the ISO file on the datastore.
    ClientDevice bool
    Indicates whether the device should be mapped to a remote client device
    DatastoreId string
    The datastore ID the ISO is located on.
    DeviceAddress string
    An address internal to Terraform that helps locate the device when key is unavailable. This follows a convention of CONTROLLER_TYPE:BUS_NUMBER:UNIT_NUMBER. Example: scsi:0:1 means device unit 1 on SCSI bus 0.
    Key int
    The ID of the device within the virtual machine.
    Path string
    The path to the ISO file on the datastore.
    clientDevice Boolean
    Indicates whether the device should be mapped to a remote client device
    datastoreId String
    The datastore ID the ISO is located on.
    deviceAddress String
    An address internal to Terraform that helps locate the device when key is unavailable. This follows a convention of CONTROLLER_TYPE:BUS_NUMBER:UNIT_NUMBER. Example: scsi:0:1 means device unit 1 on SCSI bus 0.
    key Integer
    The ID of the device within the virtual machine.
    path String
    The path to the ISO file on the datastore.
    clientDevice boolean
    Indicates whether the device should be mapped to a remote client device
    datastoreId string
    The datastore ID the ISO is located on.
    deviceAddress string
    An address internal to Terraform that helps locate the device when key is unavailable. This follows a convention of CONTROLLER_TYPE:BUS_NUMBER:UNIT_NUMBER. Example: scsi:0:1 means device unit 1 on SCSI bus 0.
    key number
    The ID of the device within the virtual machine.
    path string
    The path to the ISO file on the datastore.
    client_device bool
    Indicates whether the device should be mapped to a remote client device
    datastore_id str
    The datastore ID the ISO is located on.
    device_address str
    An address internal to Terraform that helps locate the device when key is unavailable. This follows a convention of CONTROLLER_TYPE:BUS_NUMBER:UNIT_NUMBER. Example: scsi:0:1 means device unit 1 on SCSI bus 0.
    key int
    The ID of the device within the virtual machine.
    path str
    The path to the ISO file on the datastore.
    clientDevice Boolean
    Indicates whether the device should be mapped to a remote client device
    datastoreId String
    The datastore ID the ISO is located on.
    deviceAddress String
    An address internal to Terraform that helps locate the device when key is unavailable. This follows a convention of CONTROLLER_TYPE:BUS_NUMBER:UNIT_NUMBER. Example: scsi:0:1 means device unit 1 on SCSI bus 0.
    key Number
    The ID of the device within the virtual machine.
    path String
    The path to the ISO file on the datastore.

    VirtualMachineClone, VirtualMachineCloneArgs

    TemplateUuid string
    The UUID of the source virtual machine or template.
    CustomizationSpec Pulumi.VSphere.Inputs.VirtualMachineCloneCustomizationSpec
    The customization specification for the virtual machine post-clone.
    Customize Pulumi.VSphere.Inputs.VirtualMachineCloneCustomize
    The customization specification for the virtual machine post-clone.
    LinkedClone bool
    Whether or not to create a linked clone when cloning. When this option is used, the source VM must have a single snapshot associated with it.
    OvfNetworkMap Dictionary<string, string>
    Mapping of ovf networks to the networks to use in vSphere.
    OvfStorageMap Dictionary<string, string>
    Mapping of ovf storage to the datastores to use in vSphere.
    Timeout int
    The timeout, in minutes, to wait for the virtual machine clone to complete.
    TemplateUuid string
    The UUID of the source virtual machine or template.
    CustomizationSpec VirtualMachineCloneCustomizationSpec
    The customization specification for the virtual machine post-clone.
    Customize VirtualMachineCloneCustomize
    The customization specification for the virtual machine post-clone.
    LinkedClone bool
    Whether or not to create a linked clone when cloning. When this option is used, the source VM must have a single snapshot associated with it.
    OvfNetworkMap map[string]string
    Mapping of ovf networks to the networks to use in vSphere.
    OvfStorageMap map[string]string
    Mapping of ovf storage to the datastores to use in vSphere.
    Timeout int
    The timeout, in minutes, to wait for the virtual machine clone to complete.
    templateUuid String
    The UUID of the source virtual machine or template.
    customizationSpec VirtualMachineCloneCustomizationSpec
    The customization specification for the virtual machine post-clone.
    customize VirtualMachineCloneCustomize
    The customization specification for the virtual machine post-clone.
    linkedClone Boolean
    Whether or not to create a linked clone when cloning. When this option is used, the source VM must have a single snapshot associated with it.
    ovfNetworkMap Map<String,String>
    Mapping of ovf networks to the networks to use in vSphere.
    ovfStorageMap Map<String,String>
    Mapping of ovf storage to the datastores to use in vSphere.
    timeout Integer
    The timeout, in minutes, to wait for the virtual machine clone to complete.
    templateUuid string
    The UUID of the source virtual machine or template.
    customizationSpec VirtualMachineCloneCustomizationSpec
    The customization specification for the virtual machine post-clone.
    customize VirtualMachineCloneCustomize
    The customization specification for the virtual machine post-clone.
    linkedClone boolean
    Whether or not to create a linked clone when cloning. When this option is used, the source VM must have a single snapshot associated with it.
    ovfNetworkMap {[key: string]: string}
    Mapping of ovf networks to the networks to use in vSphere.
    ovfStorageMap {[key: string]: string}
    Mapping of ovf storage to the datastores to use in vSphere.
    timeout number
    The timeout, in minutes, to wait for the virtual machine clone to complete.
    template_uuid str
    The UUID of the source virtual machine or template.
    customization_spec VirtualMachineCloneCustomizationSpec
    The customization specification for the virtual machine post-clone.
    customize VirtualMachineCloneCustomize
    The customization specification for the virtual machine post-clone.
    linked_clone bool
    Whether or not to create a linked clone when cloning. When this option is used, the source VM must have a single snapshot associated with it.
    ovf_network_map Mapping[str, str]
    Mapping of ovf networks to the networks to use in vSphere.
    ovf_storage_map Mapping[str, str]
    Mapping of ovf storage to the datastores to use in vSphere.
    timeout int
    The timeout, in minutes, to wait for the virtual machine clone to complete.
    templateUuid String
    The UUID of the source virtual machine or template.
    customizationSpec Property Map
    The customization specification for the virtual machine post-clone.
    customize Property Map
    The customization specification for the virtual machine post-clone.
    linkedClone Boolean
    Whether or not to create a linked clone when cloning. When this option is used, the source VM must have a single snapshot associated with it.
    ovfNetworkMap Map<String>
    Mapping of ovf networks to the networks to use in vSphere.
    ovfStorageMap Map<String>
    Mapping of ovf storage to the datastores to use in vSphere.
    timeout Number
    The timeout, in minutes, to wait for the virtual machine clone to complete.

    VirtualMachineCloneCustomizationSpec, VirtualMachineCloneCustomizationSpecArgs

    Id string
    The UUID of the virtual machine.
    Timeout int
    The amount of time, in minutes, to wait for guest OS customization to complete before returning with an error. Setting this value to 0 or a negative value skips the waiter. Default: 10.
    Id string
    The UUID of the virtual machine.
    Timeout int
    The amount of time, in minutes, to wait for guest OS customization to complete before returning with an error. Setting this value to 0 or a negative value skips the waiter. Default: 10.
    id String
    The UUID of the virtual machine.
    timeout Integer
    The amount of time, in minutes, to wait for guest OS customization to complete before returning with an error. Setting this value to 0 or a negative value skips the waiter. Default: 10.
    id string
    The UUID of the virtual machine.
    timeout number
    The amount of time, in minutes, to wait for guest OS customization to complete before returning with an error. Setting this value to 0 or a negative value skips the waiter. Default: 10.
    id str
    The UUID of the virtual machine.
    timeout int
    The amount of time, in minutes, to wait for guest OS customization to complete before returning with an error. Setting this value to 0 or a negative value skips the waiter. Default: 10.
    id String
    The UUID of the virtual machine.
    timeout Number
    The amount of time, in minutes, to wait for guest OS customization to complete before returning with an error. Setting this value to 0 or a negative value skips the waiter. Default: 10.

    VirtualMachineCloneCustomize, VirtualMachineCloneCustomizeArgs

    DnsServerLists List<string>
    The list of DNS servers for a virtual network adapter with a static IP address.
    DnsSuffixLists List<string>
    A list of DNS search domains to add to the DNS configuration on the virtual machine.
    Ipv4Gateway string
    The IPv4 default gateway when using network_interface customization on the virtual machine. This address must be local to a static IPv4 address configured in an interface sub-resource.
    Ipv6Gateway string
    The IPv6 default gateway when using network_interface customization on the virtual machine. This address must be local to a static IPv4 address configured in an interface sub-resource.
    LinuxOptions Pulumi.VSphere.Inputs.VirtualMachineCloneCustomizeLinuxOptions
    A list of configuration options specific to Linux virtual machines.
    NetworkInterfaces List<Pulumi.VSphere.Inputs.VirtualMachineCloneCustomizeNetworkInterface>
    A specification of network interface configuration options.
    Timeout int
    The amount of time, in minutes, to wait for guest OS customization to complete before returning with an error. Setting this value to 0 or a negative value skips the waiter. Default: 10.
    WindowsOptions Pulumi.VSphere.Inputs.VirtualMachineCloneCustomizeWindowsOptions
    A list of configuration options specific to Windows virtual machines.
    WindowsSysprepText string
    Use this option to specify a windows sysprep file directly.
    DnsServerLists []string
    The list of DNS servers for a virtual network adapter with a static IP address.
    DnsSuffixLists []string
    A list of DNS search domains to add to the DNS configuration on the virtual machine.
    Ipv4Gateway string
    The IPv4 default gateway when using network_interface customization on the virtual machine. This address must be local to a static IPv4 address configured in an interface sub-resource.
    Ipv6Gateway string
    The IPv6 default gateway when using network_interface customization on the virtual machine. This address must be local to a static IPv4 address configured in an interface sub-resource.
    LinuxOptions VirtualMachineCloneCustomizeLinuxOptions
    A list of configuration options specific to Linux virtual machines.
    NetworkInterfaces []VirtualMachineCloneCustomizeNetworkInterface
    A specification of network interface configuration options.
    Timeout int
    The amount of time, in minutes, to wait for guest OS customization to complete before returning with an error. Setting this value to 0 or a negative value skips the waiter. Default: 10.
    WindowsOptions VirtualMachineCloneCustomizeWindowsOptions
    A list of configuration options specific to Windows virtual machines.
    WindowsSysprepText string
    Use this option to specify a windows sysprep file directly.
    dnsServerLists List<String>
    The list of DNS servers for a virtual network adapter with a static IP address.
    dnsSuffixLists List<String>
    A list of DNS search domains to add to the DNS configuration on the virtual machine.
    ipv4Gateway String
    The IPv4 default gateway when using network_interface customization on the virtual machine. This address must be local to a static IPv4 address configured in an interface sub-resource.
    ipv6Gateway String
    The IPv6 default gateway when using network_interface customization on the virtual machine. This address must be local to a static IPv4 address configured in an interface sub-resource.
    linuxOptions VirtualMachineCloneCustomizeLinuxOptions
    A list of configuration options specific to Linux virtual machines.
    networkInterfaces List<VirtualMachineCloneCustomizeNetworkInterface>
    A specification of network interface configuration options.
    timeout Integer
    The amount of time, in minutes, to wait for guest OS customization to complete before returning with an error. Setting this value to 0 or a negative value skips the waiter. Default: 10.
    windowsOptions VirtualMachineCloneCustomizeWindowsOptions
    A list of configuration options specific to Windows virtual machines.
    windowsSysprepText String
    Use this option to specify a windows sysprep file directly.
    dnsServerLists string[]
    The list of DNS servers for a virtual network adapter with a static IP address.
    dnsSuffixLists string[]
    A list of DNS search domains to add to the DNS configuration on the virtual machine.
    ipv4Gateway string
    The IPv4 default gateway when using network_interface customization on the virtual machine. This address must be local to a static IPv4 address configured in an interface sub-resource.
    ipv6Gateway string
    The IPv6 default gateway when using network_interface customization on the virtual machine. This address must be local to a static IPv4 address configured in an interface sub-resource.
    linuxOptions VirtualMachineCloneCustomizeLinuxOptions
    A list of configuration options specific to Linux virtual machines.
    networkInterfaces VirtualMachineCloneCustomizeNetworkInterface[]
    A specification of network interface configuration options.
    timeout number
    The amount of time, in minutes, to wait for guest OS customization to complete before returning with an error. Setting this value to 0 or a negative value skips the waiter. Default: 10.
    windowsOptions VirtualMachineCloneCustomizeWindowsOptions
    A list of configuration options specific to Windows virtual machines.
    windowsSysprepText string
    Use this option to specify a windows sysprep file directly.
    dns_server_lists Sequence[str]
    The list of DNS servers for a virtual network adapter with a static IP address.
    dns_suffix_lists Sequence[str]
    A list of DNS search domains to add to the DNS configuration on the virtual machine.
    ipv4_gateway str
    The IPv4 default gateway when using network_interface customization on the virtual machine. This address must be local to a static IPv4 address configured in an interface sub-resource.
    ipv6_gateway str
    The IPv6 default gateway when using network_interface customization on the virtual machine. This address must be local to a static IPv4 address configured in an interface sub-resource.
    linux_options VirtualMachineCloneCustomizeLinuxOptions
    A list of configuration options specific to Linux virtual machines.
    network_interfaces Sequence[VirtualMachineCloneCustomizeNetworkInterface]
    A specification of network interface configuration options.
    timeout int
    The amount of time, in minutes, to wait for guest OS customization to complete before returning with an error. Setting this value to 0 or a negative value skips the waiter. Default: 10.
    windows_options VirtualMachineCloneCustomizeWindowsOptions
    A list of configuration options specific to Windows virtual machines.
    windows_sysprep_text str
    Use this option to specify a windows sysprep file directly.
    dnsServerLists List<String>
    The list of DNS servers for a virtual network adapter with a static IP address.
    dnsSuffixLists List<String>
    A list of DNS search domains to add to the DNS configuration on the virtual machine.
    ipv4Gateway String
    The IPv4 default gateway when using network_interface customization on the virtual machine. This address must be local to a static IPv4 address configured in an interface sub-resource.
    ipv6Gateway String
    The IPv6 default gateway when using network_interface customization on the virtual machine. This address must be local to a static IPv4 address configured in an interface sub-resource.
    linuxOptions Property Map
    A list of configuration options specific to Linux virtual machines.
    networkInterfaces List<Property Map>
    A specification of network interface configuration options.
    timeout Number
    The amount of time, in minutes, to wait for guest OS customization to complete before returning with an error. Setting this value to 0 or a negative value skips the waiter. Default: 10.
    windowsOptions Property Map
    A list of configuration options specific to Windows virtual machines.
    windowsSysprepText String
    Use this option to specify a windows sysprep file directly.

    VirtualMachineCloneCustomizeLinuxOptions, VirtualMachineCloneCustomizeLinuxOptionsArgs

    Domain string
    The domain name for this virtual machine.
    HostName string
    The hostname for this virtual machine.
    HwClockUtc bool
    Specifies whether or not the hardware clock should be in UTC or not.
    ScriptText string
    The customization script to run before and or after guest customization
    TimeZone string
    Customize the time zone on the VM. This should be a time zone-style entry, like America/Los_Angeles.
    Domain string
    The domain name for this virtual machine.
    HostName string
    The hostname for this virtual machine.
    HwClockUtc bool
    Specifies whether or not the hardware clock should be in UTC or not.
    ScriptText string
    The customization script to run before and or after guest customization
    TimeZone string
    Customize the time zone on the VM. This should be a time zone-style entry, like America/Los_Angeles.
    domain String
    The domain name for this virtual machine.
    hostName String
    The hostname for this virtual machine.
    hwClockUtc Boolean
    Specifies whether or not the hardware clock should be in UTC or not.
    scriptText String
    The customization script to run before and or after guest customization
    timeZone String
    Customize the time zone on the VM. This should be a time zone-style entry, like America/Los_Angeles.
    domain string
    The domain name for this virtual machine.
    hostName string
    The hostname for this virtual machine.
    hwClockUtc boolean
    Specifies whether or not the hardware clock should be in UTC or not.
    scriptText string
    The customization script to run before and or after guest customization
    timeZone string
    Customize the time zone on the VM. This should be a time zone-style entry, like America/Los_Angeles.
    domain str
    The domain name for this virtual machine.
    host_name str
    The hostname for this virtual machine.
    hw_clock_utc bool
    Specifies whether or not the hardware clock should be in UTC or not.
    script_text str
    The customization script to run before and or after guest customization
    time_zone str
    Customize the time zone on the VM. This should be a time zone-style entry, like America/Los_Angeles.
    domain String
    The domain name for this virtual machine.
    hostName String
    The hostname for this virtual machine.
    hwClockUtc Boolean
    Specifies whether or not the hardware clock should be in UTC or not.
    scriptText String
    The customization script to run before and or after guest customization
    timeZone String
    Customize the time zone on the VM. This should be a time zone-style entry, like America/Los_Angeles.

    VirtualMachineCloneCustomizeNetworkInterface, VirtualMachineCloneCustomizeNetworkInterfaceArgs

    DnsDomain string
    A DNS search domain to add to the DNS configuration on the virtual machine.
    DnsServerLists List<string>
    Network-interface specific DNS settings for Windows operating systems. Ignored on Linux.
    Ipv4Address string
    The IPv4 address assigned to this network adapter. If left blank, DHCP is used.
    Ipv4Netmask int
    The IPv4 CIDR netmask for the supplied IP address. Ignored if DHCP is selected.
    Ipv6Address string
    The IPv6 address assigned to this network adapter. If left blank, default auto-configuration is used.
    Ipv6Netmask int
    The IPv6 CIDR netmask for the supplied IP address. Ignored if auto-configuration is selected.
    DnsDomain string
    A DNS search domain to add to the DNS configuration on the virtual machine.
    DnsServerLists []string
    Network-interface specific DNS settings for Windows operating systems. Ignored on Linux.
    Ipv4Address string
    The IPv4 address assigned to this network adapter. If left blank, DHCP is used.
    Ipv4Netmask int
    The IPv4 CIDR netmask for the supplied IP address. Ignored if DHCP is selected.
    Ipv6Address string
    The IPv6 address assigned to this network adapter. If left blank, default auto-configuration is used.
    Ipv6Netmask int
    The IPv6 CIDR netmask for the supplied IP address. Ignored if auto-configuration is selected.
    dnsDomain String
    A DNS search domain to add to the DNS configuration on the virtual machine.
    dnsServerLists List<String>
    Network-interface specific DNS settings for Windows operating systems. Ignored on Linux.
    ipv4Address String
    The IPv4 address assigned to this network adapter. If left blank, DHCP is used.
    ipv4Netmask Integer
    The IPv4 CIDR netmask for the supplied IP address. Ignored if DHCP is selected.
    ipv6Address String
    The IPv6 address assigned to this network adapter. If left blank, default auto-configuration is used.
    ipv6Netmask Integer
    The IPv6 CIDR netmask for the supplied IP address. Ignored if auto-configuration is selected.
    dnsDomain string
    A DNS search domain to add to the DNS configuration on the virtual machine.
    dnsServerLists string[]
    Network-interface specific DNS settings for Windows operating systems. Ignored on Linux.
    ipv4Address string
    The IPv4 address assigned to this network adapter. If left blank, DHCP is used.
    ipv4Netmask number
    The IPv4 CIDR netmask for the supplied IP address. Ignored if DHCP is selected.
    ipv6Address string
    The IPv6 address assigned to this network adapter. If left blank, default auto-configuration is used.
    ipv6Netmask number
    The IPv6 CIDR netmask for the supplied IP address. Ignored if auto-configuration is selected.
    dns_domain str
    A DNS search domain to add to the DNS configuration on the virtual machine.
    dns_server_lists Sequence[str]
    Network-interface specific DNS settings for Windows operating systems. Ignored on Linux.
    ipv4_address str
    The IPv4 address assigned to this network adapter. If left blank, DHCP is used.
    ipv4_netmask int
    The IPv4 CIDR netmask for the supplied IP address. Ignored if DHCP is selected.
    ipv6_address str
    The IPv6 address assigned to this network adapter. If left blank, default auto-configuration is used.
    ipv6_netmask int
    The IPv6 CIDR netmask for the supplied IP address. Ignored if auto-configuration is selected.
    dnsDomain String
    A DNS search domain to add to the DNS configuration on the virtual machine.
    dnsServerLists List<String>
    Network-interface specific DNS settings for Windows operating systems. Ignored on Linux.
    ipv4Address String
    The IPv4 address assigned to this network adapter. If left blank, DHCP is used.
    ipv4Netmask Number
    The IPv4 CIDR netmask for the supplied IP address. Ignored if DHCP is selected.
    ipv6Address String
    The IPv6 address assigned to this network adapter. If left blank, default auto-configuration is used.
    ipv6Netmask Number
    The IPv6 CIDR netmask for the supplied IP address. Ignored if auto-configuration is selected.

    VirtualMachineCloneCustomizeWindowsOptions, VirtualMachineCloneCustomizeWindowsOptionsArgs

    ComputerName string
    The host name for this virtual machine.
    AdminPassword string
    The new administrator password for this virtual machine.
    AutoLogon bool
    Specifies whether or not the VM automatically logs on as Administrator.
    AutoLogonCount int
    Specifies how many times the VM should auto-logon the Administrator account when auto_logon is true.
    DomainAdminPassword string
    The password of the domain administrator used to join this virtual machine to the domain.
    DomainAdminUser string
    The user account of the domain administrator used to join this virtual machine to the domain.
    DomainOu string
    The MachineObjectOU which specifies the full LDAP path name of the OU to which the virtual machine belongs.
    FullName string
    The full name of the user of this virtual machine.
    JoinDomain string
    The domain that the virtual machine should join.
    OrganizationName string
    The organization name this virtual machine is being installed for.
    ProductKey string
    The product key for this virtual machine.
    RunOnceCommandLists List<string>
    A list of commands to run at first user logon, after guest customization.
    TimeZone int
    The new time zone for the virtual machine. This is a sysprep-dictated timezone code.
    Workgroup string
    The workgroup for this virtual machine if not joining a domain.
    ComputerName string
    The host name for this virtual machine.
    AdminPassword string
    The new administrator password for this virtual machine.
    AutoLogon bool
    Specifies whether or not the VM automatically logs on as Administrator.
    AutoLogonCount int
    Specifies how many times the VM should auto-logon the Administrator account when auto_logon is true.
    DomainAdminPassword string
    The password of the domain administrator used to join this virtual machine to the domain.
    DomainAdminUser string
    The user account of the domain administrator used to join this virtual machine to the domain.
    DomainOu string
    The MachineObjectOU which specifies the full LDAP path name of the OU to which the virtual machine belongs.
    FullName string
    The full name of the user of this virtual machine.
    JoinDomain string
    The domain that the virtual machine should join.
    OrganizationName string
    The organization name this virtual machine is being installed for.
    ProductKey string
    The product key for this virtual machine.
    RunOnceCommandLists []string
    A list of commands to run at first user logon, after guest customization.
    TimeZone int
    The new time zone for the virtual machine. This is a sysprep-dictated timezone code.
    Workgroup string
    The workgroup for this virtual machine if not joining a domain.
    computerName String
    The host name for this virtual machine.
    adminPassword String
    The new administrator password for this virtual machine.
    autoLogon Boolean
    Specifies whether or not the VM automatically logs on as Administrator.
    autoLogonCount Integer
    Specifies how many times the VM should auto-logon the Administrator account when auto_logon is true.
    domainAdminPassword String
    The password of the domain administrator used to join this virtual machine to the domain.
    domainAdminUser String
    The user account of the domain administrator used to join this virtual machine to the domain.
    domainOu String
    The MachineObjectOU which specifies the full LDAP path name of the OU to which the virtual machine belongs.
    fullName String
    The full name of the user of this virtual machine.
    joinDomain String
    The domain that the virtual machine should join.
    organizationName String
    The organization name this virtual machine is being installed for.
    productKey String
    The product key for this virtual machine.
    runOnceCommandLists List<String>
    A list of commands to run at first user logon, after guest customization.
    timeZone Integer
    The new time zone for the virtual machine. This is a sysprep-dictated timezone code.
    workgroup String
    The workgroup for this virtual machine if not joining a domain.
    computerName string
    The host name for this virtual machine.
    adminPassword string
    The new administrator password for this virtual machine.
    autoLogon boolean
    Specifies whether or not the VM automatically logs on as Administrator.
    autoLogonCount number
    Specifies how many times the VM should auto-logon the Administrator account when auto_logon is true.
    domainAdminPassword string
    The password of the domain administrator used to join this virtual machine to the domain.
    domainAdminUser string
    The user account of the domain administrator used to join this virtual machine to the domain.
    domainOu string
    The MachineObjectOU which specifies the full LDAP path name of the OU to which the virtual machine belongs.
    fullName string
    The full name of the user of this virtual machine.
    joinDomain string
    The domain that the virtual machine should join.
    organizationName string
    The organization name this virtual machine is being installed for.
    productKey string
    The product key for this virtual machine.
    runOnceCommandLists string[]
    A list of commands to run at first user logon, after guest customization.
    timeZone number
    The new time zone for the virtual machine. This is a sysprep-dictated timezone code.
    workgroup string
    The workgroup for this virtual machine if not joining a domain.
    computer_name str
    The host name for this virtual machine.
    admin_password str
    The new administrator password for this virtual machine.
    auto_logon bool
    Specifies whether or not the VM automatically logs on as Administrator.
    auto_logon_count int
    Specifies how many times the VM should auto-logon the Administrator account when auto_logon is true.
    domain_admin_password str
    The password of the domain administrator used to join this virtual machine to the domain.
    domain_admin_user str
    The user account of the domain administrator used to join this virtual machine to the domain.
    domain_ou str
    The MachineObjectOU which specifies the full LDAP path name of the OU to which the virtual machine belongs.
    full_name str
    The full name of the user of this virtual machine.
    join_domain str
    The domain that the virtual machine should join.
    organization_name str
    The organization name this virtual machine is being installed for.
    product_key str
    The product key for this virtual machine.
    run_once_command_lists Sequence[str]
    A list of commands to run at first user logon, after guest customization.
    time_zone int
    The new time zone for the virtual machine. This is a sysprep-dictated timezone code.
    workgroup str
    The workgroup for this virtual machine if not joining a domain.
    computerName String
    The host name for this virtual machine.
    adminPassword String
    The new administrator password for this virtual machine.
    autoLogon Boolean
    Specifies whether or not the VM automatically logs on as Administrator.
    autoLogonCount Number
    Specifies how many times the VM should auto-logon the Administrator account when auto_logon is true.
    domainAdminPassword String
    The password of the domain administrator used to join this virtual machine to the domain.
    domainAdminUser String
    The user account of the domain administrator used to join this virtual machine to the domain.
    domainOu String
    The MachineObjectOU which specifies the full LDAP path name of the OU to which the virtual machine belongs.
    fullName String
    The full name of the user of this virtual machine.
    joinDomain String
    The domain that the virtual machine should join.
    organizationName String
    The organization name this virtual machine is being installed for.
    productKey String
    The product key for this virtual machine.
    runOnceCommandLists List<String>
    A list of commands to run at first user logon, after guest customization.
    timeZone Number
    The new time zone for the virtual machine. This is a sysprep-dictated timezone code.
    workgroup String
    The workgroup for this virtual machine if not joining a domain.

    VirtualMachineDisk, VirtualMachineDiskArgs

    Label string
    A unique label for this disk.
    Attach bool
    If this is true, the disk is attached instead of created. Implies keep_on_remove.
    ControllerType string
    The type of controller the disk should be connected to. Must be 'scsi', 'sata', 'nvme', or 'ide'.
    DatastoreId string
    The datastore ID for this virtual disk, if different than the virtual machine.
    DeviceAddress string
    An address internal to Terraform that helps locate the device when key is unavailable. This follows a convention of CONTROLLER_TYPE:BUS_NUMBER:UNIT_NUMBER. Example: scsi:0:1 means device unit 1 on SCSI bus 0.
    DiskMode string
    The mode of this this virtual disk for purposes of writes and snapshotting. Can be one of append, independent_nonpersistent, independent_persistent, nonpersistent, persistent, or undoable.
    DiskSharing string
    The sharing mode of this virtual disk. Can be one of sharingMultiWriter or sharingNone.
    EagerlyScrub bool
    The virtual disk file zeroing policy when thin_provision is not true. The default is false, which lazily-zeros the disk, speeding up thick-provisioned disk creation time.
    IoLimit int
    The upper limit of IOPS that this disk can use.
    IoReservation int
    The I/O guarantee that this disk has, in IOPS.
    IoShareCount int
    The share count for this disk when the share level is custom.
    IoShareLevel string
    The share allocation level for this disk. Can be one of low, normal, high, or custom.
    KeepOnRemove bool
    Set to true to keep the underlying VMDK file when removing this virtual disk from configuration.
    Key int
    The ID of the device within the virtual machine.
    Path string
    The full path of the virtual disk. This can only be provided if attach is set to true, otherwise it is a read-only value.
    Size int
    The size of the disk, in GB.
    StoragePolicyId string
    The ID of the storage policy to assign to the virtual disk in VM.
    ThinProvisioned bool
    If true, this disk is thin provisioned, with space for the file being allocated on an as-needed basis.
    UnitNumber int
    The unique device number for this disk. This number determines where on the SCSI bus this device will be attached.
    Uuid string
    The UUID of the virtual machine. Also exposed as the id of the resource.
    WriteThrough bool
    If true, writes for this disk are sent directly to the filesystem immediately instead of being buffered.
    Label string
    A unique label for this disk.
    Attach bool
    If this is true, the disk is attached instead of created. Implies keep_on_remove.
    ControllerType string
    The type of controller the disk should be connected to. Must be 'scsi', 'sata', 'nvme', or 'ide'.
    DatastoreId string
    The datastore ID for this virtual disk, if different than the virtual machine.
    DeviceAddress string
    An address internal to Terraform that helps locate the device when key is unavailable. This follows a convention of CONTROLLER_TYPE:BUS_NUMBER:UNIT_NUMBER. Example: scsi:0:1 means device unit 1 on SCSI bus 0.
    DiskMode string
    The mode of this this virtual disk for purposes of writes and snapshotting. Can be one of append, independent_nonpersistent, independent_persistent, nonpersistent, persistent, or undoable.
    DiskSharing string
    The sharing mode of this virtual disk. Can be one of sharingMultiWriter or sharingNone.
    EagerlyScrub bool
    The virtual disk file zeroing policy when thin_provision is not true. The default is false, which lazily-zeros the disk, speeding up thick-provisioned disk creation time.
    IoLimit int
    The upper limit of IOPS that this disk can use.
    IoReservation int
    The I/O guarantee that this disk has, in IOPS.
    IoShareCount int
    The share count for this disk when the share level is custom.
    IoShareLevel string
    The share allocation level for this disk. Can be one of low, normal, high, or custom.
    KeepOnRemove bool
    Set to true to keep the underlying VMDK file when removing this virtual disk from configuration.
    Key int
    The ID of the device within the virtual machine.
    Path string
    The full path of the virtual disk. This can only be provided if attach is set to true, otherwise it is a read-only value.
    Size int
    The size of the disk, in GB.
    StoragePolicyId string
    The ID of the storage policy to assign to the virtual disk in VM.
    ThinProvisioned bool
    If true, this disk is thin provisioned, with space for the file being allocated on an as-needed basis.
    UnitNumber int
    The unique device number for this disk. This number determines where on the SCSI bus this device will be attached.
    Uuid string
    The UUID of the virtual machine. Also exposed as the id of the resource.
    WriteThrough bool
    If true, writes for this disk are sent directly to the filesystem immediately instead of being buffered.
    label String
    A unique label for this disk.
    attach Boolean
    If this is true, the disk is attached instead of created. Implies keep_on_remove.
    controllerType String
    The type of controller the disk should be connected to. Must be 'scsi', 'sata', 'nvme', or 'ide'.
    datastoreId String
    The datastore ID for this virtual disk, if different than the virtual machine.
    deviceAddress String
    An address internal to Terraform that helps locate the device when key is unavailable. This follows a convention of CONTROLLER_TYPE:BUS_NUMBER:UNIT_NUMBER. Example: scsi:0:1 means device unit 1 on SCSI bus 0.
    diskMode String
    The mode of this this virtual disk for purposes of writes and snapshotting. Can be one of append, independent_nonpersistent, independent_persistent, nonpersistent, persistent, or undoable.
    diskSharing String
    The sharing mode of this virtual disk. Can be one of sharingMultiWriter or sharingNone.
    eagerlyScrub Boolean
    The virtual disk file zeroing policy when thin_provision is not true. The default is false, which lazily-zeros the disk, speeding up thick-provisioned disk creation time.
    ioLimit Integer
    The upper limit of IOPS that this disk can use.
    ioReservation Integer
    The I/O guarantee that this disk has, in IOPS.
    ioShareCount Integer
    The share count for this disk when the share level is custom.
    ioShareLevel String
    The share allocation level for this disk. Can be one of low, normal, high, or custom.
    keepOnRemove Boolean
    Set to true to keep the underlying VMDK file when removing this virtual disk from configuration.
    key Integer
    The ID of the device within the virtual machine.
    path String
    The full path of the virtual disk. This can only be provided if attach is set to true, otherwise it is a read-only value.
    size Integer
    The size of the disk, in GB.
    storagePolicyId String
    The ID of the storage policy to assign to the virtual disk in VM.
    thinProvisioned Boolean
    If true, this disk is thin provisioned, with space for the file being allocated on an as-needed basis.
    unitNumber Integer
    The unique device number for this disk. This number determines where on the SCSI bus this device will be attached.
    uuid String
    The UUID of the virtual machine. Also exposed as the id of the resource.
    writeThrough Boolean
    If true, writes for this disk are sent directly to the filesystem immediately instead of being buffered.
    label string
    A unique label for this disk.
    attach boolean
    If this is true, the disk is attached instead of created. Implies keep_on_remove.
    controllerType string
    The type of controller the disk should be connected to. Must be 'scsi', 'sata', 'nvme', or 'ide'.
    datastoreId string
    The datastore ID for this virtual disk, if different than the virtual machine.
    deviceAddress string
    An address internal to Terraform that helps locate the device when key is unavailable. This follows a convention of CONTROLLER_TYPE:BUS_NUMBER:UNIT_NUMBER. Example: scsi:0:1 means device unit 1 on SCSI bus 0.
    diskMode string
    The mode of this this virtual disk for purposes of writes and snapshotting. Can be one of append, independent_nonpersistent, independent_persistent, nonpersistent, persistent, or undoable.
    diskSharing string
    The sharing mode of this virtual disk. Can be one of sharingMultiWriter or sharingNone.
    eagerlyScrub boolean
    The virtual disk file zeroing policy when thin_provision is not true. The default is false, which lazily-zeros the disk, speeding up thick-provisioned disk creation time.
    ioLimit number
    The upper limit of IOPS that this disk can use.
    ioReservation number
    The I/O guarantee that this disk has, in IOPS.
    ioShareCount number
    The share count for this disk when the share level is custom.
    ioShareLevel string
    The share allocation level for this disk. Can be one of low, normal, high, or custom.
    keepOnRemove boolean
    Set to true to keep the underlying VMDK file when removing this virtual disk from configuration.
    key number
    The ID of the device within the virtual machine.
    path string
    The full path of the virtual disk. This can only be provided if attach is set to true, otherwise it is a read-only value.
    size number
    The size of the disk, in GB.
    storagePolicyId string
    The ID of the storage policy to assign to the virtual disk in VM.
    thinProvisioned boolean
    If true, this disk is thin provisioned, with space for the file being allocated on an as-needed basis.
    unitNumber number
    The unique device number for this disk. This number determines where on the SCSI bus this device will be attached.
    uuid string
    The UUID of the virtual machine. Also exposed as the id of the resource.
    writeThrough boolean
    If true, writes for this disk are sent directly to the filesystem immediately instead of being buffered.
    label str
    A unique label for this disk.
    attach bool
    If this is true, the disk is attached instead of created. Implies keep_on_remove.
    controller_type str
    The type of controller the disk should be connected to. Must be 'scsi', 'sata', 'nvme', or 'ide'.
    datastore_id str
    The datastore ID for this virtual disk, if different than the virtual machine.
    device_address str
    An address internal to Terraform that helps locate the device when key is unavailable. This follows a convention of CONTROLLER_TYPE:BUS_NUMBER:UNIT_NUMBER. Example: scsi:0:1 means device unit 1 on SCSI bus 0.
    disk_mode str
    The mode of this this virtual disk for purposes of writes and snapshotting. Can be one of append, independent_nonpersistent, independent_persistent, nonpersistent, persistent, or undoable.
    disk_sharing str
    The sharing mode of this virtual disk. Can be one of sharingMultiWriter or sharingNone.
    eagerly_scrub bool
    The virtual disk file zeroing policy when thin_provision is not true. The default is false, which lazily-zeros the disk, speeding up thick-provisioned disk creation time.
    io_limit int
    The upper limit of IOPS that this disk can use.
    io_reservation int
    The I/O guarantee that this disk has, in IOPS.
    io_share_count int
    The share count for this disk when the share level is custom.
    io_share_level str
    The share allocation level for this disk. Can be one of low, normal, high, or custom.
    keep_on_remove bool
    Set to true to keep the underlying VMDK file when removing this virtual disk from configuration.
    key int
    The ID of the device within the virtual machine.
    path str
    The full path of the virtual disk. This can only be provided if attach is set to true, otherwise it is a read-only value.
    size int
    The size of the disk, in GB.
    storage_policy_id str
    The ID of the storage policy to assign to the virtual disk in VM.
    thin_provisioned bool
    If true, this disk is thin provisioned, with space for the file being allocated on an as-needed basis.
    unit_number int
    The unique device number for this disk. This number determines where on the SCSI bus this device will be attached.
    uuid str
    The UUID of the virtual machine. Also exposed as the id of the resource.
    write_through bool
    If true, writes for this disk are sent directly to the filesystem immediately instead of being buffered.
    label String
    A unique label for this disk.
    attach Boolean
    If this is true, the disk is attached instead of created. Implies keep_on_remove.
    controllerType String
    The type of controller the disk should be connected to. Must be 'scsi', 'sata', 'nvme', or 'ide'.
    datastoreId String
    The datastore ID for this virtual disk, if different than the virtual machine.
    deviceAddress String
    An address internal to Terraform that helps locate the device when key is unavailable. This follows a convention of CONTROLLER_TYPE:BUS_NUMBER:UNIT_NUMBER. Example: scsi:0:1 means device unit 1 on SCSI bus 0.
    diskMode String
    The mode of this this virtual disk for purposes of writes and snapshotting. Can be one of append, independent_nonpersistent, independent_persistent, nonpersistent, persistent, or undoable.
    diskSharing String
    The sharing mode of this virtual disk. Can be one of sharingMultiWriter or sharingNone.
    eagerlyScrub Boolean
    The virtual disk file zeroing policy when thin_provision is not true. The default is false, which lazily-zeros the disk, speeding up thick-provisioned disk creation time.
    ioLimit Number
    The upper limit of IOPS that this disk can use.
    ioReservation Number
    The I/O guarantee that this disk has, in IOPS.
    ioShareCount Number
    The share count for this disk when the share level is custom.
    ioShareLevel String
    The share allocation level for this disk. Can be one of low, normal, high, or custom.
    keepOnRemove Boolean
    Set to true to keep the underlying VMDK file when removing this virtual disk from configuration.
    key Number
    The ID of the device within the virtual machine.
    path String
    The full path of the virtual disk. This can only be provided if attach is set to true, otherwise it is a read-only value.
    size Number
    The size of the disk, in GB.
    storagePolicyId String
    The ID of the storage policy to assign to the virtual disk in VM.
    thinProvisioned Boolean
    If true, this disk is thin provisioned, with space for the file being allocated on an as-needed basis.
    unitNumber Number
    The unique device number for this disk. This number determines where on the SCSI bus this device will be attached.
    uuid String
    The UUID of the virtual machine. Also exposed as the id of the resource.
    writeThrough Boolean
    If true, writes for this disk are sent directly to the filesystem immediately instead of being buffered.

    VirtualMachineNetworkInterface, VirtualMachineNetworkInterfaceArgs

    NetworkId string
    The ID of the network to connect this network interface to.
    AdapterType string
    The controller type. Can be one of e1000, e1000e, sriov, vmxnet3, or vrdma.
    BandwidthLimit int
    The upper bandwidth limit of this network interface, in Mbits/sec.
    BandwidthReservation int
    The bandwidth reservation of this network interface, in Mbits/sec.
    BandwidthShareCount int
    The share count for this network interface when the share level is custom.
    BandwidthShareLevel string
    The bandwidth share allocation level for this interface. Can be one of low, normal, high, or custom.
    DeviceAddress string
    An address internal to Terraform that helps locate the device when key is unavailable. This follows a convention of CONTROLLER_TYPE:BUS_NUMBER:UNIT_NUMBER. Example: scsi:0:1 means device unit 1 on SCSI bus 0.
    Key int
    The ID of the device within the virtual machine.
    MacAddress string
    The MAC address of this network interface. Can only be manually set if use_static_mac is true.
    OvfMapping string
    Mapping of network interface to OVF network.
    PhysicalFunction string
    The ID of the Physical SR-IOV NIC to attach to, e.g. '0000:d8:00.0'
    UseStaticMac bool
    If true, the mac_address field is treated as a static MAC address and set accordingly.
    NetworkId string
    The ID of the network to connect this network interface to.
    AdapterType string
    The controller type. Can be one of e1000, e1000e, sriov, vmxnet3, or vrdma.
    BandwidthLimit int
    The upper bandwidth limit of this network interface, in Mbits/sec.
    BandwidthReservation int
    The bandwidth reservation of this network interface, in Mbits/sec.
    BandwidthShareCount int
    The share count for this network interface when the share level is custom.
    BandwidthShareLevel string
    The bandwidth share allocation level for this interface. Can be one of low, normal, high, or custom.
    DeviceAddress string
    An address internal to Terraform that helps locate the device when key is unavailable. This follows a convention of CONTROLLER_TYPE:BUS_NUMBER:UNIT_NUMBER. Example: scsi:0:1 means device unit 1 on SCSI bus 0.
    Key int
    The ID of the device within the virtual machine.
    MacAddress string
    The MAC address of this network interface. Can only be manually set if use_static_mac is true.
    OvfMapping string
    Mapping of network interface to OVF network.
    PhysicalFunction string
    The ID of the Physical SR-IOV NIC to attach to, e.g. '0000:d8:00.0'
    UseStaticMac bool
    If true, the mac_address field is treated as a static MAC address and set accordingly.
    networkId String
    The ID of the network to connect this network interface to.
    adapterType String
    The controller type. Can be one of e1000, e1000e, sriov, vmxnet3, or vrdma.
    bandwidthLimit Integer
    The upper bandwidth limit of this network interface, in Mbits/sec.
    bandwidthReservation Integer
    The bandwidth reservation of this network interface, in Mbits/sec.
    bandwidthShareCount Integer
    The share count for this network interface when the share level is custom.
    bandwidthShareLevel String
    The bandwidth share allocation level for this interface. Can be one of low, normal, high, or custom.
    deviceAddress String
    An address internal to Terraform that helps locate the device when key is unavailable. This follows a convention of CONTROLLER_TYPE:BUS_NUMBER:UNIT_NUMBER. Example: scsi:0:1 means device unit 1 on SCSI bus 0.
    key Integer
    The ID of the device within the virtual machine.
    macAddress String
    The MAC address of this network interface. Can only be manually set if use_static_mac is true.
    ovfMapping String
    Mapping of network interface to OVF network.
    physicalFunction String
    The ID of the Physical SR-IOV NIC to attach to, e.g. '0000:d8:00.0'
    useStaticMac Boolean
    If true, the mac_address field is treated as a static MAC address and set accordingly.
    networkId string
    The ID of the network to connect this network interface to.
    adapterType string
    The controller type. Can be one of e1000, e1000e, sriov, vmxnet3, or vrdma.
    bandwidthLimit number
    The upper bandwidth limit of this network interface, in Mbits/sec.
    bandwidthReservation number
    The bandwidth reservation of this network interface, in Mbits/sec.
    bandwidthShareCount number
    The share count for this network interface when the share level is custom.
    bandwidthShareLevel string
    The bandwidth share allocation level for this interface. Can be one of low, normal, high, or custom.
    deviceAddress string
    An address internal to Terraform that helps locate the device when key is unavailable. This follows a convention of CONTROLLER_TYPE:BUS_NUMBER:UNIT_NUMBER. Example: scsi:0:1 means device unit 1 on SCSI bus 0.
    key number
    The ID of the device within the virtual machine.
    macAddress string
    The MAC address of this network interface. Can only be manually set if use_static_mac is true.
    ovfMapping string
    Mapping of network interface to OVF network.
    physicalFunction string
    The ID of the Physical SR-IOV NIC to attach to, e.g. '0000:d8:00.0'
    useStaticMac boolean
    If true, the mac_address field is treated as a static MAC address and set accordingly.
    network_id str
    The ID of the network to connect this network interface to.
    adapter_type str
    The controller type. Can be one of e1000, e1000e, sriov, vmxnet3, or vrdma.
    bandwidth_limit int
    The upper bandwidth limit of this network interface, in Mbits/sec.
    bandwidth_reservation int
    The bandwidth reservation of this network interface, in Mbits/sec.
    bandwidth_share_count int
    The share count for this network interface when the share level is custom.
    bandwidth_share_level str
    The bandwidth share allocation level for this interface. Can be one of low, normal, high, or custom.
    device_address str
    An address internal to Terraform that helps locate the device when key is unavailable. This follows a convention of CONTROLLER_TYPE:BUS_NUMBER:UNIT_NUMBER. Example: scsi:0:1 means device unit 1 on SCSI bus 0.
    key int
    The ID of the device within the virtual machine.
    mac_address str
    The MAC address of this network interface. Can only be manually set if use_static_mac is true.
    ovf_mapping str
    Mapping of network interface to OVF network.
    physical_function str
    The ID of the Physical SR-IOV NIC to attach to, e.g. '0000:d8:00.0'
    use_static_mac bool
    If true, the mac_address field is treated as a static MAC address and set accordingly.
    networkId String
    The ID of the network to connect this network interface to.
    adapterType String
    The controller type. Can be one of e1000, e1000e, sriov, vmxnet3, or vrdma.
    bandwidthLimit Number
    The upper bandwidth limit of this network interface, in Mbits/sec.
    bandwidthReservation Number
    The bandwidth reservation of this network interface, in Mbits/sec.
    bandwidthShareCount Number
    The share count for this network interface when the share level is custom.
    bandwidthShareLevel String
    The bandwidth share allocation level for this interface. Can be one of low, normal, high, or custom.
    deviceAddress String
    An address internal to Terraform that helps locate the device when key is unavailable. This follows a convention of CONTROLLER_TYPE:BUS_NUMBER:UNIT_NUMBER. Example: scsi:0:1 means device unit 1 on SCSI bus 0.
    key Number
    The ID of the device within the virtual machine.
    macAddress String
    The MAC address of this network interface. Can only be manually set if use_static_mac is true.
    ovfMapping String
    Mapping of network interface to OVF network.
    physicalFunction String
    The ID of the Physical SR-IOV NIC to attach to, e.g. '0000:d8:00.0'
    useStaticMac Boolean
    If true, the mac_address field is treated as a static MAC address and set accordingly.

    VirtualMachineOvfDeploy, VirtualMachineOvfDeployArgs

    AllowUnverifiedSslCert bool
    Allow unverified ssl certificates while deploying ovf/ova from url.
    DeploymentOption string
    The Deployment option to be chosen. If empty, the default option is used.
    DiskProvisioning string
    An optional disk provisioning. If set, all the disks in the deployed ovf will have the same specified disk type (e.g., thin provisioned).
    EnableHiddenProperties bool
    Allow properties with ovf:userConfigurable=false to be set.
    IpAllocationPolicy string
    The IP allocation policy.
    IpProtocol string
    The IP protocol.
    LocalOvfPath string
    The absolute path to the ovf/ova file in the local system.
    OvfNetworkMap Dictionary<string, string>
    The mapping of name of network identifiers from the ovf descriptor to network UUID in the VI infrastructure.
    RemoteOvfUrl string
    URL to the remote ovf/ova file to be deployed.
    AllowUnverifiedSslCert bool
    Allow unverified ssl certificates while deploying ovf/ova from url.
    DeploymentOption string
    The Deployment option to be chosen. If empty, the default option is used.
    DiskProvisioning string
    An optional disk provisioning. If set, all the disks in the deployed ovf will have the same specified disk type (e.g., thin provisioned).
    EnableHiddenProperties bool
    Allow properties with ovf:userConfigurable=false to be set.
    IpAllocationPolicy string
    The IP allocation policy.
    IpProtocol string
    The IP protocol.
    LocalOvfPath string
    The absolute path to the ovf/ova file in the local system.
    OvfNetworkMap map[string]string
    The mapping of name of network identifiers from the ovf descriptor to network UUID in the VI infrastructure.
    RemoteOvfUrl string
    URL to the remote ovf/ova file to be deployed.
    allowUnverifiedSslCert Boolean
    Allow unverified ssl certificates while deploying ovf/ova from url.
    deploymentOption String
    The Deployment option to be chosen. If empty, the default option is used.
    diskProvisioning String
    An optional disk provisioning. If set, all the disks in the deployed ovf will have the same specified disk type (e.g., thin provisioned).
    enableHiddenProperties Boolean
    Allow properties with ovf:userConfigurable=false to be set.
    ipAllocationPolicy String
    The IP allocation policy.
    ipProtocol String
    The IP protocol.
    localOvfPath String
    The absolute path to the ovf/ova file in the local system.
    ovfNetworkMap Map<String,String>
    The mapping of name of network identifiers from the ovf descriptor to network UUID in the VI infrastructure.
    remoteOvfUrl String
    URL to the remote ovf/ova file to be deployed.
    allowUnverifiedSslCert boolean
    Allow unverified ssl certificates while deploying ovf/ova from url.
    deploymentOption string
    The Deployment option to be chosen. If empty, the default option is used.
    diskProvisioning string
    An optional disk provisioning. If set, all the disks in the deployed ovf will have the same specified disk type (e.g., thin provisioned).
    enableHiddenProperties boolean
    Allow properties with ovf:userConfigurable=false to be set.
    ipAllocationPolicy string
    The IP allocation policy.
    ipProtocol string
    The IP protocol.
    localOvfPath string
    The absolute path to the ovf/ova file in the local system.
    ovfNetworkMap {[key: string]: string}
    The mapping of name of network identifiers from the ovf descriptor to network UUID in the VI infrastructure.
    remoteOvfUrl string
    URL to the remote ovf/ova file to be deployed.
    allow_unverified_ssl_cert bool
    Allow unverified ssl certificates while deploying ovf/ova from url.
    deployment_option str
    The Deployment option to be chosen. If empty, the default option is used.
    disk_provisioning str
    An optional disk provisioning. If set, all the disks in the deployed ovf will have the same specified disk type (e.g., thin provisioned).
    enable_hidden_properties bool
    Allow properties with ovf:userConfigurable=false to be set.
    ip_allocation_policy str
    The IP allocation policy.
    ip_protocol str
    The IP protocol.
    local_ovf_path str
    The absolute path to the ovf/ova file in the local system.
    ovf_network_map Mapping[str, str]
    The mapping of name of network identifiers from the ovf descriptor to network UUID in the VI infrastructure.
    remote_ovf_url str
    URL to the remote ovf/ova file to be deployed.
    allowUnverifiedSslCert Boolean
    Allow unverified ssl certificates while deploying ovf/ova from url.
    deploymentOption String
    The Deployment option to be chosen. If empty, the default option is used.
    diskProvisioning String
    An optional disk provisioning. If set, all the disks in the deployed ovf will have the same specified disk type (e.g., thin provisioned).
    enableHiddenProperties Boolean
    Allow properties with ovf:userConfigurable=false to be set.
    ipAllocationPolicy String
    The IP allocation policy.
    ipProtocol String
    The IP protocol.
    localOvfPath String
    The absolute path to the ovf/ova file in the local system.
    ovfNetworkMap Map<String>
    The mapping of name of network identifiers from the ovf descriptor to network UUID in the VI infrastructure.
    remoteOvfUrl String
    URL to the remote ovf/ova file to be deployed.

    VirtualMachineVapp, VirtualMachineVappArgs

    Properties Dictionary<string, string>
    A map of customizable vApp properties and their values. Allows customization of VMs cloned from OVF templates which have customizable vApp properties.
    Properties map[string]string
    A map of customizable vApp properties and their values. Allows customization of VMs cloned from OVF templates which have customizable vApp properties.
    properties Map<String,String>
    A map of customizable vApp properties and their values. Allows customization of VMs cloned from OVF templates which have customizable vApp properties.
    properties {[key: string]: string}
    A map of customizable vApp properties and their values. Allows customization of VMs cloned from OVF templates which have customizable vApp properties.
    properties Mapping[str, str]
    A map of customizable vApp properties and their values. Allows customization of VMs cloned from OVF templates which have customizable vApp properties.
    properties Map<String>
    A map of customizable vApp properties and their values. Allows customization of VMs cloned from OVF templates which have customizable vApp properties.

    VirtualMachineVtpm, VirtualMachineVtpmArgs

    Version string
    The version of the TPM device. Default is 2.0.
    Version string
    The version of the TPM device. Default is 2.0.
    version String
    The version of the TPM device. Default is 2.0.
    version string
    The version of the TPM device. Default is 2.0.
    version str
    The version of the TPM device. Default is 2.0.
    version String
    The version of the TPM device. Default is 2.0.

    Import

    An existing virtual machine can be imported into the Terraform state by providing the full path to the virtual machine.

    Examples:

    Import a virtual machine resource named foo located in the dc-01 datacenter.

    $ pulumi import vsphere:index/virtualMachine:VirtualMachine vm /dc-01/vm/foo
    

    NOTE: The vm portion of the path is required by vSphere. If the virtual machine is located in a folder, the folder path needs to be included. This is because vSphere organizes virtual machines within a datacenter under the vm folder, and any additional folders created within the vm folder must be included in the path.

    If the virtual machine foo is in a folder named bar, the import command would be:

    $ pulumi import vsphere:index/virtualMachine:VirtualMachine vm /dc-01/vm/bar/foo
    

    Additional Importing Requirements

    Many of the requirements for cloning apply to importing. Although importing writes directly to the Terraform state, some rules can not be enforced during import time, so every effort should be made to ensure the correctness of the configuration before the import.

    The following requirements apply to import:

    • The disks must have a label argument assigned in a convention matching Hard Disk, starting with disk number 0, based on each virtual disk order on the SCSI bus. As an example, a disk on SCSI controller 0 with a unit number of 0 would be labeled as Hard Disk 0, a disk on the same controller with a unit number of 1 would be Hard Disk 1, but the next disk, which is on SCSI controller 1 with a unit number of 0, still becomes Hard Disk 2.

    NOTE: Any custom label set at deployment of machine through Terraform, on import will not have the custom label and will default to Hard Disk _x_.

    • Disks are always imported with keep_on_remove enabled until the first pulumi up run which will remove the setting for known disks. This process safeguards against naming or accounting mistakes in the disk configuration.

    • The storage controller count for the resource is set to the number of contiguous storage controllers found, starting with the controller at SCSI bus number 0. If no storage controllers are discovered, the virtual machine is not eligible for import. For maximum compatibility, ensure that the virtual machine has the exact number of storage controllers needed and set the storage controller count accordingly.

    After importing, you should run pulumi preview. Unless you have changed anything else in the configuration that would cause other attributes to change. The only difference should be configuration-only changes, which are typically comprised of:

    • The imported flag will transition from true to false.

    • The keep_on_remove of known disks will transition from true to false.

    • Configuration supplied in the clone block, if present, will be persisted to state. This initial persistence operation does not perform any cloning or customization actions, nor does it force a new resource. After the first apply operation, further changes to clone will force the creation of a new resource.

    NOTE: Do not make any configuration changes to clone after importing or upgrading from a legacy version of the provider before doing an initial pulumi up as these changes will not correctly force a new resource and your changes will have persisted to state, preventing further plans from correctly triggering a diff.

    These changes only update Terraform state when applied. Hence, it is safe to run when the virtual machine is running. If more settings are modified, you may need to plan maintenance accordingly for any necessary virtual machine re-configurations.

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    vSphere pulumi/pulumi-vsphere
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the vsphere Terraform Provider.
    vsphere logo
    Viewing docs for vSphere v4.16.4
    published on Tuesday, Mar 24, 2026 by Pulumi
      Try Pulumi Cloud free. Your team will thank you.