* fix(vm): improve error handling when updating `initialization` block
Fix for an edge case where a VM is created without an initialization block, then any subsequent update to the block would cause a panic.
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
* linter
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
---------
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
Allow to set disk speed and set / update other attributes of existing disks when cloning a VM
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
* feat(vm): add optional reboot after update configuration
- Add `reboot_after_update` parameter to VM resource
- Update documentation to reflect new configuration option
- Implement logic to control VM reboot after configuration changes
- Provide warning if reboot is required but disabled by configuration
---------
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
* feat(vm): add RNG device support
This commit adds support for configuring the Random Number Generator (RNG) device for virtual machines in both the VM resource and datasource. The implementation includes:
- New schema and model for RNG configuration
- Support for setting RNG source, max_bytes, and period
- Updated documentation for RNG configuration
- Test cases for RNG configuration
- Integration with VM creation, update, and read operations
---------
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
* fix(vm): fix `vga` block defaults handling during create / clone
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
* fix: formatting
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
* fix: acc test failure due to skip
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
---------
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
* chore(tests): add option to select auth type (root user / token) for tests
* fix(vm): throw an error when `cpu.architecture` can't be set
---------
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
* fix(vm): add validation for `node_name` values
Also, fix acceptance tests that now fail on PVE 8.3
---------
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
Regression after #1580, the provider incorrectly detects that disk has been resized when other disk attributes change.
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
Fix for another use case of mismanaged default value. This one was a bit trickier to spot as it triggered only when provider is authenticated using root@pam, as architecture change is allowed only for root.
Removing default value altogether, as the PVE API default for this attribute is an empty string.
VM2 resource will have no such issue, related: #1310, #1311
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
Split all `Custom*` structs and marshaling code into separate files from `vms_types.go`
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
* misc(vm2): add support for `vga`
* fix: use random VM IDs in parallel acc tests
---------
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
* fix: ignore upgrade parameter when custom cloud-init file is used
Signed-off-by: Kai <nankeen@users.noreply.github.com>
* fix acceptance tests, make `upgrade` computed
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
---------
Signed-off-by: Kai <nankeen@users.noreply.github.com>
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
Co-authored-by: Kai <nankeen@users.noreply.github.com>
Co-authored-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
* 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>