--- layout: page title: proxmox_virtual_environment_vm2 parent: Resources subcategory: Virtual Environment description: |- This is an experimental implementation of a Proxmox VM resource using Plugin Framework.It is a Proof of Concept, highly experimental and will change in future. It does not support all features of the Proxmox API for VMs and MUST NOT be used in production. --- # Resource: proxmox_virtual_environment_vm2 !> **DO NOT USE** This is an experimental implementation of a Proxmox VM resource using Plugin Framework.

It is a Proof of Concept, highly experimental and **will** change in future. It does not support all features of the Proxmox API for VMs and **MUST NOT** be used in production. -> Many attributes are marked as **optional** _and_ **computed** in the schema, hence you may seem added to the plan with "(known after apply)" status, even if they are not set in the configuration. This is done to support the `clone` operation, when a VM is created from an existing VM or template, and the source attributes are copied to the clone.

Computed attributes allow the provider to set those attributes without user input. The attributes are also marked as optional to allow the practitioner to set (or overwrite) them if needed. ## Schema ### Required - `node_name` (String) The name of the node where the VM is provisioned. ### Optional - `cdrom` (Attributes Map) The CD-ROM configuration. The key is the interface of the CD-ROM, could be one of `ideN`, `sataN`, `scsiN`, where N is the index of the interface. Note that `q35` machine type only supports `ide0` and `ide2` of IDE interfaces. (see [below for nested schema](#nestedatt--cdrom)) - `clone` (Attributes) The cloning configuration. (see [below for nested schema](#nestedatt--clone)) - `cpu` (Attributes) The CPU configuration. (see [below for nested schema](#nestedatt--cpu)) - `description` (String) The description of the VM. - `id` (Number) The unique identifier of the VM in the Proxmox cluster. - `name` (String) The name of the VM. Doesn't have to be unique. - `rng` (Attributes) Configure the RNG (Random Number Generator) device. The RNG device provides entropy to guests to ensure good quality random numbers for guest applications that require them. Can only be set by `root@pam.`See the [Proxmox documentation](https://pve.proxmox.com/pve-docs/pve-admin-guide.html#qm_virtual_machines_settings) for more information. (see [below for nested schema](#nestedatt--rng)) - `stop_on_destroy` (Boolean) Set to true to stop (rather than shutdown) the VM on destroy (defaults to `false`). - `tags` (Set of String) The tags assigned to the VM. - `template` (Boolean) Set to true to create a VM template. - `timeouts` (Attributes) (see [below for nested schema](#nestedatt--timeouts)) - `vga` (Attributes) Configure the VGA Hardware. If you want to use high resolution modes (>= 1280x1024x16) you may need to increase the vga memory option. Since QEMU 2.9 the default VGA display type is `std` for all OS types besides some Windows versions (XP and older) which use `cirrus`. The `qxl` option enables the SPICE display server. For win* OS you can select how many independent displays you want, Linux guests can add displays themself. You can also run without any graphic card, using a serial device as terminal. See the [Proxmox documentation](https://pve.proxmox.com/pve-docs/pve-admin-guide.html#qm_virtual_machines_settings) section 10.2.8 for more information and available configuration parameters. (see [below for nested schema](#nestedatt--vga)) ### Nested Schema for `cdrom` Optional: - `file_id` (String) The file ID of the CD-ROM, or `cdrom|none`. Defaults to `none` to leave the CD-ROM empty. Use `cdrom` to connect to the physical drive. ### Nested Schema for `clone` Required: - `id` (Number) The ID of the VM to clone. Optional: - `retries` (Number) The number of retries to perform when cloning the VM (default: 3). ### Nested Schema for `cpu` Optional: - `affinity` (String) The CPU cores that are used to run the VM’s vCPU. The value is a list of CPU IDs, separated by commas. The CPU IDs are zero-based. For example, `0,1,2,3` (which also can be shortened to `0-3`) means that the VM’s vCPUs are run on the first four CPU cores. Setting `affinity` is only allowed for `root@pam` authenticated user. - `architecture` (String) The CPU architecture `` (defaults to the host). Setting `affinity` is only allowed for `root@pam` authenticated user. - `cores` (Number) The number of CPU cores per socket (defaults to `1`). - `flags` (Set of String) Set of additional CPU flags. Use `+FLAG` to enable, `-FLAG` to disable a flag. Custom CPU models can specify any flag supported by QEMU/KVM, VM-specific flags must be from the following set for security reasons: `pcid`, `spec-ctrl`, `ibpb`, `ssbd`, `virt-ssbd`, `amd-ssbd`, `amd-no-ssb`, `pdpe1gb`, `md-clear`, `hv-tlbflush`, `hv-evmcs`, `aes`. - `hotplugged` (Number) The number of hotplugged vCPUs (defaults to `0`). - `limit` (Number) Limit of CPU usage (defaults to `0` which means no limit). - `numa` (Boolean) Enable NUMA (defaults to `false`). - `sockets` (Number) The number of CPU sockets (defaults to `1`). - `type` (String) Emulated CPU type, it's recommended to use `x86-64-v2-AES` or higher (defaults to `kvm64`). See https://pve.proxmox.com/pve-docs/pve-admin-guide.html#qm_virtual_machines_settings for more information. - `units` (Number) CPU weight for a VM. Argument is used in the kernel fair scheduler. The larger the number is, the more CPU time this VM gets. Number is relative to weights of all the other running VMs. ### Nested Schema for `rng` Optional: - `max_bytes` (Number) Maximum bytes of entropy allowed to get injected into the guest every period. Use 0 to disable limiting (potentially dangerous). - `period` (Number) Period in milliseconds to limit entropy injection to the guest. Use 0 to disable limiting (potentially dangerous). - `source` (String) The file on the host to gather entropy from. In most cases, `/dev/urandom` should be preferred over `/dev/random` to avoid entropy-starvation issues on the host. ### Nested Schema for `timeouts` Optional: - `create` (String) A string that can be [parsed as a duration](https://pkg.go.dev/time#ParseDuration) consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). - `delete` (String) A string that can be [parsed as a duration](https://pkg.go.dev/time#ParseDuration) consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs. - `read` (String) A string that can be [parsed as a duration](https://pkg.go.dev/time#ParseDuration) consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled. - `update` (String) A string that can be [parsed as a duration](https://pkg.go.dev/time#ParseDuration) consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). ### Nested Schema for `vga` Optional: - `clipboard` (String) Enable a specific clipboard. If not set, depending on the display type the SPICE one will be added. Currently only `vnc` is available. Migration with VNC clipboard is not supported by Proxmox. - `memory` (Number) The VGA memory in megabytes (4-512 MB). Has no effect with serial display. - `type` (String) The VGA type (defaults to `std`).