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

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 This property is required. string
The unique name of the resource.
args This property is required. VirtualMachineArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. 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 This property is required. string
The unique name of the resource.
args This property is required. VirtualMachineArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. VirtualMachineArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. 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 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",
});
Copy
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"),
})
Copy
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());
Copy
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=[{
        "key": "string",
        "value": "string",
    }],
    mem_size=0,
    name="string",
    os="string",
    virtual_hw_ver=0,
    boot_firmware=esxi_native.BootFirmwareType.BIOS,
    network_interfaces=[{
        "virtual_network": "string",
        "mac_address": "string",
        "nic_type": "string",
    }],
    ovf_properties=[{
        "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=[{
        "virtual_disk_id": "string",
        "slot": "string",
    }],
    notes="string")
Copy
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",
});
Copy
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
Copy

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:

DiskStore
This property is required.
Changes to this property will trigger replacement.
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 Changes to this property will trigger replacement. string
Source vm path on esxi host to clone.
Info Changes to this property will trigger replacement. List<Pulumiverse.EsxiNative.Inputs.KeyValuePair>
pass data to VM
MemSize int
VM memory size.
Name Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. string
Path or URL of ovf file source.
Power string
VM power state.
ResourcePoolName Changes to this property will trigger replacement. 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
This property is required.
Changes to this property will trigger replacement.
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 Changes to this property will trigger replacement. string
Source vm path on esxi host to clone.
Info Changes to this property will trigger replacement. []KeyValuePairArgs
pass data to VM
MemSize int
VM memory size.
Name Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. string
Path or URL of ovf file source.
Power string
VM power state.
ResourcePoolName Changes to this property will trigger replacement. 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
This property is required.
Changes to this property will trigger replacement.
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 Changes to this property will trigger replacement. String
Source vm path on esxi host to clone.
info Changes to this property will trigger replacement. List<KeyValuePair>
pass data to VM
memSize Integer
VM memory size.
name Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. String
Path or URL of ovf file source.
power String
VM power state.
resourcePoolName Changes to this property will trigger replacement. 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
This property is required.
Changes to this property will trigger replacement.
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 Changes to this property will trigger replacement. string
Source vm path on esxi host to clone.
info Changes to this property will trigger replacement. KeyValuePair[]
pass data to VM
memSize number
VM memory size.
name Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. string
Path or URL of ovf file source.
power string
VM power state.
resourcePoolName Changes to this property will trigger replacement. 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
This property is required.
Changes to this property will trigger replacement.
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 Changes to this property will trigger replacement. str
Source vm path on esxi host to clone.
info Changes to this property will trigger replacement. Sequence[KeyValuePairArgs]
pass data to VM
mem_size int
VM memory size.
name Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. str
Path or URL of ovf file source.
power str
VM power state.
resource_pool_name Changes to this property will trigger replacement. 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
This property is required.
Changes to this property will trigger replacement.
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 Changes to this property will trigger replacement. String
Source vm path on esxi host to clone.
info Changes to this property will trigger replacement. List<Property Map>
pass data to VM
memSize Number
VM memory size.
name Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. String
Path or URL of ovf file source.
power String
VM power state.
resourcePoolName Changes to this property will trigger replacement. 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 This property is required. string
Value This property is required. string
Key This property is required. string
Value This property is required. string
key This property is required. String
value This property is required. String
key This property is required. string
value This property is required. string
key This property is required. str
value This property is required. str
key This property is required. String
value This property is required. String

NetworkInterface
, NetworkInterfaceArgs

VirtualNetwork This property is required. string
MacAddress string
NicType string
VirtualNetwork This property is required. string
MacAddress string
NicType string
virtualNetwork This property is required. String
macAddress String
nicType String
virtualNetwork This property is required. string
macAddress string
nicType string
virtual_network This property is required. str
mac_address str
nic_type str
virtualNetwork This property is required. String
macAddress String
nicType String

VMVirtualDisk
, VMVirtualDiskArgs

VirtualDiskId This property is required. string
Slot string
SCSI_Ctrl:SCSI_id. Range '0:1' to '0:15'. SCSI_id 7 is not allowed.
VirtualDiskId This property is required. string
Slot string
SCSI_Ctrl:SCSI_id. Range '0:1' to '0:15'. SCSI_id 7 is not allowed.
virtualDiskId This property is required. String
slot String
SCSI_Ctrl:SCSI_id. Range '0:1' to '0:15'. SCSI_id 7 is not allowed.
virtualDiskId This property is required. string
slot string
SCSI_Ctrl:SCSI_id. Range '0:1' to '0:15'. SCSI_id 7 is not allowed.
virtual_disk_id This property is required. str
slot str
SCSI_Ctrl:SCSI_id. Range '0:1' to '0:15'. SCSI_id 7 is not allowed.
virtualDiskId This property is required. 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.