mirror of
https://github.com/bpg/terraform-provider-proxmox.git
synced 2025-07-03 12:02:57 +00:00
fix(docs): document specifics of "ballooning device" in the `vm.memor… (#1550)
fix(docs): document specifics of "ballooning device" in the `vm.memory` block Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
This commit is contained in:
parent
40373922fc
commit
0b29ae281e
@ -35,6 +35,16 @@ resource "proxmox_virtual_environment_vm" "ubuntu_vm" {
|
|||||||
down_delay = "60"
|
down_delay = "60"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cpu {
|
||||||
|
cores = 2
|
||||||
|
type = "x86-64-v2-AES" # recommended for modern CPUs
|
||||||
|
}
|
||||||
|
|
||||||
|
memory {
|
||||||
|
dedicated = 2048
|
||||||
|
floating = 2048 # set equal to dedicated to enable ballooning
|
||||||
|
}
|
||||||
|
|
||||||
disk {
|
disk {
|
||||||
datastore_id = "local-lvm"
|
datastore_id = "local-lvm"
|
||||||
file_id = proxmox_virtual_environment_download_file.latest_ubuntu_22_jammy_qcow2_img.id
|
file_id = proxmox_virtual_environment_download_file.latest_ubuntu_22_jammy_qcow2_img.id
|
||||||
@ -405,17 +415,16 @@ output "ubuntu_vm_public_key" {
|
|||||||
- `pc` - Standard PC (i440FX + PIIX, 1996).
|
- `pc` - Standard PC (i440FX + PIIX, 1996).
|
||||||
- `q35` - Standard PC (Q35 + ICH9, 2009).
|
- `q35` - Standard PC (Q35 + ICH9, 2009).
|
||||||
- `memory` - (Optional) The memory configuration.
|
- `memory` - (Optional) The memory configuration.
|
||||||
- `dedicated` - (Optional) The dedicated memory in megabytes (defaults
|
- `dedicated` - (Optional) The dedicated memory in megabytes (defaults to `512`).
|
||||||
to `512`).
|
- `floating` - (Optional) The floating memory in megabytes. The default is `0`, which disables "ballooning device" for the VM.
|
||||||
- `floating` - (Optional) The floating memory in megabytes (defaults
|
Please note that Proxmox has ballooning enabled by default. To enable it, set `floating` to the same value as `dedicated`.
|
||||||
to `0`).
|
See [Proxmox documentation](https://pve.proxmox.com/pve-docs/pve-admin-guide.html#qm_memory) section 10.2.6 for more information.
|
||||||
- `shared` - (Optional) The shared memory in megabytes (defaults to `0`).
|
- `shared` - (Optional) The shared memory in megabytes (defaults to `0`).
|
||||||
- `hugepages` - (Optional) Enable/disable hugepages memory (defaults to disable).
|
- `hugepages` - (Optional) Enable/disable hugepages memory (defaults to disable).
|
||||||
- `2` - 2MB hugepages.
|
- `2` - 2MB hugepages.
|
||||||
- `1024` - 1GB hugepages.
|
- `1024` - 1GB hugepages.
|
||||||
- `any` - Any hugepages.
|
- `any` - Any hugepages.
|
||||||
- `keep_hugepages` - (Optional) Keep hugepages memory after the VM is stopped (defaults
|
- `keep_hugepages` - (Optional) Keep hugepages memory after the VM is stopped (defaults to `false`).
|
||||||
to `false`).
|
|
||||||
|
|
||||||
Settings `hugepages` and `keep_hugepages` are only allowed for `root@pam` authenticated user.
|
Settings `hugepages` and `keep_hugepages` are only allowed for `root@pam` authenticated user.
|
||||||
And required `cpu.numa` to be enabled.
|
And required `cpu.numa` to be enabled.
|
||||||
@ -697,7 +706,6 @@ This is done by setting the `path_in_datastore` to the path of the block device
|
|||||||
|
|
||||||
~> Do *not* attach the same disk to more than one VM as it may cause data corruption.
|
~> Do *not* attach the same disk to more than one VM as it may cause data corruption.
|
||||||
|
|
||||||
|
|
||||||
```hcl
|
```hcl
|
||||||
resource "proxmox_virtual_environment_vm" "test_vm" {
|
resource "proxmox_virtual_environment_vm" "test_vm" {
|
||||||
...
|
...
|
||||||
@ -718,7 +726,6 @@ resource "proxmox_virtual_environment_vm" "test_vm" {
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
## Import
|
## Import
|
||||||
|
|
||||||
Instances can be imported using the `node_name` and the `vm_id`, e.g.,
|
Instances can be imported using the `node_name` and the `vm_id`, e.g.,
|
||||||
|
Loading…
Reference in New Issue
Block a user