1. Packages
  2. ESXi Native
  3. API Docs
  4. VirtualMachine
ESXi Native v1.0.0 published on Monday, Aug 28, 2023 by pulumiverse

esxi-native.VirtualMachine

Explore with Pulumi AI

esxi-native logo
ESXi Native v1.0.0 published on Monday, Aug 28, 2023 by pulumiverse

    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,
                       disk_store: Optional[str] = None,
                       num_v_cpus: Optional[int] = None,
                       startup_timeout: Optional[int] = None,
                       clone_from_virtual_machine: Optional[str] = None,
                       boot_disk_type: Optional[DiskType] = None,
                       info: Optional[Sequence[KeyValuePairArgs]] = None,
                       mem_size: Optional[int] = None,
                       name: Optional[str] = None,
                       os: Optional[str] = None,
                       virtual_hw_ver: Optional[int] = None,
                       boot_firmware: Optional[BootFirmwareType] = None,
                       network_interfaces: Optional[Sequence[NetworkInterfaceArgs]] = None,
                       ovf_properties: Optional[Sequence[KeyValuePairArgs]] = None,
                       ovf_properties_timer: Optional[int] = None,
                       ovf_source: Optional[str] = None,
                       power: Optional[str] = None,
                       resource_pool_name: Optional[str] = None,
                       shutdown_timeout: Optional[int] = None,
                       boot_disk_size: Optional[int] = None,
                       virtual_disks: Optional[Sequence[VMVirtualDiskArgs]] = None,
                       notes: Optional[str] = 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: esxi-native: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.

    Example

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

    var virtualMachineResource = new EsxiNative.VirtualMachine("virtualMachineResource", new()
    {
        DiskStore = "string",
        NumVCpus = 0,
        StartupTimeout = 0,
        CloneFromVirtualMachine = "string",
        BootDiskType = EsxiNative.DiskType.Thin,
        Info = new[]
        {
            new EsxiNative.Inputs.KeyValuePairArgs
            {
                Key = "string",
                Value = "string",
            },
        },
        MemSize = 0,
        Name = "string",
        Os = "string",
        VirtualHWVer = 0,
        BootFirmware = EsxiNative.BootFirmwareType.BIOS,
        NetworkInterfaces = new[]
        {
            new EsxiNative.Inputs.NetworkInterfaceArgs
            {
                VirtualNetwork = "string",
                MacAddress = "string",
                NicType = "string",
            },
        },
        OvfProperties = new[]
        {
            new EsxiNative.Inputs.KeyValuePairArgs
            {
                Key = "string",
                Value = "string",
            },
        },
        OvfPropertiesTimer = 0,
        OvfSource = "string",
        Power = "string",
        ResourcePoolName = "string",
        ShutdownTimeout = 0,
        BootDiskSize = 0,
        VirtualDisks = new[]
        {
            new EsxiNative.Inputs.VMVirtualDiskArgs
            {
                VirtualDiskId = "string",
                Slot = "string",
            },
        },
        Notes = "string",
    });
    
    example, err := esxinative.NewVirtualMachine(ctx, "virtualMachineResource", &esxinative.VirtualMachineArgs{
    	DiskStore:               pulumi.String("string"),
    	NumVCpus:                pulumi.Int(0),
    	StartupTimeout:          pulumi.Int(0),
    	CloneFromVirtualMachine: pulumi.String("string"),
    	BootDiskType:            esxinative.DiskTypeThin,
    	Info: esxi.KeyValuePairArray{
    		&esxi.KeyValuePairArgs{
    			Key:   pulumi.String("string"),
    			Value: pulumi.String("string"),
    		},
    	},
    	MemSize:      pulumi.Int(0),
    	Name:         pulumi.String("string"),
    	Os:           pulumi.String("string"),
    	VirtualHWVer: pulumi.Int(0),
    	BootFirmware: esxinative.BootFirmwareTypeBIOS,
    	NetworkInterfaces: esxi.NetworkInterfaceArray{
    		&esxi.NetworkInterfaceArgs{
    			VirtualNetwork: pulumi.String("string"),
    			MacAddress:     pulumi.String("string"),
    			NicType:        pulumi.String("string"),
    		},
    	},
    	OvfProperties: esxi.KeyValuePairArray{
    		&esxi.KeyValuePairArgs{
    			Key:   pulumi.String("string"),
    			Value: pulumi.String("string"),
    		},
    	},
    	OvfPropertiesTimer: pulumi.Int(0),
    	OvfSource:          pulumi.String("string"),
    	Power:              pulumi.String("string"),
    	ResourcePoolName:   pulumi.String("string"),
    	ShutdownTimeout:    pulumi.Int(0),
    	BootDiskSize:       pulumi.Int(0),
    	VirtualDisks: esxi.VMVirtualDiskArray{
    		&esxi.VMVirtualDiskArgs{
    			VirtualDiskId: pulumi.String("string"),
    			Slot:          pulumi.String("string"),
    		},
    	},
    	Notes: pulumi.String("string"),
    })
    
    var virtualMachineResource = new VirtualMachine("virtualMachineResource", VirtualMachineArgs.builder()
        .diskStore("string")
        .numVCpus(0)
        .startupTimeout(0)
        .cloneFromVirtualMachine("string")
        .bootDiskType("thin")
        .info(KeyValuePairArgs.builder()
            .key("string")
            .value("string")
            .build())
        .memSize(0)
        .name("string")
        .os("string")
        .virtualHWVer(0)
        .bootFirmware("bios")
        .networkInterfaces(NetworkInterfaceArgs.builder()
            .virtualNetwork("string")
            .macAddress("string")
            .nicType("string")
            .build())
        .ovfProperties(KeyValuePairArgs.builder()
            .key("string")
            .value("string")
            .build())
        .ovfPropertiesTimer(0)
        .ovfSource("string")
        .power("string")
        .resourcePoolName("string")
        .shutdownTimeout(0)
        .bootDiskSize(0)
        .virtualDisks(VMVirtualDiskArgs.builder()
            .virtualDiskId("string")
            .slot("string")
            .build())
        .notes("string")
        .build());
    
    virtual_machine_resource = esxi_native.VirtualMachine("virtualMachineResource",
        disk_store="string",
        num_v_cpus=0,
        startup_timeout=0,
        clone_from_virtual_machine="string",
        boot_disk_type=esxi_native.DiskType.THIN,
        info=[esxi_native.KeyValuePairArgs(
            key="string",
            value="string",
        )],
        mem_size=0,
        name="string",
        os="string",
        virtual_hw_ver=0,
        boot_firmware=esxi_native.BootFirmwareType.BIOS,
        network_interfaces=[esxi_native.NetworkInterfaceArgs(
            virtual_network="string",
            mac_address="string",
            nic_type="string",
        )],
        ovf_properties=[esxi_native.KeyValuePairArgs(
            key="string",
            value="string",
        )],
        ovf_properties_timer=0,
        ovf_source="string",
        power="string",
        resource_pool_name="string",
        shutdown_timeout=0,
        boot_disk_size=0,
        virtual_disks=[esxi_native.VMVirtualDiskArgs(
            virtual_disk_id="string",
            slot="string",
        )],
        notes="string")
    
    const virtualMachineResource = new esxi_native.VirtualMachine("virtualMachineResource", {
        diskStore: "string",
        numVCpus: 0,
        startupTimeout: 0,
        cloneFromVirtualMachine: "string",
        bootDiskType: esxi_native.DiskType.Thin,
        info: [{
            key: "string",
            value: "string",
        }],
        memSize: 0,
        name: "string",
        os: "string",
        virtualHWVer: 0,
        bootFirmware: esxi_native.BootFirmwareType.BIOS,
        networkInterfaces: [{
            virtualNetwork: "string",
            macAddress: "string",
            nicType: "string",
        }],
        ovfProperties: [{
            key: "string",
            value: "string",
        }],
        ovfPropertiesTimer: 0,
        ovfSource: "string",
        power: "string",
        resourcePoolName: "string",
        shutdownTimeout: 0,
        bootDiskSize: 0,
        virtualDisks: [{
            virtualDiskId: "string",
            slot: "string",
        }],
        notes: "string",
    });
    
    type: esxi-native:VirtualMachine
    properties:
        bootDiskSize: 0
        bootDiskType: thin
        bootFirmware: bios
        cloneFromVirtualMachine: string
        diskStore: string
        info:
            - key: string
              value: string
        memSize: 0
        name: string
        networkInterfaces:
            - macAddress: string
              nicType: string
              virtualNetwork: string
        notes: string
        numVCpus: 0
        os: string
        ovfProperties:
            - key: string
              value: string
        ovfPropertiesTimer: 0
        ovfSource: string
        power: string
        resourcePoolName: string
        shutdownTimeout: 0
        startupTimeout: 0
        virtualDisks:
            - slot: string
              virtualDiskId: string
        virtualHWVer: 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

    The VirtualMachine resource accepts the following input properties:

    DiskStore string
    esxi diskstore for boot disk.
    BootDiskSize int
    VM boot disk size. Will expand boot disk to this size.
    BootDiskType Pulumiverse.EsxiNative.DiskType
    VM boot disk type. thin, zeroedthick, eagerzeroedthick
    BootFirmware Pulumiverse.EsxiNative.BootFirmwareType
    Boot type('efi' is boot uefi mode)
    CloneFromVirtualMachine string
    Source vm path on esxi host to clone.
    Info List<Pulumiverse.EsxiNative.Inputs.KeyValuePair>
    pass data to VM
    MemSize int
    VM memory size.
    Name string
    esxi vm name.
    NetworkInterfaces List<Pulumiverse.EsxiNative.Inputs.NetworkInterface>
    VM network interfaces.
    Notes string
    VM memory size.
    NumVCpus int
    VM number of virtual cpus.
    Os string
    VM OS type.
    OvfProperties List<Pulumiverse.EsxiNative.Inputs.KeyValuePair>
    VM OVF properties.
    OvfPropertiesTimer int
    The amount of time, in seconds, to wait for the guest to boot and run ovfProperties. (0-6000)
    OvfSource string
    Path or URL of ovf file source.
    Power string
    VM power state.
    ResourcePoolName string
    Resource pool name to place vm.
    ShutdownTimeout int
    The amount of vm uptime, in seconds, to wait for an available IP address on this virtual machine. (0-600)
    StartupTimeout int
    The amount of vm uptime, in seconds, to wait for an available IP address on this virtual machine. (0-600)
    VirtualDisks List<Pulumiverse.EsxiNative.Inputs.VMVirtualDisk>
    VM virtual disks.
    VirtualHWVer int
    VM Virtual HW version.
    DiskStore string
    esxi diskstore for boot disk.
    BootDiskSize int
    VM boot disk size. Will expand boot disk to this size.
    BootDiskType DiskType
    VM boot disk type. thin, zeroedthick, eagerzeroedthick
    BootFirmware BootFirmwareType
    Boot type('efi' is boot uefi mode)
    CloneFromVirtualMachine string
    Source vm path on esxi host to clone.
    Info []KeyValuePairArgs
    pass data to VM
    MemSize int
    VM memory size.
    Name string
    esxi vm name.
    NetworkInterfaces []NetworkInterfaceArgs
    VM network interfaces.
    Notes string
    VM memory size.
    NumVCpus int
    VM number of virtual cpus.
    Os string
    VM OS type.
    OvfProperties []KeyValuePairArgs
    VM OVF properties.
    OvfPropertiesTimer int
    The amount of time, in seconds, to wait for the guest to boot and run ovfProperties. (0-6000)
    OvfSource string
    Path or URL of ovf file source.
    Power string
    VM power state.
    ResourcePoolName string
    Resource pool name to place vm.
    ShutdownTimeout int
    The amount of vm uptime, in seconds, to wait for an available IP address on this virtual machine. (0-600)
    StartupTimeout int
    The amount of vm uptime, in seconds, to wait for an available IP address on this virtual machine. (0-600)
    VirtualDisks []VMVirtualDiskArgs
    VM virtual disks.
    VirtualHWVer int
    VM Virtual HW version.
    diskStore String
    esxi diskstore for boot disk.
    bootDiskSize Integer
    VM boot disk size. Will expand boot disk to this size.
    bootDiskType DiskType
    VM boot disk type. thin, zeroedthick, eagerzeroedthick
    bootFirmware BootFirmwareType
    Boot type('efi' is boot uefi mode)
    cloneFromVirtualMachine String
    Source vm path on esxi host to clone.
    info List<KeyValuePair>
    pass data to VM
    memSize Integer
    VM memory size.
    name String
    esxi vm name.
    networkInterfaces List<NetworkInterface>
    VM network interfaces.
    notes String
    VM memory size.
    numVCpus Integer
    VM number of virtual cpus.
    os String
    VM OS type.
    ovfProperties List<KeyValuePair>
    VM OVF properties.
    ovfPropertiesTimer Integer
    The amount of time, in seconds, to wait for the guest to boot and run ovfProperties. (0-6000)
    ovfSource String
    Path or URL of ovf file source.
    power String
    VM power state.
    resourcePoolName String
    Resource pool name to place vm.
    shutdownTimeout Integer
    The amount of vm uptime, in seconds, to wait for an available IP address on this virtual machine. (0-600)
    startupTimeout Integer
    The amount of vm uptime, in seconds, to wait for an available IP address on this virtual machine. (0-600)
    virtualDisks List<VMVirtualDisk>
    VM virtual disks.
    virtualHWVer Integer
    VM Virtual HW version.
    diskStore string
    esxi diskstore for boot disk.
    bootDiskSize number
    VM boot disk size. Will expand boot disk to this size.
    bootDiskType DiskType
    VM boot disk type. thin, zeroedthick, eagerzeroedthick
    bootFirmware BootFirmwareType
    Boot type('efi' is boot uefi mode)
    cloneFromVirtualMachine string
    Source vm path on esxi host to clone.
    info KeyValuePair[]
    pass data to VM
    memSize number
    VM memory size.
    name string
    esxi vm name.
    networkInterfaces NetworkInterface[]
    VM network interfaces.
    notes string
    VM memory size.
    numVCpus number
    VM number of virtual cpus.
    os string
    VM OS type.
    ovfProperties KeyValuePair[]
    VM OVF properties.
    ovfPropertiesTimer number
    The amount of time, in seconds, to wait for the guest to boot and run ovfProperties. (0-6000)
    ovfSource string
    Path or URL of ovf file source.
    power string
    VM power state.
    resourcePoolName string
    Resource pool name to place vm.
    shutdownTimeout number
    The amount of vm uptime, in seconds, to wait for an available IP address on this virtual machine. (0-600)
    startupTimeout number
    The amount of vm uptime, in seconds, to wait for an available IP address on this virtual machine. (0-600)
    virtualDisks VMVirtualDisk[]
    VM virtual disks.
    virtualHWVer number
    VM Virtual HW version.
    disk_store str
    esxi diskstore for boot disk.
    boot_disk_size int
    VM boot disk size. Will expand boot disk to this size.
    boot_disk_type DiskType
    VM boot disk type. thin, zeroedthick, eagerzeroedthick
    boot_firmware BootFirmwareType
    Boot type('efi' is boot uefi mode)
    clone_from_virtual_machine str
    Source vm path on esxi host to clone.
    info Sequence[KeyValuePairArgs]
    pass data to VM
    mem_size int
    VM memory size.
    name str
    esxi vm name.
    network_interfaces Sequence[NetworkInterfaceArgs]
    VM network interfaces.
    notes str
    VM memory size.
    num_v_cpus int
    VM number of virtual cpus.
    os str
    VM OS type.
    ovf_properties Sequence[KeyValuePairArgs]
    VM OVF properties.
    ovf_properties_timer int
    The amount of time, in seconds, to wait for the guest to boot and run ovfProperties. (0-6000)
    ovf_source str
    Path or URL of ovf file source.
    power str
    VM power state.
    resource_pool_name str
    Resource pool name to place vm.
    shutdown_timeout int
    The amount of vm uptime, in seconds, to wait for an available IP address on this virtual machine. (0-600)
    startup_timeout int
    The amount of vm uptime, in seconds, to wait for an available IP address on this virtual machine. (0-600)
    virtual_disks Sequence[VMVirtualDiskArgs]
    VM virtual disks.
    virtual_hw_ver int
    VM Virtual HW version.
    diskStore String
    esxi diskstore for boot disk.
    bootDiskSize Number
    VM boot disk size. Will expand boot disk to this size.
    bootDiskType "thin" | "zeroedthick" | "eagerzeroedthick"
    VM boot disk type. thin, zeroedthick, eagerzeroedthick
    bootFirmware "bios" | "efi"
    Boot type('efi' is boot uefi mode)
    cloneFromVirtualMachine String
    Source vm path on esxi host to clone.
    info List<Property Map>
    pass data to VM
    memSize Number
    VM memory size.
    name String
    esxi vm name.
    networkInterfaces List<Property Map>
    VM network interfaces.
    notes String
    VM memory size.
    numVCpus Number
    VM number of virtual cpus.
    os String
    VM OS type.
    ovfProperties List<Property Map>
    VM OVF properties.
    ovfPropertiesTimer Number
    The amount of time, in seconds, to wait for the guest to boot and run ovfProperties. (0-6000)
    ovfSource String
    Path or URL of ovf file source.
    power String
    VM power state.
    resourcePoolName String
    Resource pool name to place vm.
    shutdownTimeout Number
    The amount of vm uptime, in seconds, to wait for an available IP address on this virtual machine. (0-600)
    startupTimeout Number
    The amount of vm uptime, in seconds, to wait for an available IP address on this virtual machine. (0-600)
    virtualDisks List<Property Map>
    VM virtual disks.
    virtualHWVer Number
    VM Virtual HW version.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    IpAddress string
    The IP address reported by VMWare tools.
    Id string
    The provider-assigned unique ID for this managed resource.
    IpAddress string
    The IP address reported by VMWare tools.
    id String
    The provider-assigned unique ID for this managed resource.
    ipAddress String
    The IP address reported by VMWare tools.
    id string
    The provider-assigned unique ID for this managed resource.
    ipAddress string
    The IP address reported by VMWare tools.
    id str
    The provider-assigned unique ID for this managed resource.
    ip_address str
    The IP address reported by VMWare tools.
    id String
    The provider-assigned unique ID for this managed resource.
    ipAddress String
    The IP address reported by VMWare tools.

    Supporting Types

    BootFirmwareType, BootFirmwareTypeArgs

    BIOS
    bios
    EFI
    efi
    BootFirmwareTypeBIOS
    bios
    BootFirmwareTypeEFI
    efi
    BIOS
    bios
    EFI
    efi
    BIOS
    bios
    EFI
    efi
    BIOS
    bios
    EFI
    efi
    "bios"
    bios
    "efi"
    efi

    DiskType, DiskTypeArgs

    Thin
    thin
    ZeroedThick
    zeroedthick
    EagerZeroedThick
    eagerzeroedthick
    DiskTypeThin
    thin
    DiskTypeZeroedThick
    zeroedthick
    DiskTypeEagerZeroedThick
    eagerzeroedthick
    Thin
    thin
    ZeroedThick
    zeroedthick
    EagerZeroedThick
    eagerzeroedthick
    Thin
    thin
    ZeroedThick
    zeroedthick
    EagerZeroedThick
    eagerzeroedthick
    THIN
    thin
    ZEROED_THICK
    zeroedthick
    EAGER_ZEROED_THICK
    eagerzeroedthick
    "thin"
    thin
    "zeroedthick"
    zeroedthick
    "eagerzeroedthick"
    eagerzeroedthick

    KeyValuePair, KeyValuePairArgs

    Key string
    Value string
    Key string
    Value string
    key String
    value String
    key string
    value string
    key str
    value str
    key String
    value String

    NetworkInterface, NetworkInterfaceArgs

    VirtualNetwork string
    MacAddress string
    NicType string
    VirtualNetwork string
    MacAddress string
    NicType string
    virtualNetwork String
    macAddress String
    nicType String
    virtualNetwork string
    macAddress string
    nicType string
    virtualNetwork String
    macAddress String
    nicType String

    VMVirtualDisk, VMVirtualDiskArgs

    VirtualDiskId string
    Slot string
    SCSI_Ctrl:SCSI_id. Range '0:1' to '0:15'. SCSI_id 7 is not allowed.
    VirtualDiskId string
    Slot string
    SCSI_Ctrl:SCSI_id. Range '0:1' to '0:15'. SCSI_id 7 is not allowed.
    virtualDiskId String
    slot String
    SCSI_Ctrl:SCSI_id. Range '0:1' to '0:15'. SCSI_id 7 is not allowed.
    virtualDiskId string
    slot string
    SCSI_Ctrl:SCSI_id. Range '0:1' to '0:15'. SCSI_id 7 is not allowed.
    virtual_disk_id str
    slot str
    SCSI_Ctrl:SCSI_id. Range '0:1' to '0:15'. SCSI_id 7 is not allowed.
    virtualDiskId String
    slot String
    SCSI_Ctrl:SCSI_id. Range '0:1' to '0:15'. SCSI_id 7 is not allowed.

    Package Details

    Repository
    esxi-native pulumiverse/pulumi-esxi-native
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the Terraform Provider terraform-provider-esxi.
    esxi-native logo
    ESXi Native v1.0.0 published on Monday, Aug 28, 2023 by pulumiverse