import * as pulumi from "@pulumi/pulumi";
import * as inputs from "./types/input";
import * as outputs from "./types/output";
/**
* Creates a Virtual Machine with the provided configuration.
*
* ## Example
*
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as nutanix from "@pierskarsenbarg/nutanix";
* import * as std from "@pulumi/std";
*
* const vm_1 = new nutanix.VirtualMachineV2("vm-1", {
* name: "example-vm-1",
* description: "vm desc",
* numCoresPerSocket: 1,
* numSockets: 1,
* clusters: [{
* extId: "1cefd0f5-6d38-4c9b-a07c-bdd2db004224",
* }],
* });
* const vm_2 = new nutanix.VirtualMachineV2("vm-2", {
* name: "example-vm-2",
* description: "vm desc",
* numCoresPerSocket: 1,
* numSockets: 1,
* clusters: [{
* extId: "1cefd0f5-6d38-4c9b-a07c-bdd2db004224",
* }],
* projects: [{
* extId: "2defe0f5-6e48-4c9b-b07c-bdd2dc004225",
* }],
* disks: [{
* diskAddresses: [{
* busType: "SCSI",
* index: 0,
* }],
* backingInfos: [{
* vmDisks: [{
* diskSizeBytes: 1073741824,
* storageContainers: [{
* extId: "1cefd0f5-6d38-4c9b-a07c-bdd2db004224",
* }],
* }],
* }],
* }],
* bootConfigs: [{
* uefiBoots: [{
* bootOrders: [
* "NETWORK",
* "DISK",
* "CDROM",
* ],
* }],
* }],
* });
* const vm_3 = new nutanix.VirtualMachineV2("vm-3", {
* name: "terraform-example-vm-4-disks",
* numCoresPerSocket: 1,
* numSockets: 1,
* clusters: [{
* extId: "1cefd0f5-6d38-4c9b-a07c-bdd2db004224",
* }],
* projects: [{
* extId: "2defe0f5-6e48-4c9b-b07c-bdd2dc004225",
* }],
* disks: [
* {
* diskAddresses: [{
* busType: "SCSI",
* index: 0,
* }],
* backingInfos: [{
* vmDisks: [{
* dataSources: [{
* references: [{
* imageReferences: [{
* imageExtId: "59ec786c-4311-4225-affe-68b65c5ebf10",
* }],
* }],
* }],
* diskSizeBytes: std.pow({
* base: 1024,
* exponent: 3,
* }).then(invoke => 20 * invoke.result),
* }],
* }],
* },
* {
* diskAddresses: [{
* busType: "SCSI",
* index: 1,
* }],
* backingInfos: [{
* vmDisks: [{
* diskSizeBytes: std.pow({
* base: 1024,
* exponent: 3,
* }).then(invoke => 10 * invoke.result),
* storageContainers: [{
* extId: "5d9b5941-fec3-4996-9d31-f31bed1c7735",
* }],
* }],
* }],
* },
* {
* diskAddresses: [{
* busType: "SCSI",
* index: 2,
* }],
* backingInfos: [{
* vmDisks: [{
* diskSizeBytes: std.pow({
* base: 1024,
* exponent: 3,
* }).then(invoke => 15 * invoke.result),
* storageContainers: [{
* extId: "5d9b5941-fec3-4996-9d31-f31bed1c7735",
* }],
* }],
* }],
* },
* {
* diskAddresses: [{
* busType: "SCSI",
* index: 3,
* }],
* backingInfos: [{
* vmDisks: [{
* diskSizeBytes: std.pow({
* base: 1024,
* exponent: 3,
* }).then(invoke => 20 * invoke.result),
* storageContainers: [{
* extId: "5d9b5941-fec3-4996-9d31-f31bed1c7735",
* }],
* }],
* }],
* },
* ],
* nics: [{
* nicNetworkInfo: {
* virtualEthernetNicNetworkInfo: {
* nicType: "NORMAL_NIC",
* subnets: [{
* extId: "7f66e20f-67f4-473f-96bb-c4fcfd487f16",
* }],
* vlanMode: "ACCESS",
* },
* },
* }],
* bootConfigs: [{
* legacyBoots: [{
* bootOrders: [
* "CDROM",
* "DISK",
* "NETWORK",
* ],
* }],
* }],
* powerState: "ON",
* });
* ```
*
*
* ## Lifecycle Behavior
*
* > Important: Updates to `guestCustomization` are treated as create-time only changes and will force the VM to be replaced.
*
* Guest customization settings such as `config.cloud_init` and `config.sysprep` are consumed during the initial boot of the virtual machine and are not re-applied on later updates.
*
* As a result, changing the `guestCustomization` block causes Terraform to destroy and recreate the `nutanix.VirtualMachineV2` resource instead of performing an in-place update.
*
* This behavior applies to both:
*
* - Sysprep-based guest customization for Windows VMs
* - cloud-init based guest customization for Linux VMs
*
* > Note: Replacing the VM creates a new virtual machine instance. Make sure any dependent systems, references, or post-provisioning steps are updated accordingly before applying the change.
*/
export declare class VirtualMachineV2 extends pulumi.CustomResource {
/**
* Get an existing VirtualMachineV2 resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state Any extra arguments used during the lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name: string, id: pulumi.Input, state?: VirtualMachineV2State, opts?: pulumi.CustomResourceOptions): VirtualMachineV2;
/**
* Returns true if the given object is an instance of VirtualMachineV2. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj: any): obj is VirtualMachineV2;
/**
* Advanced Processor Compatibility configuration for the VM. Enabling this retains the CPU model for the VM across power cycles and migrations.
*/
readonly apcConfigs: pulumi.Output;
readonly availabilityZones: pulumi.Output;
/**
* BIOS UUID of the VM. It should be of type UUID.
*/
readonly biosUuid: pulumi.Output;
/**
* Indicates the order of device types in which the VM should try to boot from. If the boot device order is not provided the system will decide an appropriate boot device order.
*/
readonly bootConfigs: pulumi.Output;
/**
* Categories for the VM.
*/
readonly categories: pulumi.Output;
/**
* CD-ROMs attached to the VM.
*/
readonly cdRoms: pulumi.Output;
/**
* Reference to a cluster.
*/
readonly clusters: pulumi.Output;
/**
* VM creation time
*/
readonly createTime: pulumi.Output;
/**
* VM description
*/
readonly description: pulumi.Output;
/**
* Disks attached to the VM.
*/
readonly disks: pulumi.Output;
/**
* The list of additional CPU features to be enabled. HardwareVirtualization: Indicates whether hardware assisted virtualization should be enabled for the Guest OS or not. Once enabled, the Guest OS can deploy a nested hypervisor. Valid values are "HARDWARE_VIRTUALIZATION".
*/
readonly enabledCpuFeatures: pulumi.Output;
/**
* A globally unique identifier of an instance that is suitable for external consumption.
*/
readonly extId: pulumi.Output;
/**
* Generation UUID of the VM. It should be of type UUID.
*/
readonly generationUuid: pulumi.Output;
/**
* GPUs attached to the VM.
*/
readonly gpuses: pulumi.Output;
/**
* Stage a Sysprep or cloud-init configuration file to be used by the guest for the next boot. Note that the Sysprep command must be used to generalize the Windows VMs before triggering this API call.
*/
readonly guestCustomizations: pulumi.Output;
/**
* The details about Nutanix Guest Tools for a VM.
*/
readonly guestTools: pulumi.Output;
/**
* VM hardware clock timezone in IANA TZDB format (America/Los_Angeles).
*/
readonly hardwareClockTimezone: pulumi.Output;
/**
* Reference to the host, the VM is running on.
*/
readonly hosts: pulumi.Output;
/**
* Indicates whether the VM is an agent VM or not. When their host enters maintenance mode, once the normal VMs are evacuated, the agent VMs are powered off. When the host is restored, agent VMs are powered on before the normal VMs are restored. In other words, agent VMs cannot be HA-protected or live migrated.
*/
readonly isAgentVm: pulumi.Output;
/**
* Indicates whether to remove AHV branding from VM firmware tables or not.
*/
readonly isBrandingEnabled: pulumi.Output;
/**
* Indicates whether the VM CPU hotplug is enabled.
*/
readonly isCpuHotplugEnabled: pulumi.Output;
/**
* Indicates whether to passthrough the host CPU features to the guest or not. Enabling this will make VM incapable of live migration.
*/
readonly isCpuPassthroughEnabled: pulumi.Output;
/**
* Indicates whether the vGPU console is enabled or not.
*/
readonly isGpuConsoleEnabled: pulumi.Output;
/**
* Indicates whether the memory overcommit feature should be enabled for the VM or not. If enabled, parts of the VM memory may reside outside of the hypervisor physical memory. Once enabled, it should be expected that the VM may suffer performance degradation.
*/
readonly isMemoryOvercommitEnabled: pulumi.Output;
/**
* Indicates whether the VM SCSI controller is enabled.
*/
readonly isScsiControllerEnabled: pulumi.Output;
/**
* Indicates whether the vCPUs should be hard pinned to specific pCPUs or not.
*/
readonly isVcpuHardPinningEnabled: pulumi.Output;
/**
* Indicates whether the VGA console should be disabled or not.
*/
readonly isVgaConsoleEnabled: pulumi.Output;
/**
* Machine type for the VM. Machine type Q35 is required for secure boot and does not support IDE disks. Valid values are "PSERIES", "Q35", "PC" .
*/
readonly machineType: pulumi.Output;
/**
* Memory size in bytes.
*/
readonly memorySizeBytes: pulumi.Output;
/**
* VM name.
*/
readonly name: pulumi.Output;
/**
* NICs attached to the VM.
*/
readonly nics: pulumi.Output;
/**
* Number of cores per socket. Value should be at least 1.
*/
readonly numCoresPerSocket: pulumi.Output;
/**
* Number of NUMA nodes. 0 means NUMA is disabled.
*/
readonly numNumaNodes: pulumi.Output;
/**
* Number of vCPU sockets. Value should be at least 1.
*/
readonly numSockets: pulumi.Output;
/**
* Number of threads per core. Value should be at least 1.
*/
readonly numThreadsPerCore: pulumi.Output;
/**
* Ownership information for the VM.
*/
readonly ownershipInfos: pulumi.Output;
readonly powerState: pulumi.Output;
/**
* Reference to a project.
*/
readonly projects: pulumi.Output;
/**
* Status of protection policy applied to this VM.
*/
readonly protectionPolicyStates: pulumi.Output;
/**
* The type of protection applied on a VM. Valid values "PD_PROTECTED", "UNPROTECTED", "RULE_PROTECTED".
*/
readonly protectionType: pulumi.Output;
/**
* Serial ports configured on the VM.
*/
readonly serialPorts: pulumi.Output;
/**
* Reference to an entity that the VM should be cloned or created from. Valid values are "VM", "VM_RECOVERY_POINT".
*/
readonly sources: pulumi.Output;
/**
* Storage configuration for VM.
*/
readonly storageConfigs: pulumi.Output;
/**
* VM last updated time.
*/
readonly updateTime: pulumi.Output;
/**
* Indicates how the vTPM for the VM should be configured.
*/
readonly vtpmConfigs: pulumi.Output;
/**
* Create a VirtualMachineV2 resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args?: VirtualMachineV2Args, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering VirtualMachineV2 resources.
*/
export interface VirtualMachineV2State {
/**
* Advanced Processor Compatibility configuration for the VM. Enabling this retains the CPU model for the VM across power cycles and migrations.
*/
apcConfigs?: pulumi.Input[] | undefined>;
availabilityZones?: pulumi.Input[] | undefined>;
/**
* BIOS UUID of the VM. It should be of type UUID.
*/
biosUuid?: pulumi.Input;
/**
* Indicates the order of device types in which the VM should try to boot from. If the boot device order is not provided the system will decide an appropriate boot device order.
*/
bootConfigs?: pulumi.Input[] | undefined>;
/**
* Categories for the VM.
*/
categories?: pulumi.Input[] | undefined>;
/**
* CD-ROMs attached to the VM.
*/
cdRoms?: pulumi.Input[] | undefined>;
/**
* Reference to a cluster.
*/
clusters?: pulumi.Input[] | undefined>;
/**
* VM creation time
*/
createTime?: pulumi.Input;
/**
* VM description
*/
description?: pulumi.Input;
/**
* Disks attached to the VM.
*/
disks?: pulumi.Input[] | undefined>;
/**
* The list of additional CPU features to be enabled. HardwareVirtualization: Indicates whether hardware assisted virtualization should be enabled for the Guest OS or not. Once enabled, the Guest OS can deploy a nested hypervisor. Valid values are "HARDWARE_VIRTUALIZATION".
*/
enabledCpuFeatures?: pulumi.Input[] | undefined>;
/**
* A globally unique identifier of an instance that is suitable for external consumption.
*/
extId?: pulumi.Input;
/**
* Generation UUID of the VM. It should be of type UUID.
*/
generationUuid?: pulumi.Input;
/**
* GPUs attached to the VM.
*/
gpuses?: pulumi.Input[] | undefined>;
/**
* Stage a Sysprep or cloud-init configuration file to be used by the guest for the next boot. Note that the Sysprep command must be used to generalize the Windows VMs before triggering this API call.
*/
guestCustomizations?: pulumi.Input[] | undefined>;
/**
* The details about Nutanix Guest Tools for a VM.
*/
guestTools?: pulumi.Input[] | undefined>;
/**
* VM hardware clock timezone in IANA TZDB format (America/Los_Angeles).
*/
hardwareClockTimezone?: pulumi.Input;
/**
* Reference to the host, the VM is running on.
*/
hosts?: pulumi.Input[] | undefined>;
/**
* Indicates whether the VM is an agent VM or not. When their host enters maintenance mode, once the normal VMs are evacuated, the agent VMs are powered off. When the host is restored, agent VMs are powered on before the normal VMs are restored. In other words, agent VMs cannot be HA-protected or live migrated.
*/
isAgentVm?: pulumi.Input;
/**
* Indicates whether to remove AHV branding from VM firmware tables or not.
*/
isBrandingEnabled?: pulumi.Input;
/**
* Indicates whether the VM CPU hotplug is enabled.
*/
isCpuHotplugEnabled?: pulumi.Input;
/**
* Indicates whether to passthrough the host CPU features to the guest or not. Enabling this will make VM incapable of live migration.
*/
isCpuPassthroughEnabled?: pulumi.Input;
/**
* Indicates whether the vGPU console is enabled or not.
*/
isGpuConsoleEnabled?: pulumi.Input;
/**
* Indicates whether the memory overcommit feature should be enabled for the VM or not. If enabled, parts of the VM memory may reside outside of the hypervisor physical memory. Once enabled, it should be expected that the VM may suffer performance degradation.
*/
isMemoryOvercommitEnabled?: pulumi.Input;
/**
* Indicates whether the VM SCSI controller is enabled.
*/
isScsiControllerEnabled?: pulumi.Input;
/**
* Indicates whether the vCPUs should be hard pinned to specific pCPUs or not.
*/
isVcpuHardPinningEnabled?: pulumi.Input;
/**
* Indicates whether the VGA console should be disabled or not.
*/
isVgaConsoleEnabled?: pulumi.Input;
/**
* Machine type for the VM. Machine type Q35 is required for secure boot and does not support IDE disks. Valid values are "PSERIES", "Q35", "PC" .
*/
machineType?: pulumi.Input;
/**
* Memory size in bytes.
*/
memorySizeBytes?: pulumi.Input;
/**
* VM name.
*/
name?: pulumi.Input;
/**
* NICs attached to the VM.
*/
nics?: pulumi.Input[] | undefined>;
/**
* Number of cores per socket. Value should be at least 1.
*/
numCoresPerSocket?: pulumi.Input;
/**
* Number of NUMA nodes. 0 means NUMA is disabled.
*/
numNumaNodes?: pulumi.Input;
/**
* Number of vCPU sockets. Value should be at least 1.
*/
numSockets?: pulumi.Input;
/**
* Number of threads per core. Value should be at least 1.
*/
numThreadsPerCore?: pulumi.Input;
/**
* Ownership information for the VM.
*/
ownershipInfos?: pulumi.Input[] | undefined>;
powerState?: pulumi.Input;
/**
* Reference to a project.
*/
projects?: pulumi.Input[] | undefined>;
/**
* Status of protection policy applied to this VM.
*/
protectionPolicyStates?: pulumi.Input[] | undefined>;
/**
* The type of protection applied on a VM. Valid values "PD_PROTECTED", "UNPROTECTED", "RULE_PROTECTED".
*/
protectionType?: pulumi.Input;
/**
* Serial ports configured on the VM.
*/
serialPorts?: pulumi.Input[] | undefined>;
/**
* Reference to an entity that the VM should be cloned or created from. Valid values are "VM", "VM_RECOVERY_POINT".
*/
sources?: pulumi.Input[] | undefined>;
/**
* Storage configuration for VM.
*/
storageConfigs?: pulumi.Input[] | undefined>;
/**
* VM last updated time.
*/
updateTime?: pulumi.Input;
/**
* Indicates how the vTPM for the VM should be configured.
*/
vtpmConfigs?: pulumi.Input[] | undefined>;
}
/**
* The set of arguments for constructing a VirtualMachineV2 resource.
*/
export interface VirtualMachineV2Args {
/**
* Advanced Processor Compatibility configuration for the VM. Enabling this retains the CPU model for the VM across power cycles and migrations.
*/
apcConfigs?: pulumi.Input[] | undefined>;
availabilityZones?: pulumi.Input[] | undefined>;
/**
* BIOS UUID of the VM. It should be of type UUID.
*/
biosUuid?: pulumi.Input;
/**
* Indicates the order of device types in which the VM should try to boot from. If the boot device order is not provided the system will decide an appropriate boot device order.
*/
bootConfigs?: pulumi.Input[] | undefined>;
/**
* Categories for the VM.
*/
categories?: pulumi.Input[] | undefined>;
/**
* CD-ROMs attached to the VM.
*/
cdRoms?: pulumi.Input[] | undefined>;
/**
* Reference to a cluster.
*/
clusters?: pulumi.Input[] | undefined>;
/**
* VM description
*/
description?: pulumi.Input;
/**
* Disks attached to the VM.
*/
disks?: pulumi.Input[] | undefined>;
/**
* The list of additional CPU features to be enabled. HardwareVirtualization: Indicates whether hardware assisted virtualization should be enabled for the Guest OS or not. Once enabled, the Guest OS can deploy a nested hypervisor. Valid values are "HARDWARE_VIRTUALIZATION".
*/
enabledCpuFeatures?: pulumi.Input[] | undefined>;
/**
* Generation UUID of the VM. It should be of type UUID.
*/
generationUuid?: pulumi.Input;
/**
* GPUs attached to the VM.
*/
gpuses?: pulumi.Input[] | undefined>;
/**
* Stage a Sysprep or cloud-init configuration file to be used by the guest for the next boot. Note that the Sysprep command must be used to generalize the Windows VMs before triggering this API call.
*/
guestCustomizations?: pulumi.Input[] | undefined>;
/**
* The details about Nutanix Guest Tools for a VM.
*/
guestTools?: pulumi.Input[] | undefined>;
/**
* VM hardware clock timezone in IANA TZDB format (America/Los_Angeles).
*/
hardwareClockTimezone?: pulumi.Input;
/**
* Reference to the host, the VM is running on.
*/
hosts?: pulumi.Input[] | undefined>;
/**
* Indicates whether the VM is an agent VM or not. When their host enters maintenance mode, once the normal VMs are evacuated, the agent VMs are powered off. When the host is restored, agent VMs are powered on before the normal VMs are restored. In other words, agent VMs cannot be HA-protected or live migrated.
*/
isAgentVm?: pulumi.Input;
/**
* Indicates whether to remove AHV branding from VM firmware tables or not.
*/
isBrandingEnabled?: pulumi.Input;
/**
* Indicates whether the VM CPU hotplug is enabled.
*/
isCpuHotplugEnabled?: pulumi.Input;
/**
* Indicates whether to passthrough the host CPU features to the guest or not. Enabling this will make VM incapable of live migration.
*/
isCpuPassthroughEnabled?: pulumi.Input;
/**
* Indicates whether the vGPU console is enabled or not.
*/
isGpuConsoleEnabled?: pulumi.Input;
/**
* Indicates whether the memory overcommit feature should be enabled for the VM or not. If enabled, parts of the VM memory may reside outside of the hypervisor physical memory. Once enabled, it should be expected that the VM may suffer performance degradation.
*/
isMemoryOvercommitEnabled?: pulumi.Input;
/**
* Indicates whether the VM SCSI controller is enabled.
*/
isScsiControllerEnabled?: pulumi.Input;
/**
* Indicates whether the vCPUs should be hard pinned to specific pCPUs or not.
*/
isVcpuHardPinningEnabled?: pulumi.Input;
/**
* Indicates whether the VGA console should be disabled or not.
*/
isVgaConsoleEnabled?: pulumi.Input;
/**
* Machine type for the VM. Machine type Q35 is required for secure boot and does not support IDE disks. Valid values are "PSERIES", "Q35", "PC" .
*/
machineType?: pulumi.Input;
/**
* Memory size in bytes.
*/
memorySizeBytes?: pulumi.Input;
/**
* VM name.
*/
name?: pulumi.Input;
/**
* NICs attached to the VM.
*/
nics?: pulumi.Input[] | undefined>;
/**
* Number of cores per socket. Value should be at least 1.
*/
numCoresPerSocket?: pulumi.Input;
/**
* Number of NUMA nodes. 0 means NUMA is disabled.
*/
numNumaNodes?: pulumi.Input;
/**
* Number of vCPU sockets. Value should be at least 1.
*/
numSockets?: pulumi.Input;
/**
* Number of threads per core. Value should be at least 1.
*/
numThreadsPerCore?: pulumi.Input;
/**
* Ownership information for the VM.
*/
ownershipInfos?: pulumi.Input[] | undefined>;
powerState?: pulumi.Input;
/**
* Reference to a project.
*/
projects?: pulumi.Input[] | undefined>;
/**
* Status of protection policy applied to this VM.
*/
protectionPolicyStates?: pulumi.Input[] | undefined>;
/**
* The type of protection applied on a VM. Valid values "PD_PROTECTED", "UNPROTECTED", "RULE_PROTECTED".
*/
protectionType?: pulumi.Input;
/**
* Serial ports configured on the VM.
*/
serialPorts?: pulumi.Input[] | undefined>;
/**
* Reference to an entity that the VM should be cloned or created from. Valid values are "VM", "VM_RECOVERY_POINT".
*/
sources?: pulumi.Input[] | undefined>;
/**
* Storage configuration for VM.
*/
storageConfigs?: pulumi.Input[] | undefined>;
/**
* Indicates how the vTPM for the VM should be configured.
*/
vtpmConfigs?: pulumi.Input[] | undefined>;
}
//# sourceMappingURL=virtualMachineV2.d.ts.map