import * as pulumi from "@pulumi/pulumi"; import * as inputs from "./types/input"; import * as outputs from "./types/output"; /** * Manages a virtual machine. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as proxmoxve from "@muhlba91/pulumi-proxmoxve"; * import * as random from "@pulumi/random"; * import * as std from "@pulumi/std"; * import * as tls from "@pulumi/tls"; * * export = async () => { * const latestUbuntu22JammyQcow2Img = new proxmoxve.download.FileLegacy("latest_ubuntu_22_jammy_qcow2_img", { * contentType: "import", * datastoreId: "local", * nodeName: "pve", * url: "https://cloud-images.ubuntu.com/jammy/current/jammy-server-cloudimg-amd64.img", * fileName: "jammy-server-cloudimg-amd64.qcow2", * }); * const ubuntuVmPassword = new random.RandomPassword("ubuntu_vm_password", { * length: 16, * overrideSpecial: "_%@", * special: true, * }); * const ubuntuVmKey = new tls.PrivateKey("ubuntu_vm_key", { * algorithm: "RSA", * rsaBits: 2048, * }); * const ubuntuVm = new proxmoxve.VmLegacy("ubuntu_vm", { * serialDevices: [{}], * name: "terraform-provider-proxmox-ubuntu-vm", * description: "Managed by Pulumi", * tags: [ * "terraform", * "ubuntu", * ], * nodeName: "first-node", * vmId: 4321, * agent: { * enabled: false, * }, * stopOnDestroy: true, * startup: { * order: 3, * upDelay: 60, * downDelay: 60, * }, * cpu: { * cores: 2, * type: "x86-64-v2-AES", * }, * memory: { * dedicated: 2048, * floating: 2048, * }, * disks: [{ * datastoreId: "local-lvm", * importFrom: latestUbuntu22JammyQcow2Img.id, * "interface": "scsi0", * }], * initialization: { * ipConfigs: [{ * ipv4: { * address: "dhcp", * }, * }], * userAccount: { * keys: [std.trimspaceOutput({ * input: ubuntuVmKey.publicKeyOpenssh, * }).apply(invoke => invoke.result)], * password: ubuntuVmPassword.result, * username: "ubuntu", * }, * userDataFileId: cloudConfig.id, * }, * networkDevices: [{ * bridge: "vmbr0", * }], * operatingSystem: { * type: "l26", * }, * tpmState: { * version: "v2.0", * }, * virtiofs: [{ * mapping: "data_share", * cache: "always", * directIo: true, * }], * }); * return { * ubuntuVmPassword: ubuntuVmPassword.result, * ubuntuVmPrivateKey: ubuntuVmKey.privateKeyPem, * ubuntuVmPublicKey: ubuntuVmKey.publicKeyOpenssh, * }; * } * ``` * * ## Qemu guest agent * * Qemu-guest-agent is an application which can be installed inside guest VM, see * [Proxmox Wiki](https://pve.proxmox.com/wiki/Qemu-guest-agent) and [Proxmox * Documentation](https://pve.proxmox.com/pve-docs/pve-admin-guide.html#qm_qemu_agent) * * For VM with `agent.enabled = false`, Proxmox uses ACPI for `Shutdown` and * `Reboot`, and `qemu-guest-agent` is not needed inside the VM. For some VMs, * the shutdown process may not work, causing the VM to be stuck on destroying. * Add `stopOnDestroy = true` to the VM configuration to stop the VM instead of * shutting it down. * * Setting `agent.enabled = true` informs Proxmox that the guest agent is expected * to be *running* inside the VM. Proxmox then uses `qemu-guest-agent` instead of * ACPI to control the VM. If the agent is not running, Proxmox operations * `Shutdown` and `Reboot` time out and fail. The failing operation gets a lock on * the VM, and until the operation times out, other operations like `Stop` and * `Reboot` cannot be used. * * Do **not** run VM with `agent.enabled = true`, unless the VM is configured to * automatically **start** `qemu-guest-agent` at some point. * * "Monitor" tab in Proxmox GUI can be used to send low-level commands to `qemu`. * See the [documentation](https://www.qemu.org/docs/master/system/monitor.html). * Commands `systemPowerdown` and `quit` have proven useful in shutting down VMs * with `agent.enabled = true` and no agent running. * * Cloud images usually do not have `qemu-guest-agent` installed. It is possible to * install and *start* it using cloud-init, e.g. using custom `userDataFileId` * file. * * This provider requires `agent.enabled = true` to populate `ipv4Addresses`, * `ipv6Addresses` and `networkInterfaceNames` output attributes. * * Setting `agent.enabled = true` without running `qemu-guest-agent` in the VM will * also result in long timeouts when using the provider, both when creating VMs, * and when refreshing resources. The provider has no way to distinguish between * "qemu-guest-agent not installed" and "very long boot due to a disk check", it * trusts the user to set `agent.enabled` correctly and waits for * `qemu-guest-agent` to start. * * ## AMD SEV * * AMD SEV (-ES, -SNP) are security features for AMD processors. SEV-SNP support * is included in Proxmox version **8.4**, see Proxmox Wiki * and [Proxmox Documentation](https://pve.proxmox.com/pve-docs/pve-admin-guide.html#qm_memory_encryption) * for more information. * * `amd-sev` requires root and therefore `root@pam` auth. * * SEV-SNP requires `bios = OVMF` and a supported AMD CPU (`EPYC-v4` for instance), `machine = q35` is also advised. No EFI disk is required since SEV-SNP uses consolidated read-only firmware. A configured EFI will be ignored. * * All changes made to `amdSev` will trigger reboots. Removing or adding the `amdSev` block will force a replacement of the resource. Modifying the `amdSev` block will not trigger replacements. * * `allowSmt` is by default set to `true` even if `snp` is not the selected type. Proxmox will ignore this value when `snp` is not in use. Likewise `noKeySharing` is `false` by default but ignored by Proxmox when `snp` is in use. * * ## High Availability * * When managing a virtual machine in a multi-node cluster, the VM's HA settings can * be managed using the `proxmoxve.HaresourceLegacy` resource. * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as proxmoxve from "@muhlba91/pulumi-proxmoxve"; * * const ubuntuVm = new proxmoxve.VmLegacy("ubuntu_vm", { * name: "terraform-provider-proxmox-ubuntu-vm", * vmId: 4321, * }); * const ubuntuVmHaresourceLegacy = new proxmoxve.HaresourceLegacy("ubuntu_vm", { * resourceId: pulumi.interpolate`vm:${ubuntuVm.vmId}`, * group: "node1", * state: "started", * comment: "Managed by Pulumi", * }); * ``` * * ### HA-Aware Migration * * When changing the `nodeName` of an HA-managed VM, the provider automatically * handles the migration in an HA-aware manner: * * - **Running HA VMs**: Uses the HA manager's migrate endpoint for live migration * - **Stopped HA VMs**: Temporarily removes from HA, performs standard migration, * then re-adds to HA with the original configuration preserved * * > **PVE 9.x Required**: HA-aware migration requires Proxmox VE 9.x due to API * changes. On PVE 8.x, migrating HA-managed VMs will fail. As a workaround, * manually remove the VM from HA before changing `nodeName`, then re-add after * apply. * * ## Important Notes * * ### `local-lvm` Datastore * * The `local-lvm` is the **default datastore** for many configuration blocks, including `initialization` and `tpmState`, which may not seem to be related to "storage". * If you do not have `local-lvm` configured in your environment, you may need to explicitly set the `datastoreId` in such blocks to a different value. * * ### Cloning * * When cloning an existing virtual machine, whether it's a template or not, the * resource will inherit the disks and other configuration from the source VM. * * *If* you modify any attributes of an existing disk in the clone, you also need to\ * explicitly provide values for any other attributes that differ from the schema defaults\ * in the source (e.g., `size`, `discard`, `cache`, `aio`).\ * Otherwise, the schema defaults will take effect and override the source values. * * Furthermore, when cloning from one node to a different one, the behavior changes * depening on the datastores of the source VM. If at least one non-shared * datastore is used, the VM is first cloned to the source node before being * migrated to the target node. This circumvents a limitation in the Proxmox clone * API. * * Because the migration step after the clone tries to preserve the used * datastores by their name, it may fail if a datastore used in the source VM is * not available on the target node (e.g. `local-lvm` is used on the source node in * the VM but no `local-lvm` datastore is available on the target node). In this * case, it is recommended to set the `datastoreId` argument in the `clone` block * to force the migration step to migrate all disks to a specific datastore on the * target node. If you need certain disks to be on specific datastores, set * the `datastoreId` argument of the disks in the `disks` block to move the disks * to the correct datastore after the cloning and migrating succeeded. * * ## Import * * Instances can be imported using the `nodeName` and the `vmId`, e.g., * * ```sh * $ pulumi import proxmoxve:index/vmLegacy:VmLegacy ubuntu_vm first-node/4321 * ``` */ export declare class VmLegacy extends pulumi.CustomResource { /** * Get an existing VmLegacy 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?: VmLegacyState, opts?: pulumi.CustomResourceOptions): VmLegacy; /** * Returns true if the given object is an instance of VmLegacy. 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 VmLegacy; /** * Whether to enable ACPI (defaults to `true`). */ readonly acpi: pulumi.Output; /** * The QEMU agent configuration. */ readonly agent: pulumi.Output; /** * Secure Encrypted Virtualization (SEV) features by AMD CPUs. */ readonly amdSev: pulumi.Output; /** * An audio device. */ readonly audioDevice: pulumi.Output; /** * The BIOS implementation (defaults to `seabios`). */ readonly bios: pulumi.Output; /** * Specify a list of devices to boot from in the order they appear in the list. */ readonly bootOrders: pulumi.Output; /** * The CD-ROM configuration. */ readonly cdrom: pulumi.Output; /** * The cloning configuration. */ readonly clone: pulumi.Output; /** * The CPU configuration. */ readonly cpu: pulumi.Output; /** * Whether to delete unreferenced disks on destroy (defaults to `true`) */ readonly deleteUnreferencedDisksOnDestroy: pulumi.Output; /** * The description. */ readonly description: pulumi.Output; /** * A disk (multiple blocks supported). */ readonly disks: pulumi.Output; /** * The efi disk device (required if `bios` is set * to `ovmf`) */ readonly efiDisk: pulumi.Output; /** * The identifier for a file containing a hook script (needs to be executable, e.g. by using the `proxmox_virtual_environment_file.file_mode` attribute). */ readonly hookScriptFileId: pulumi.Output; /** * A host PCI device mapping (multiple blocks supported). */ readonly hostpcis: pulumi.Output; /** * Selectively enable hotplug features. Use `0` to * disable, `1` to enable all. Valid features: `disk`, `network`, `usb`, * `memory`, `cpu`. Memory hotplug requires NUMA to be enabled. If not set, * PVE defaults to `network,disk,usb`. When `disk` is included in the * hotplug list, disk resizes on a running VM are applied live without a * reboot. When `disk` is excluded, the provider will reboot the VM after * resize (controlled by `rebootAfterUpdate`). */ readonly hotplug: pulumi.Output; /** * The cloud-init configuration. */ readonly initialization: pulumi.Output; /** * The IPv4 addresses per network interface published by the * QEMU agent (empty list when `agent.enabled` is `false`) */ readonly ipv4Addresses: pulumi.Output; /** * The IPv6 addresses per network interface published by the * QEMU agent (empty list when `agent.enabled` is `false`) */ readonly ipv6Addresses: pulumi.Output; /** * The keyboard layout (defaults to `en-us`). */ readonly keyboardLayout: pulumi.Output; /** * Arbitrary arguments passed to kvm. */ readonly kvmArguments: pulumi.Output; /** * The MAC addresses published by the QEMU agent with fallback * to the network device configuration, if the agent is disabled */ readonly macAddresses: pulumi.Output; /** * The VM machine type (defaults to `pc`). */ readonly machine: pulumi.Output; /** * The memory configuration. */ readonly memory: pulumi.Output; /** * Migrate the VM on node change instead of re-creating * it (defaults to `false`). */ readonly migrate: pulumi.Output; /** * The virtual machine name. Must be a valid DNS name. */ readonly name: pulumi.Output; /** * A network device (multiple blocks supported). */ readonly networkDevices: pulumi.Output; /** * The network interface names published by the QEMU * agent (empty list when `agent.enabled` is `false`) */ readonly networkInterfaceNames: pulumi.Output; /** * The name of the node to assign the virtual machine * to. */ readonly nodeName: pulumi.Output; /** * The NUMA configuration. */ readonly numas: pulumi.Output; /** * Specifies whether a VM will be started during system * boot. (defaults to `true`) */ readonly onBoot: pulumi.Output; /** * The Operating System configuration. */ readonly operatingSystem: pulumi.Output; /** * The identifier for a pool to assign the virtual machine to. */ readonly poolId: pulumi.Output; /** * Sets the protection flag of the VM. This will disable the remove VM and remove disk operations (defaults to `false`). */ readonly protection: pulumi.Output; /** * Whether to purge the VM from backup configurations on destroy (defaults to `true`) */ readonly purgeOnDestroy: pulumi.Output; /** * Reboot the VM after initial creation (defaults to `false`). */ readonly reboot: pulumi.Output; /** * Whether the provider may automatically * reboot or power off the VM during update operations when required to apply * changes. If `false`, updates that require taking the VM offline fail * instead of being applied automatically. Changes that are applied * successfully but still need a later manual reboot emit a warning instead * (defaults to `true`). */ readonly rebootAfterUpdate: pulumi.Output; /** * The random number generator configuration. Can only be set by `root@pam.` */ readonly rngs: pulumi.Output; /** * The SCSI hardware type (defaults to * `virtio-scsi-pci`). */ readonly scsiHardware: pulumi.Output; /** * A serial device (multiple blocks supported). */ readonly serialDevices: pulumi.Output; /** * The SMBIOS (type1) settings for the VM. */ readonly smbios: pulumi.Output; /** * Whether to start the virtual machine (defaults * to `true`). */ readonly started: pulumi.Output; /** * Defines startup and shutdown behavior of the VM. */ readonly startup: pulumi.Output; /** * Whether to stop rather than shutdown on VM destroy (defaults to `false`) */ readonly stopOnDestroy: pulumi.Output; /** * Whether to enable the USB tablet device (defaults * to `true`). */ readonly tabletDevice: pulumi.Output; /** * A list of tags of the VM. This is only meta information ( * defaults to `[]`). Note: Proxmox always sorts the VM tags. If the list in * template is not sorted, then Proxmox will always report a difference on the * resource. You may use the `ignoreChanges` lifecycle meta-argument to ignore * changes to this attribute. */ readonly tags: pulumi.Output; /** * Whether the VM should be a template. Setting this * from `false` to `true` converts an existing VM to a template in place. * Converting a template back to a regular VM is not supported (defaults to * `false`). */ readonly template: pulumi.Output; /** * Timeout for cloning a VM in seconds (defaults to * 1800). */ readonly timeoutClone: pulumi.Output; /** * Timeout for creating a VM in seconds (defaults to * 1800). */ readonly timeoutCreate: pulumi.Output; /** * Timeout for migrating the VM (defaults to * 1800). */ readonly timeoutMigrate: pulumi.Output; /** * Disk move timeout * * @deprecated This field is deprecated and will be removed in a future release. An overall operation timeout (timeout_create / timeoutClone / timeout_migrate) is used instead. */ readonly timeoutMoveDisk: pulumi.Output; /** * Timeout for rebooting a VM in seconds (defaults * to 1800). */ readonly timeoutReboot: pulumi.Output; /** * Timeout for shutting down a VM in seconds ( * defaults to 1800). */ readonly timeoutShutdownVm: pulumi.Output; /** * Timeout for starting a VM in seconds (defaults * to 1800). */ readonly timeoutStartVm: pulumi.Output; /** * Timeout for stopping a VM in seconds (defaults * to 300). */ readonly timeoutStopVm: pulumi.Output; /** * The TPM state device. The VM must be stopped before * adding, removing, or moving a TPM state device; the provider automatically * handles the shutdown/start cycle. Changing `version` requires recreating the * VM because Proxmox only supports setting the TPM version at creation time. */ readonly tpmState: pulumi.Output; /** * A host USB device mapping (multiple blocks supported). */ readonly usbs: pulumi.Output; /** * The VGA configuration. */ readonly vga: pulumi.Output; /** * Virtiofs share */ readonly virtiofs: pulumi.Output; /** * The VM identifier. */ readonly vmId: pulumi.Output; /** * The watchdog configuration. Once enabled (by a guest action), the watchdog must be periodically polled by an agent inside the guest or else the watchdog will reset the guest (or execute the respective action specified). */ readonly watchdog: pulumi.Output; /** * Create a VmLegacy 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: VmLegacyArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering VmLegacy resources. */ export interface VmLegacyState { /** * Whether to enable ACPI (defaults to `true`). */ acpi?: pulumi.Input; /** * The QEMU agent configuration. */ agent?: pulumi.Input; /** * Secure Encrypted Virtualization (SEV) features by AMD CPUs. */ amdSev?: pulumi.Input; /** * An audio device. */ audioDevice?: pulumi.Input; /** * The BIOS implementation (defaults to `seabios`). */ bios?: pulumi.Input; /** * Specify a list of devices to boot from in the order they appear in the list. */ bootOrders?: pulumi.Input[] | undefined>; /** * The CD-ROM configuration. */ cdrom?: pulumi.Input; /** * The cloning configuration. */ clone?: pulumi.Input; /** * The CPU configuration. */ cpu?: pulumi.Input; /** * Whether to delete unreferenced disks on destroy (defaults to `true`) */ deleteUnreferencedDisksOnDestroy?: pulumi.Input; /** * The description. */ description?: pulumi.Input; /** * A disk (multiple blocks supported). */ disks?: pulumi.Input[] | undefined>; /** * The efi disk device (required if `bios` is set * to `ovmf`) */ efiDisk?: pulumi.Input; /** * The identifier for a file containing a hook script (needs to be executable, e.g. by using the `proxmox_virtual_environment_file.file_mode` attribute). */ hookScriptFileId?: pulumi.Input; /** * A host PCI device mapping (multiple blocks supported). */ hostpcis?: pulumi.Input[] | undefined>; /** * Selectively enable hotplug features. Use `0` to * disable, `1` to enable all. Valid features: `disk`, `network`, `usb`, * `memory`, `cpu`. Memory hotplug requires NUMA to be enabled. If not set, * PVE defaults to `network,disk,usb`. When `disk` is included in the * hotplug list, disk resizes on a running VM are applied live without a * reboot. When `disk` is excluded, the provider will reboot the VM after * resize (controlled by `rebootAfterUpdate`). */ hotplug?: pulumi.Input; /** * The cloud-init configuration. */ initialization?: pulumi.Input; /** * The IPv4 addresses per network interface published by the * QEMU agent (empty list when `agent.enabled` is `false`) */ ipv4Addresses?: pulumi.Input[]>[] | undefined>; /** * The IPv6 addresses per network interface published by the * QEMU agent (empty list when `agent.enabled` is `false`) */ ipv6Addresses?: pulumi.Input[]>[] | undefined>; /** * The keyboard layout (defaults to `en-us`). */ keyboardLayout?: pulumi.Input; /** * Arbitrary arguments passed to kvm. */ kvmArguments?: pulumi.Input; /** * The MAC addresses published by the QEMU agent with fallback * to the network device configuration, if the agent is disabled */ macAddresses?: pulumi.Input[] | undefined>; /** * The VM machine type (defaults to `pc`). */ machine?: pulumi.Input; /** * The memory configuration. */ memory?: pulumi.Input; /** * Migrate the VM on node change instead of re-creating * it (defaults to `false`). */ migrate?: pulumi.Input; /** * The virtual machine name. Must be a valid DNS name. */ name?: pulumi.Input; /** * A network device (multiple blocks supported). */ networkDevices?: pulumi.Input[] | undefined>; /** * The network interface names published by the QEMU * agent (empty list when `agent.enabled` is `false`) */ networkInterfaceNames?: pulumi.Input[] | undefined>; /** * The name of the node to assign the virtual machine * to. */ nodeName?: pulumi.Input; /** * The NUMA configuration. */ numas?: pulumi.Input[] | undefined>; /** * Specifies whether a VM will be started during system * boot. (defaults to `true`) */ onBoot?: pulumi.Input; /** * The Operating System configuration. */ operatingSystem?: pulumi.Input; /** * The identifier for a pool to assign the virtual machine to. */ poolId?: pulumi.Input; /** * Sets the protection flag of the VM. This will disable the remove VM and remove disk operations (defaults to `false`). */ protection?: pulumi.Input; /** * Whether to purge the VM from backup configurations on destroy (defaults to `true`) */ purgeOnDestroy?: pulumi.Input; /** * Reboot the VM after initial creation (defaults to `false`). */ reboot?: pulumi.Input; /** * Whether the provider may automatically * reboot or power off the VM during update operations when required to apply * changes. If `false`, updates that require taking the VM offline fail * instead of being applied automatically. Changes that are applied * successfully but still need a later manual reboot emit a warning instead * (defaults to `true`). */ rebootAfterUpdate?: pulumi.Input; /** * The random number generator configuration. Can only be set by `root@pam.` */ rngs?: pulumi.Input[] | undefined>; /** * The SCSI hardware type (defaults to * `virtio-scsi-pci`). */ scsiHardware?: pulumi.Input; /** * A serial device (multiple blocks supported). */ serialDevices?: pulumi.Input[] | undefined>; /** * The SMBIOS (type1) settings for the VM. */ smbios?: pulumi.Input; /** * Whether to start the virtual machine (defaults * to `true`). */ started?: pulumi.Input; /** * Defines startup and shutdown behavior of the VM. */ startup?: pulumi.Input; /** * Whether to stop rather than shutdown on VM destroy (defaults to `false`) */ stopOnDestroy?: pulumi.Input; /** * Whether to enable the USB tablet device (defaults * to `true`). */ tabletDevice?: pulumi.Input; /** * A list of tags of the VM. This is only meta information ( * defaults to `[]`). Note: Proxmox always sorts the VM tags. If the list in * template is not sorted, then Proxmox will always report a difference on the * resource. You may use the `ignoreChanges` lifecycle meta-argument to ignore * changes to this attribute. */ tags?: pulumi.Input[] | undefined>; /** * Whether the VM should be a template. Setting this * from `false` to `true` converts an existing VM to a template in place. * Converting a template back to a regular VM is not supported (defaults to * `false`). */ template?: pulumi.Input; /** * Timeout for cloning a VM in seconds (defaults to * 1800). */ timeoutClone?: pulumi.Input; /** * Timeout for creating a VM in seconds (defaults to * 1800). */ timeoutCreate?: pulumi.Input; /** * Timeout for migrating the VM (defaults to * 1800). */ timeoutMigrate?: pulumi.Input; /** * Disk move timeout * * @deprecated This field is deprecated and will be removed in a future release. An overall operation timeout (timeout_create / timeoutClone / timeout_migrate) is used instead. */ timeoutMoveDisk?: pulumi.Input; /** * Timeout for rebooting a VM in seconds (defaults * to 1800). */ timeoutReboot?: pulumi.Input; /** * Timeout for shutting down a VM in seconds ( * defaults to 1800). */ timeoutShutdownVm?: pulumi.Input; /** * Timeout for starting a VM in seconds (defaults * to 1800). */ timeoutStartVm?: pulumi.Input; /** * Timeout for stopping a VM in seconds (defaults * to 300). */ timeoutStopVm?: pulumi.Input; /** * The TPM state device. The VM must be stopped before * adding, removing, or moving a TPM state device; the provider automatically * handles the shutdown/start cycle. Changing `version` requires recreating the * VM because Proxmox only supports setting the TPM version at creation time. */ tpmState?: pulumi.Input; /** * A host USB device mapping (multiple blocks supported). */ usbs?: pulumi.Input[] | undefined>; /** * The VGA configuration. */ vga?: pulumi.Input; /** * Virtiofs share */ virtiofs?: pulumi.Input[] | undefined>; /** * The VM identifier. */ vmId?: pulumi.Input; /** * The watchdog configuration. Once enabled (by a guest action), the watchdog must be periodically polled by an agent inside the guest or else the watchdog will reset the guest (or execute the respective action specified). */ watchdog?: pulumi.Input; } /** * The set of arguments for constructing a VmLegacy resource. */ export interface VmLegacyArgs { /** * Whether to enable ACPI (defaults to `true`). */ acpi?: pulumi.Input; /** * The QEMU agent configuration. */ agent?: pulumi.Input; /** * Secure Encrypted Virtualization (SEV) features by AMD CPUs. */ amdSev?: pulumi.Input; /** * An audio device. */ audioDevice?: pulumi.Input; /** * The BIOS implementation (defaults to `seabios`). */ bios?: pulumi.Input; /** * Specify a list of devices to boot from in the order they appear in the list. */ bootOrders?: pulumi.Input[] | undefined>; /** * The CD-ROM configuration. */ cdrom?: pulumi.Input; /** * The cloning configuration. */ clone?: pulumi.Input; /** * The CPU configuration. */ cpu?: pulumi.Input; /** * Whether to delete unreferenced disks on destroy (defaults to `true`) */ deleteUnreferencedDisksOnDestroy?: pulumi.Input; /** * The description. */ description?: pulumi.Input; /** * A disk (multiple blocks supported). */ disks?: pulumi.Input[] | undefined>; /** * The efi disk device (required if `bios` is set * to `ovmf`) */ efiDisk?: pulumi.Input; /** * The identifier for a file containing a hook script (needs to be executable, e.g. by using the `proxmox_virtual_environment_file.file_mode` attribute). */ hookScriptFileId?: pulumi.Input; /** * A host PCI device mapping (multiple blocks supported). */ hostpcis?: pulumi.Input[] | undefined>; /** * Selectively enable hotplug features. Use `0` to * disable, `1` to enable all. Valid features: `disk`, `network`, `usb`, * `memory`, `cpu`. Memory hotplug requires NUMA to be enabled. If not set, * PVE defaults to `network,disk,usb`. When `disk` is included in the * hotplug list, disk resizes on a running VM are applied live without a * reboot. When `disk` is excluded, the provider will reboot the VM after * resize (controlled by `rebootAfterUpdate`). */ hotplug?: pulumi.Input; /** * The cloud-init configuration. */ initialization?: pulumi.Input; /** * The keyboard layout (defaults to `en-us`). */ keyboardLayout?: pulumi.Input; /** * Arbitrary arguments passed to kvm. */ kvmArguments?: pulumi.Input; /** * The MAC addresses published by the QEMU agent with fallback * to the network device configuration, if the agent is disabled */ macAddresses?: pulumi.Input[] | undefined>; /** * The VM machine type (defaults to `pc`). */ machine?: pulumi.Input; /** * The memory configuration. */ memory?: pulumi.Input; /** * Migrate the VM on node change instead of re-creating * it (defaults to `false`). */ migrate?: pulumi.Input; /** * The virtual machine name. Must be a valid DNS name. */ name?: pulumi.Input; /** * A network device (multiple blocks supported). */ networkDevices?: pulumi.Input[] | undefined>; /** * The name of the node to assign the virtual machine * to. */ nodeName: pulumi.Input; /** * The NUMA configuration. */ numas?: pulumi.Input[] | undefined>; /** * Specifies whether a VM will be started during system * boot. (defaults to `true`) */ onBoot?: pulumi.Input; /** * The Operating System configuration. */ operatingSystem?: pulumi.Input; /** * The identifier for a pool to assign the virtual machine to. */ poolId?: pulumi.Input; /** * Sets the protection flag of the VM. This will disable the remove VM and remove disk operations (defaults to `false`). */ protection?: pulumi.Input; /** * Whether to purge the VM from backup configurations on destroy (defaults to `true`) */ purgeOnDestroy?: pulumi.Input; /** * Reboot the VM after initial creation (defaults to `false`). */ reboot?: pulumi.Input; /** * Whether the provider may automatically * reboot or power off the VM during update operations when required to apply * changes. If `false`, updates that require taking the VM offline fail * instead of being applied automatically. Changes that are applied * successfully but still need a later manual reboot emit a warning instead * (defaults to `true`). */ rebootAfterUpdate?: pulumi.Input; /** * The random number generator configuration. Can only be set by `root@pam.` */ rngs?: pulumi.Input[] | undefined>; /** * The SCSI hardware type (defaults to * `virtio-scsi-pci`). */ scsiHardware?: pulumi.Input; /** * A serial device (multiple blocks supported). */ serialDevices?: pulumi.Input[] | undefined>; /** * The SMBIOS (type1) settings for the VM. */ smbios?: pulumi.Input; /** * Whether to start the virtual machine (defaults * to `true`). */ started?: pulumi.Input; /** * Defines startup and shutdown behavior of the VM. */ startup?: pulumi.Input; /** * Whether to stop rather than shutdown on VM destroy (defaults to `false`) */ stopOnDestroy?: pulumi.Input; /** * Whether to enable the USB tablet device (defaults * to `true`). */ tabletDevice?: pulumi.Input; /** * A list of tags of the VM. This is only meta information ( * defaults to `[]`). Note: Proxmox always sorts the VM tags. If the list in * template is not sorted, then Proxmox will always report a difference on the * resource. You may use the `ignoreChanges` lifecycle meta-argument to ignore * changes to this attribute. */ tags?: pulumi.Input[] | undefined>; /** * Whether the VM should be a template. Setting this * from `false` to `true` converts an existing VM to a template in place. * Converting a template back to a regular VM is not supported (defaults to * `false`). */ template?: pulumi.Input; /** * Timeout for cloning a VM in seconds (defaults to * 1800). */ timeoutClone?: pulumi.Input; /** * Timeout for creating a VM in seconds (defaults to * 1800). */ timeoutCreate?: pulumi.Input; /** * Timeout for migrating the VM (defaults to * 1800). */ timeoutMigrate?: pulumi.Input; /** * Disk move timeout * * @deprecated This field is deprecated and will be removed in a future release. An overall operation timeout (timeout_create / timeoutClone / timeout_migrate) is used instead. */ timeoutMoveDisk?: pulumi.Input; /** * Timeout for rebooting a VM in seconds (defaults * to 1800). */ timeoutReboot?: pulumi.Input; /** * Timeout for shutting down a VM in seconds ( * defaults to 1800). */ timeoutShutdownVm?: pulumi.Input; /** * Timeout for starting a VM in seconds (defaults * to 1800). */ timeoutStartVm?: pulumi.Input; /** * Timeout for stopping a VM in seconds (defaults * to 300). */ timeoutStopVm?: pulumi.Input; /** * The TPM state device. The VM must be stopped before * adding, removing, or moving a TPM state device; the provider automatically * handles the shutdown/start cycle. Changing `version` requires recreating the * VM because Proxmox only supports setting the TPM version at creation time. */ tpmState?: pulumi.Input; /** * A host USB device mapping (multiple blocks supported). */ usbs?: pulumi.Input[] | undefined>; /** * The VGA configuration. */ vga?: pulumi.Input; /** * Virtiofs share */ virtiofs?: pulumi.Input[] | undefined>; /** * The VM identifier. */ vmId?: pulumi.Input; /** * The watchdog configuration. Once enabled (by a guest action), the watchdog must be periodically polled by an agent inside the guest or else the watchdog will reset the guest (or execute the respective action specified). */ watchdog?: pulumi.Input; } //# sourceMappingURL=vmLegacy.d.ts.map