0
0
mirror of https://github.com/bpg/terraform-provider-proxmox.git synced 2025-06-30 18:42:58 +00:00
Commit Graph

60 Commits

Author SHA1 Message Date
Fina
55b3f7391a
feat(vm): add support for virtiofs (#1900)
Signed-off-by: Fina Wilke <code@felinira.net>
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
Co-authored-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2025-04-15 13:10:37 -04:00
Pavel Boldyrev
d01bcf4fac
misc(datastores): update datasource references in /example (#1883)
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2025-04-07 14:12:42 -04:00
Pavel Boldyrev
af46a9c71a
fix(vm): remove qcow2 as the default for disk.file_format (#1862)
No more need to explicitly set `file_format = "raw"` when defining new disks!

Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2025-03-29 11:42:07 -04:00
Pavel Boldyrev
5f003143f8
feat(vm): deprecate enabled attribute on cdrom/disk devices (#1746)
* feat(vm): deprecate `enabled` attribute on `cdrom`/`disk` devices

Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>

* docs(vm): update CDROM configuration terminology and deprecation note

Improve documentation for virtual machine CD-ROM configuration by:
- Correcting capitalization of "CD-ROM"
- Clarifying deprecation note for `enabled` attribute

Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>

---------

Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2025-02-07 22:50:57 -05:00
Pavel Boldyrev
de349523fe
feat(vm): add support for disk.serial attribute (#1385)
* feat(vm): add support for `disk.serial` attribute

Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2024-06-11 01:40:03 +00:00
Pavel Boldyrev
994f367cc2
feat(vm): allow none cdrom (#1347)
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2024-06-03 01:24:06 +00:00
Pavel Boldyrev
2785c40d44
fix(vm): regression: vga.clipboard attribute check (#1340)
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2024-05-30 01:36:47 +00:00
DevMiner
bd195d6606
feat(vm): add initial support for IDE (#1237)
* feat(vm): add initial support for IDE

Very broken, doesn't properly work at the moment, WIP

Signed-off-by: DevMiner <devminer@devminer.xyz>

* add acceptance test for ide disks, fixed few issues

Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>

* update VM example

Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>

---------

Signed-off-by: DevMiner <devminer@devminer.xyz>
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
Co-authored-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2024-04-29 20:11:07 -04:00
joris
46d323d31b
fix(vm): error 'resizing of efidisks is not supported' when clonning a VM with re-defined efi_disk (#1206)
* fix(vm): compare efiType value instead of address

Signed-off-by: tyxieblub <5111464+tyxieblub@users.noreply.github.com>

* update example to reproduce the error case

Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>

---------

Signed-off-by: tyxieblub <5111464+tyxieblub@users.noreply.github.com>
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
Co-authored-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2024-04-11 23:09:56 -04:00
Serge
dbbd966736
feat(vm): add support for numa architecture attribute (#1156) (#1175)
* feat(vm): add support for numa architecture attribute (#1156)

Signed-off-by: Serge Logvinov <serge.logvinov@sinextra.dev>

* fix: numa blocks reordering issue

Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>

---------

Signed-off-by: Serge Logvinov <serge.logvinov@sinextra.dev>
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
Co-authored-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2024-04-06 16:30:13 -04:00
Serge
a2f055a916
feat(vm): add support for memory hugepages and keep_hugepages attributes (#1158)
Allow use hugepages on the VM.

Signed-off-by: Serge Logvinov <serge.logvinov@sinextra.dev>
2024-03-27 18:13:03 -04:00
Serge
83a5971cf6
feat(vm): add support for cpu affinity attribute (#1148) (#1153)
* feat(vm): add support for cpu `affinity` attribute (#1148)

It helps to pin VMs to the special cpu.

Signed-off-by: Serge Logvinov <serge.logvinov@sinextra.dev>

* add clarification about the format and permission requirements for `affinity`
* do not add `affinity` property to the API call if is not set

Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>

---------

Signed-off-by: Serge Logvinov <serge.logvinov@sinextra.dev>
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
Co-authored-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2024-03-23 21:34:59 -04:00
dyadMisha
6a5beccf91
fix(examples): datastore_id is missing in initialization block for vm (#1136)
fix: datastore_id is missing in initialization block

otherwise it defaults to dvInitializationDatastoreID

Signed-off-by: dyadMisha <37950256+dyadMisha@users.noreply.github.com>
2024-03-17 21:01:19 -04:00
Pavel Boldyrev
b648e5bcb0
chore(vm): refactoring, add acceptance tests (#1040)
cleaning up and refactoring the VM code, add some acceptance tests around disks, few minor bugfixes

Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2024-02-19 16:56:13 -05:00
Rafał Safin
58347c09fe
feat(storage): add new resource proxmox_virtual_environment_download_file (#837)
* feat(core): add query url metadata endpoint to nodes client api

Signed-off-by: Rafał Safin <rafal.safin@rafsaf.pl>

* feat(core): move storage api code to nodestorage folder

Signed-off-by: Rafał Safin <rafal.safin@rafsaf.pl>

* feat(core): add download url api

Signed-off-by: Rafał Safin <rafal.safin@rafsaf.pl>

* feat(storage): add  resource_download_file

Signed-off-by: Rafał Safin <rafal.safin@rafsaf.pl>

* feat(storage): finish new resource_download_file

Signed-off-by: Rafał Safin <rafal.safin@rafsaf.pl>

* feat(storage): generate docs for new download file resource, update other docs and examples

Signed-off-by: Rafał Safin <rafal.safin@rafsaf.pl>

* feat(storage): add basic acc tests for resource download_file

Signed-off-by: Rafał Safin <rafal.safin@rafsaf.pl>

* fix(test): lint new test file

Signed-off-by: Rafał Safin <rafal.safin@rafsaf.pl>

* feat(storage): warning instead of error when file already exists on resource download file

Signed-off-by: Rafał Safin <rafal.safin@rafsaf.pl>

* feat(storage): better validation in resource download file, delete upload task on error

Signed-off-by: Rafał Safin <rafal.safin@rafsaf.pl>

* feat(storage): better err message in resource download file

Signed-off-by: Rafał Safin <rafal.safin@rafsaf.pl>

* fix(core): removed unnecessary toint in custom type bool

Signed-off-by: Rafał Safin <rafal.safin@rafsaf.pl>

* fix(storage): typo in resource download file error

Signed-off-by: Rafał Safin <rafal.safin@rafsaf.pl>

* feat(storage): download file resource review - 1

Signed-off-by: Rafał Safin <rafal.safin@rafsaf.pl>

* feat(storage): finish resource download file after review

Signed-off-by: Rafał Safin <rafal.safin@rafsaf.pl>

* fix(storage): error instead of warnings in parse int errors in sizeRequiresReplaceModifier

Signed-off-by: Rafał Safin <rafal.safin@rafsaf.pl>

* fix(docs): remove unwanted changes in virtual_environment_file.md

Signed-off-by: Rafał Safin <rafal.safin@rafsaf.pl>

* fix(test): fix download file base acceptance tests

Signed-off-by: Rafał Safin <rafal.safin@rafsaf.pl>

* fix(test): fix resource download file acc tests

Signed-off-by: Rafał Safin <rafal.safin@rafsaf.pl>

* fix(test): last fix resource download file acc test

Signed-off-by: Rafał Safin <rafal.safin@rafsaf.pl>

* fix: use PVE-compatible jammy LXC image, fix few typos

Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>

---------

Signed-off-by: Rafał Safin <rafal.safin@rafsaf.pl>
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
Co-authored-by: Rafał Safin <rafal.safin@rafsaf.pl>
Co-authored-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2024-01-02 21:29:13 -05:00
Rafał Safin
16e571dc19
feat(vm, lxc): add new initialization.dns.servers param to vm and container (#832)
feat(vm): add new dns servers param to vm and container, deprecated server param

Signed-off-by: rafsaf <rafal.safin12@gmail.com>
2023-12-22 20:19:21 -05:00
Pavel Boldyrev
0ffe75afa4
fix(vm): update smbios during clone (#827)
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2023-12-21 02:28:43 +00:00
Pavel Boldyrev
9712952e26
feat(vm): add cpu.limit attribute (#814)
* feat(vm): add `cpu.limit` attribute

Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>

* update docs and examples

Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>

---------

Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2023-12-17 18:18:41 -05:00
Rui Lopes
66bba2a027
feat(vm): Add support for setting the VM TPM State device (#743)
* feat(vm): add support for setting the vm tpm state

Signed-off-by: Rui Lopes <rgl@ruilopes.com>

* feat(vm): add encoding / unmarshalling for CustomTPMState

Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>

* feat(vm): fix typos

Signed-off-by: Rui Lopes <rgl@ruilopes.com>

* feat(vm): fix vmGetTPMState

Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>

* feat(docs): add the vm tpm_state documentation

Signed-off-by: Rui Lopes <rgl@ruilopes.com>

* feat(docs): add the vm tpm_state example

Signed-off-by: Rui Lopes <rgl@ruilopes.com>

---------

Signed-off-by: Rui Lopes <rgl@ruilopes.com>
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
Co-authored-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2023-12-04 21:53:33 -05:00
Daniel Mühlbachler-Pietrzykowski
cec4e65868
feat(vm): add support for USB devices passthrough (#666)
* feat: support usb devices for vm; fixes #665

Signed-off-by: Daniel Muehlbachler-Pietrzykowski <daniel@muehlbachler.io>

* chore: fix linter errors

Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>

---------

Signed-off-by: Daniel Muehlbachler-Pietrzykowski <daniel@muehlbachler.io>
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
Co-authored-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2023-10-30 21:41:44 -04:00
Oto Petřík
aeb5e88bc9
feat(vm): add 'path_in_datastore' disk argument (#606)
* feat(vm): add 'path_in_datastore' disk argument

Provide access to actual in-datastore path to disk image,
and experimental support for attaching other VM's disks or host devices.

Signed-off-by: Oto Petřík <oto.petrik@gmail.com>

* chore: added to `/example` for acceptance testing

Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>

---------

Signed-off-by: Oto Petřík <oto.petrik@gmail.com>
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
Co-authored-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2023-10-11 22:13:09 -04:00
Pavel Boldyrev
be5251dd5a
feat(vm): add option to enable multiqueue in network devices (#614)
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2023-10-09 16:01:24 +00:00
Pavel Boldyrev
0b8f2e2c6f
fet(vm): allow scsi and sata interfaces for CloudInit Drive (#598)
* fet(vm): allow `scsi` and `sata` interfaces for CloudInit Drive

---------

Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2023-10-01 22:23:11 -04:00
Risto Oikarinen
26970541c4
feat(vm): support PCI device resource mapping (#500)
* feat(vm): support PCI device resource mapping

* fix: linter error

* fix: minor cleanup

---------

Co-authored-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2023-08-20 18:00:11 -04:00
Emmanuel Benoît
a2853606ad
feat(vm): support for migration when the node name is modified (#501)
* feat(vm): support for migration when the node name is modified

  * Added a `migrate` VM flag which changes the provider's behaviour
    when the VM's `node_name` is updated. If `true`, the VM will be
    migrated to the specified node instead of being re-created.

  * Added a `timeout_migrate` setting to control the timeout for VM
    migration.

  * Fixed a bug in the API's migration data structure that prevented
    the online migration flag to be set.

* fix: update description

---------

Co-authored-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2023-08-18 22:02:50 -04:00
Emmanuel Benoît
547593661f
feat(vm): support for non-default CloudInit interface and CloudInit storage change (#486) 2023-08-13 09:55:38 -04:00
Pavel Boldyrev
85ff60d4bd
feat(vm): add support for SMBIOS settings (#454)
* feat(vm): add support for SMBIOS settings

* fix linter errors

* fix smbios error at clone
2023-08-06 00:31:17 +00:00
Pavel Boldyrev
b045746a94
feat(vm): add support for start/shutdown order configuration (#445) 2023-07-29 22:55:12 -04:00
Pavel Boldyrev
cfe3d96576
feat(vm): add support for disk cache option (#443) 2023-07-29 13:29:14 -04:00
Leah
e9a74e9037
feat(vm): efi disk, cpu numa (#384)
* efi disks support

* make size a string

* add cpu numa support

* add docs

* fix description

* string size fixes

(cherry picked from commit 254724d1d10c5191d294f0377adac49ad41dc880)

* fix lints

* fix(vm): replace `size` with `type` for efi disk

also
- add support for `pre-enrolled-keys`
- add example
- fix handling of `numa` flag when it's not in the template
- cleanup linter errors

---------

Co-authored-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2023-07-01 08:50:21 -04:00
Pavel Boldyrev
7aa25b8d05
feat(vm): add support for meta-data in cloud-init (#378) 2023-06-24 00:06:05 -04:00
Pavel Boldyrev
343e8045c1
feat(vm): add network device resources (#376)
* wip

* experimenting with terraform plugin framework

* cleaning up poc and adding tests

* adding read / update / delete

* update bridge_vlan_aware and MTU

* add ipv6 and simplify IP support

* fix provider's schema

* add docs

* run linter from cmdline

* disable TF acceptance tests

* add VLAN

* update docs

* add examole

* cleanup
2023-06-23 22:47:25 +00:00
Oto Petřík
2a5abb10fc
fix(vm): Make vm_id computed (#367)
* fix(vm): Make vm_id computed, fix #364

Defaulting vm_id to -1 prevents resources depending on vm_id value.
Make vm_id computed, also update existing vm_id = -1 with correct vm_id.

* update examples to use auto-generated `vm_id`s

---------

Co-authored-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2023-06-07 19:40:39 -04:00
Remko Molier
97ca22abbb
fix(vm): Fix IPv6 handling (#319)
* fix: Fix IPv6 handling in resource "virtual_environment_vm"

* also use "*IPv6Address" keys

---------

Co-authored-by: Remko Molier <remko.molier@kuehne-nagel.com>
Co-authored-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2023-05-03 20:36:10 -04:00
Pavel Boldyrev
2fa922930f
chore: cleanup and fix linter errors (#290) 2023-04-05 00:04:12 +00:00
Pavel Boldyrev
fcf9810252
feat(vm): update VM disc import logic (#241)
* feat(vm): updated VM disc import logic

fixes: #187, #203

* ignore linter error
2023-02-17 16:53:06 -05:00
Abdelfadeel Farag
3c02cb1389
feat: add support for network_device MTU (#176)
* add support for network_device MTU

* add mtu to the example templates

* change default mtu 1500 -> 0, update docs

Co-authored-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2022-12-12 23:07:02 -05:00
Abdelfadeel Farag
290734655c
feat: add support for "ssd" disk flag for VM (#181)
* feat: add support for ssd flag

* update docs, add `ssd` to examples

* restore original .md formatting

Co-authored-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2022-12-12 22:31:33 -05:00
Szczepan Wiśniowski
722e01053b
fix: Check if any interface has global unicast address instead of all interfaces (#182)
* fix: Check if any interface has global unicast address instead of all interfaces

This allows us to have multiple interfaces and only one (instead of all) has to have assigned ip

* add multiple network devices to the example VM

Co-authored-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2022-12-11 16:29:25 -05:00
michalg91
27665554de
fix: Remove cloned ide2 before creating new one (#174) (#175)
* fix: Remove cloned ide2 before creating new one (#174)

* add test case to `/examples`

Co-authored-by: Michał Gawryś <mgawrys@netbyte.pl>
Co-authored-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2022-12-09 22:32:43 -05:00
Pavel Boldyrev
ade1d49117
feat: add support for VM tags (#169) 2022-11-25 23:23:50 -05:00
Pavel Boldyrev
9e34dfb362
feat: Add support for custom cloud-init vendor data file (#162)
* feat: Add support for custom cloud-init vendor data file

Add new argument `initialization`.`vendor_data_file_id` to specify a file ID form snippets.

* add vendor cloud-init to examples

* add missing `vendor` to unmarshal

* remove debug lines
2022-11-17 20:33:41 -05:00
Pavel Boldyrev
b09389f0a9
fix: Non-default VM disk format is not preserved in TF state (#134)
Fix disk format parsing from the volume string.
Add basic unit tests for disk volume string parsing.
2022-10-14 18:27:30 -04:00
Pavel Boldyrev
42e0e725a5
Add support for "discard" disk option for VM (#128) 2022-09-28 19:13:41 -04:00
Pavel Boldyrev
e9d2d607c1
Add support for "iothread" disk option for VM (#97) 2022-07-24 16:53:57 -04:00
Dan Petersen
427db3d44a fix: example and makefile issues 2021-02-13 02:46:29 +01:00
Lucas Hahn
68b67e556d Update example with disk interface 2021-01-02 14:18:45 +01:00
Dan Petersen
aec59ef607 Add datastore_id argument to initialization block for VM resources 2020-03-08 17:40:58 +01:00
Dan Petersen
94679a3f5e Initial support for VM cloning 2020-01-19 03:40:10 +01:00
Dan Petersen
23466ab289 Add serial_device argument to VM resource 2020-01-11 16:39:08 +01:00