import * as pulumi from "@pulumi/pulumi"; import * as inputs from "./types/input"; import * as outputs from "./types/output"; /** * Provides a Nutanix Virtual Machine resource to Create a virtual machine. * * ## Example Usage * * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as nutanix from "@pierskarsenbarg/nutanix"; * * const clusters = nutanix.getClusters({}); * const vm1 = new nutanix.VirtualMachine("vm1", { * name: "test-dou", * clusterUuid: clusters.then(clusters => clusters.entities?.[0]?.metadata?.uuid), * categories: [{ * name: "Environment", * value: "Staging", * }], * numVcpusPerSocket: 1, * numSockets: 1, * memorySizeMib: 2048, * }); * ``` * * * ### With Storage Config * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as nutanix from "@pierskarsenbarg/nutanix"; * * const clusters = nutanix.getClusters({}); * const vm = new nutanix.VirtualMachine("vm", { * name: "myVm", * clusterUuid: clusters.then(clusters => clusters.entities?.[0]?.metadata?.uuid), * numVcpusPerSocket: 1, * numSockets: 1, * memorySizeMib: 186, * diskLists: [{ * diskSizeBytes: 68157440, * diskSizeMib: 65, * storageConfig: { * storageContainerReferences: [{ * kind: "storage_container", * uuid: "2bbe67bc-fd14-4637-8de1-6379257f4219", * }], * }, * }], * }); * ``` * * * ## Import * * Nutanix Virtual machines can be imported using the `UUID` eg, * * `terraform import nutanix_virtual_machine.vm01 0F75E6A7-55FB-44D9-A50D-14AD72E2CF7C * ` */ export declare class VirtualMachine extends pulumi.CustomResource { /** * Get an existing VirtualMachine 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?: VirtualMachineState, opts?: pulumi.CustomResourceOptions): VirtualMachine; /** * Returns true if the given object is an instance of VirtualMachine. 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 VirtualMachine; /** * The version of the API. */ readonly apiVersion: pulumi.Output; /** * - (Optional) The reference to a availability_zone. */ readonly availabilityZoneReference: pulumi.Output<{ [key: string]: string; }>; /** * - (Optional) Address of disk to boot from. */ readonly bootDeviceDiskAddress: pulumi.Output<{ [key: string]: string; }>; /** * - (Optional) MAC address of nic to boot from. */ readonly bootDeviceMacAddress: pulumi.Output; /** * - (Optional) Indicates the order of device types in which VM should try to boot from. If boot device order is not provided the system will decide appropriate boot device order. */ readonly bootDeviceOrderLists: pulumi.Output; /** * - (Optional) Indicates whether the VM should use Secure boot, UEFI boot or Legacy boot.If UEFI or; Secure boot is enabled then other legacy boot options (like bootDevice and; boot_device_order_list) are ignored. Secure boot depends on UEFI boot, i.e. enabling; Secure boot means that UEFI boot is also enabled. The possible value are: UEFI", "LEGACY", "SECURE_BOOT". */ readonly bootType: pulumi.Output; /** * - (Optional) Categories for the vm. */ readonly categories: pulumi.Output; readonly cloudInitCdromUuid: pulumi.Output; /** * - The name of the cluster. */ readonly clusterName: pulumi.Output; /** * - (Required) The UUID of the cluster. */ readonly clusterUuid: pulumi.Output; /** * - (Optional) A description for vm. */ readonly description: pulumi.Output; /** * Disks attached to the VM. */ readonly diskLists: pulumi.Output; /** * - (Optional) Add true to enable CPU passthrough. */ readonly enableCpuPassthrough: pulumi.Output; /** * - (Optional) Extra configs related to power state transition. Indicates whether to execute set script before ngt shutdown/reboot. */ readonly enableScriptExec: pulumi.Output; /** * - (Optional) GPUs attached to the VM. */ readonly gpuLists: pulumi.Output; /** * - (Optional) Generic key value pair used for custom attributes in cloud init. */ readonly guestCustomizationCloudInitCustomKeyValues: pulumi.Output<{ [key: string]: string; }>; /** * The contents of the metaData configuration for cloud-init. This can be formatted as YAML or JSON. The value must be base64 encoded. */ readonly guestCustomizationCloudInitMetaData: pulumi.Output; /** * - (Optional) The contents of the userData configuration for cloud-init. This can be formatted as YAML, JSON, or could be a shell script. The value must be base64 encoded. */ readonly guestCustomizationCloudInitUserData: pulumi.Output; /** * - (Optional) Flag to allow override of customization by deployer. */ readonly guestCustomizationIsOverridable: pulumi.Output; /** * - (Optional) VM guests may be customized at boot time using one of several different methods. Currently, cloud-init w/ ConfigDriveV2 (for Linux VMs) and Sysprep (for Windows VMs) are supported. Only ONE OF sysprep or cloudInit should be provided. Note that guest customization can currently only be set during VM creation. Attempting to change it after creation will result in an error. Additional properties can be specified. For example - in the context of VM template creation if \"override_script\" is set to \"True\" then the deployer can upload their own custom script. */ readonly guestCustomizationSysprep: pulumi.Output<{ [key: string]: string; }>; /** * - (Optional) Generic key value pair used for custom attributes in sysprep. */ readonly guestCustomizationSysprepCustomKeyValues: pulumi.Output<{ [key: string]: string; }>; /** * - (Optional) Guest OS Identifier. For ESX, refer to VMware documentation [link](https://www.vmware.com/support/developer/converter-sdk/conv43_apireference/vim.vm.GuestOsDescriptor.GuestOsIdentifier.html) for the list of guest OS identifiers. */ readonly guestOsId: pulumi.Output; /** * - (Optional) VM's hardware clock timezone in IANA TZDB format (America/Los_Angeles). */ readonly hardwareClockTimezone: pulumi.Output; /** * - Reference to a host. */ readonly hostReference: pulumi.Output<{ [key: string]: string; }>; /** * - The hypervisor type for the hypervisor the VM is hosted on. */ readonly hypervisorType: pulumi.Output; /** * - (Optional) Add true to enable CPU pinning. */ readonly isVcpuHardPinned: pulumi.Output; /** * - Machine type for the VM. Machine type Q35 is required for secure boot and does not support IDE disks. */ readonly machineType: pulumi.Output; /** * - (Optional) Memory size in MiB. On updating memory to powered ON VMs should only be done in 1GB increments. */ readonly memorySizeMib: pulumi.Output; /** * - The vm kind metadata. */ readonly metadata: pulumi.Output<{ [key: string]: string; }>; /** * - (Required) The name for the vm. */ readonly name: pulumi.Output; /** * - (Ooptional) Credentials to login server. */ readonly ngtCredentials: pulumi.Output<{ [key: string]: string; }>; /** * Application names that are enabled. */ readonly ngtEnabledCapabilityLists: pulumi.Output; /** * - Status NICs attached to the VM. */ readonly nicListStatuses: pulumi.Output; /** * - (Optional) Spec NICs attached to the VM. */ readonly nicLists: pulumi.Output; /** * - (Optional) Number of vCPU sockets. */ readonly numSockets: pulumi.Output; /** * - (Optional) Number of vCPUs per socket. */ readonly numVcpusPerSocket: pulumi.Output; /** * - (Optional) Number of vNUMA nodes. 0 means vNUMA is disabled. */ readonly numVnumaNodes: pulumi.Output; /** * - (Optional) Information regarding Nutanix Guest Tools. */ readonly nutanixGuestTools: pulumi.Output<{ [key: string]: string; }>; /** * - (Optional) The reference to a user. */ readonly ownerReference: pulumi.Output<{ [key: string]: string; }>; /** * - (Optional) Reference to an entity that the VM cloned from. */ readonly parentReference: pulumi.Output<{ [key: string]: string; }>; /** * - (Optional) The current or desired power state of the VM. (Options : ON , OFF) */ readonly powerState: pulumi.Output; /** * - (Optional) Indicates the mechanism guiding the VM power state transition. Currently used for the transition to \"OFF\" state. Power state mechanism (ACPI/GUEST/HARD). */ readonly powerStateMechanism: pulumi.Output; /** * - (Optional) The reference to a project. */ readonly projectReference: pulumi.Output<{ [key: string]: string; }>; /** * - (Optional) Serial Ports configured on the VM. */ readonly serialPortLists: pulumi.Output; /** * - (Optional) Extra configs related to power state transition. Indicates whether to abort ngt shutdown/reboot if script fails. */ readonly shouldFailOnScriptFailure: pulumi.Output; /** * - The state of the vm. */ readonly state: pulumi.Output; /** * - (Optional) Use Hot Add when modifying VM resources. Passing value false will result in VM reboots. Default value is `true`. */ readonly useHotAdd: pulumi.Output; /** * - (Optional) Indicates whether VGA console should be enabled or not. */ readonly vgaConsoleEnabled: pulumi.Output; /** * Create a VirtualMachine 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: VirtualMachineArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering VirtualMachine resources. */ export interface VirtualMachineState { /** * The version of the API. */ apiVersion?: pulumi.Input; /** * - (Optional) The reference to a availability_zone. */ availabilityZoneReference?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * - (Optional) Address of disk to boot from. */ bootDeviceDiskAddress?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * - (Optional) MAC address of nic to boot from. */ bootDeviceMacAddress?: pulumi.Input; /** * - (Optional) Indicates the order of device types in which VM should try to boot from. If boot device order is not provided the system will decide appropriate boot device order. */ bootDeviceOrderLists?: pulumi.Input[] | undefined>; /** * - (Optional) Indicates whether the VM should use Secure boot, UEFI boot or Legacy boot.If UEFI or; Secure boot is enabled then other legacy boot options (like bootDevice and; boot_device_order_list) are ignored. Secure boot depends on UEFI boot, i.e. enabling; Secure boot means that UEFI boot is also enabled. The possible value are: UEFI", "LEGACY", "SECURE_BOOT". */ bootType?: pulumi.Input; /** * - (Optional) Categories for the vm. */ categories?: pulumi.Input[] | undefined>; cloudInitCdromUuid?: pulumi.Input; /** * - The name of the cluster. */ clusterName?: pulumi.Input; /** * - (Required) The UUID of the cluster. */ clusterUuid?: pulumi.Input; /** * - (Optional) A description for vm. */ description?: pulumi.Input; /** * Disks attached to the VM. */ diskLists?: pulumi.Input[] | undefined>; /** * - (Optional) Add true to enable CPU passthrough. */ enableCpuPassthrough?: pulumi.Input; /** * - (Optional) Extra configs related to power state transition. Indicates whether to execute set script before ngt shutdown/reboot. */ enableScriptExec?: pulumi.Input; /** * - (Optional) GPUs attached to the VM. */ gpuLists?: pulumi.Input[] | undefined>; /** * - (Optional) Generic key value pair used for custom attributes in cloud init. */ guestCustomizationCloudInitCustomKeyValues?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * The contents of the metaData configuration for cloud-init. This can be formatted as YAML or JSON. The value must be base64 encoded. */ guestCustomizationCloudInitMetaData?: pulumi.Input; /** * - (Optional) The contents of the userData configuration for cloud-init. This can be formatted as YAML, JSON, or could be a shell script. The value must be base64 encoded. */ guestCustomizationCloudInitUserData?: pulumi.Input; /** * - (Optional) Flag to allow override of customization by deployer. */ guestCustomizationIsOverridable?: pulumi.Input; /** * - (Optional) VM guests may be customized at boot time using one of several different methods. Currently, cloud-init w/ ConfigDriveV2 (for Linux VMs) and Sysprep (for Windows VMs) are supported. Only ONE OF sysprep or cloudInit should be provided. Note that guest customization can currently only be set during VM creation. Attempting to change it after creation will result in an error. Additional properties can be specified. For example - in the context of VM template creation if \"override_script\" is set to \"True\" then the deployer can upload their own custom script. */ guestCustomizationSysprep?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * - (Optional) Generic key value pair used for custom attributes in sysprep. */ guestCustomizationSysprepCustomKeyValues?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * - (Optional) Guest OS Identifier. For ESX, refer to VMware documentation [link](https://www.vmware.com/support/developer/converter-sdk/conv43_apireference/vim.vm.GuestOsDescriptor.GuestOsIdentifier.html) for the list of guest OS identifiers. */ guestOsId?: pulumi.Input; /** * - (Optional) VM's hardware clock timezone in IANA TZDB format (America/Los_Angeles). */ hardwareClockTimezone?: pulumi.Input; /** * - Reference to a host. */ hostReference?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * - The hypervisor type for the hypervisor the VM is hosted on. */ hypervisorType?: pulumi.Input; /** * - (Optional) Add true to enable CPU pinning. */ isVcpuHardPinned?: pulumi.Input; /** * - Machine type for the VM. Machine type Q35 is required for secure boot and does not support IDE disks. */ machineType?: pulumi.Input; /** * - (Optional) Memory size in MiB. On updating memory to powered ON VMs should only be done in 1GB increments. */ memorySizeMib?: pulumi.Input; /** * - The vm kind metadata. */ metadata?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * - (Required) The name for the vm. */ name?: pulumi.Input; /** * - (Ooptional) Credentials to login server. */ ngtCredentials?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * Application names that are enabled. */ ngtEnabledCapabilityLists?: pulumi.Input[] | undefined>; /** * - Status NICs attached to the VM. */ nicListStatuses?: pulumi.Input[] | undefined>; /** * - (Optional) Spec NICs attached to the VM. */ nicLists?: pulumi.Input[] | undefined>; /** * - (Optional) Number of vCPU sockets. */ numSockets?: pulumi.Input; /** * - (Optional) Number of vCPUs per socket. */ numVcpusPerSocket?: pulumi.Input; /** * - (Optional) Number of vNUMA nodes. 0 means vNUMA is disabled. */ numVnumaNodes?: pulumi.Input; /** * - (Optional) Information regarding Nutanix Guest Tools. */ nutanixGuestTools?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * - (Optional) The reference to a user. */ ownerReference?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * - (Optional) Reference to an entity that the VM cloned from. */ parentReference?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * - (Optional) The current or desired power state of the VM. (Options : ON , OFF) */ powerState?: pulumi.Input; /** * - (Optional) Indicates the mechanism guiding the VM power state transition. Currently used for the transition to \"OFF\" state. Power state mechanism (ACPI/GUEST/HARD). */ powerStateMechanism?: pulumi.Input; /** * - (Optional) The reference to a project. */ projectReference?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * - (Optional) Serial Ports configured on the VM. */ serialPortLists?: pulumi.Input[] | undefined>; /** * - (Optional) Extra configs related to power state transition. Indicates whether to abort ngt shutdown/reboot if script fails. */ shouldFailOnScriptFailure?: pulumi.Input; /** * - The state of the vm. */ state?: pulumi.Input; /** * - (Optional) Use Hot Add when modifying VM resources. Passing value false will result in VM reboots. Default value is `true`. */ useHotAdd?: pulumi.Input; /** * - (Optional) Indicates whether VGA console should be enabled or not. */ vgaConsoleEnabled?: pulumi.Input; } /** * The set of arguments for constructing a VirtualMachine resource. */ export interface VirtualMachineArgs { /** * - (Optional) The reference to a availability_zone. */ availabilityZoneReference?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * - (Optional) Address of disk to boot from. */ bootDeviceDiskAddress?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * - (Optional) MAC address of nic to boot from. */ bootDeviceMacAddress?: pulumi.Input; /** * - (Optional) Indicates the order of device types in which VM should try to boot from. If boot device order is not provided the system will decide appropriate boot device order. */ bootDeviceOrderLists?: pulumi.Input[] | undefined>; /** * - (Optional) Indicates whether the VM should use Secure boot, UEFI boot or Legacy boot.If UEFI or; Secure boot is enabled then other legacy boot options (like bootDevice and; boot_device_order_list) are ignored. Secure boot depends on UEFI boot, i.e. enabling; Secure boot means that UEFI boot is also enabled. The possible value are: UEFI", "LEGACY", "SECURE_BOOT". */ bootType?: pulumi.Input; /** * - (Optional) Categories for the vm. */ categories?: pulumi.Input[] | undefined>; cloudInitCdromUuid?: pulumi.Input; /** * - (Required) The UUID of the cluster. */ clusterUuid: pulumi.Input; /** * - (Optional) A description for vm. */ description?: pulumi.Input; /** * Disks attached to the VM. */ diskLists?: pulumi.Input[] | undefined>; /** * - (Optional) Add true to enable CPU passthrough. */ enableCpuPassthrough?: pulumi.Input; /** * - (Optional) Extra configs related to power state transition. Indicates whether to execute set script before ngt shutdown/reboot. */ enableScriptExec?: pulumi.Input; /** * - (Optional) GPUs attached to the VM. */ gpuLists?: pulumi.Input[] | undefined>; /** * - (Optional) Generic key value pair used for custom attributes in cloud init. */ guestCustomizationCloudInitCustomKeyValues?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * The contents of the metaData configuration for cloud-init. This can be formatted as YAML or JSON. The value must be base64 encoded. */ guestCustomizationCloudInitMetaData?: pulumi.Input; /** * - (Optional) The contents of the userData configuration for cloud-init. This can be formatted as YAML, JSON, or could be a shell script. The value must be base64 encoded. */ guestCustomizationCloudInitUserData?: pulumi.Input; /** * - (Optional) Flag to allow override of customization by deployer. */ guestCustomizationIsOverridable?: pulumi.Input; /** * - (Optional) VM guests may be customized at boot time using one of several different methods. Currently, cloud-init w/ ConfigDriveV2 (for Linux VMs) and Sysprep (for Windows VMs) are supported. Only ONE OF sysprep or cloudInit should be provided. Note that guest customization can currently only be set during VM creation. Attempting to change it after creation will result in an error. Additional properties can be specified. For example - in the context of VM template creation if \"override_script\" is set to \"True\" then the deployer can upload their own custom script. */ guestCustomizationSysprep?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * - (Optional) Generic key value pair used for custom attributes in sysprep. */ guestCustomizationSysprepCustomKeyValues?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * - (Optional) Guest OS Identifier. For ESX, refer to VMware documentation [link](https://www.vmware.com/support/developer/converter-sdk/conv43_apireference/vim.vm.GuestOsDescriptor.GuestOsIdentifier.html) for the list of guest OS identifiers. */ guestOsId?: pulumi.Input; /** * - (Optional) VM's hardware clock timezone in IANA TZDB format (America/Los_Angeles). */ hardwareClockTimezone?: pulumi.Input; /** * - (Optional) Add true to enable CPU pinning. */ isVcpuHardPinned?: pulumi.Input; /** * - Machine type for the VM. Machine type Q35 is required for secure boot and does not support IDE disks. */ machineType?: pulumi.Input; /** * - (Optional) Memory size in MiB. On updating memory to powered ON VMs should only be done in 1GB increments. */ memorySizeMib?: pulumi.Input; /** * - (Required) The name for the vm. */ name?: pulumi.Input; /** * - (Ooptional) Credentials to login server. */ ngtCredentials?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * Application names that are enabled. */ ngtEnabledCapabilityLists?: pulumi.Input[] | undefined>; /** * - (Optional) Spec NICs attached to the VM. */ nicLists?: pulumi.Input[] | undefined>; /** * - (Optional) Number of vCPU sockets. */ numSockets?: pulumi.Input; /** * - (Optional) Number of vCPUs per socket. */ numVcpusPerSocket?: pulumi.Input; /** * - (Optional) Number of vNUMA nodes. 0 means vNUMA is disabled. */ numVnumaNodes?: pulumi.Input; /** * - (Optional) Information regarding Nutanix Guest Tools. */ nutanixGuestTools?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * - (Optional) The reference to a user. */ ownerReference?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * - (Optional) Reference to an entity that the VM cloned from. */ parentReference?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * - (Optional) The current or desired power state of the VM. (Options : ON , OFF) */ powerState?: pulumi.Input; /** * - (Optional) Indicates the mechanism guiding the VM power state transition. Currently used for the transition to \"OFF\" state. Power state mechanism (ACPI/GUEST/HARD). */ powerStateMechanism?: pulumi.Input; /** * - (Optional) The reference to a project. */ projectReference?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * - (Optional) Serial Ports configured on the VM. */ serialPortLists?: pulumi.Input[] | undefined>; /** * - (Optional) Extra configs related to power state transition. Indicates whether to abort ngt shutdown/reboot if script fails. */ shouldFailOnScriptFailure?: pulumi.Input; /** * - (Optional) Use Hot Add when modifying VM resources. Passing value false will result in VM reboots. Default value is `true`. */ useHotAdd?: pulumi.Input; /** * - (Optional) Indicates whether VGA console should be enabled or not. */ vgaConsoleEnabled?: pulumi.Input; } //# sourceMappingURL=virtualMachine.d.ts.map