* chore(vm2): add datasource implementation --------- Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
5.1 KiB
layout | title | parent | subcategory | description |
---|---|---|---|---|
page | proxmox_virtual_environment_vm2 | Resources | Virtual Environment | 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
clone
(Attributes) The cloning configuration. (see below for nested schema)cpu
(Attributes) The CPU configuration. (see below for nested schema)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.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)
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 to0-3
) means that the VM’s vCPUs are run on the first four CPU cores. Settingaffinity
is only allowed forroot@pam
authenticated user.architecture
(String) The CPU architecture<aarch64 | x86_64>
(defaults to the host). Settingaffinity
is only allowed forroot@pam
authenticated user.cores
(Number) The number of CPU cores per socket (defaults to1
).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 to0
).limit
(Number) Limit of CPU usage (defaults to0
which means no limit).numa
(Boolean) Enable NUMA (defaults tofalse
).sockets
(Number) The number of CPU sockets (defaults to1
).type
(String) Emulated CPU type, it's recommended to usex86-64-v2-AES
or higher (defaults tokvm64
). 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 timeouts
Optional:
create
(String) A string that can be parsed as a duration 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 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 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 consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).