Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

☂️ Migrate VM resource implementation to Plugin Framework #1231

Open
8 of 48 tasks
bpg opened this issue Apr 20, 2024 · 2 comments
Open
8 of 48 tasks

☂️ Migrate VM resource implementation to Plugin Framework #1231

bpg opened this issue Apr 20, 2024 · 2 comments
Assignees
Labels
size/XXL ✨ enhancement New feature or request
Milestone

Comments

@bpg
Copy link
Owner

bpg commented Apr 20, 2024

This is an "umbrella" ticket (call it an epic, or whatever) to track the migration of the proxmox_virtual_environment_vm resource to the Plugin Framework.

Motivation

Check out the benefits of Plugin Framework from HashiCorp. There are quite a lot.

Specific to this provider:

Challenges

  • There's a vast amount of functionality to port, and some (or most?) of it needs to be re-implemented to leverage the benefits of the Provider Framework data model/custom types.

  • Severe lack of the provider's code test coverage. The changes/re-implementation will introduce new bugs that will be hard to catch.

Compatibility

Inevitably, some attribute formats and semantics will be incompatible with the old version. Also, some attributes will be renamed/removed. Known incompatibilities are marked with ❗ below.

Implementation

The proxmox_virtual_environment_vm2 resource contains the new implementation.

Status of features/attributes:

  • Individual attributes
    • acpi
    • boot_order
    • description
    • id
    • hook_script_file_id
    • machine
    • migrate
    • name
    • node_name
    • on_boot
    • pool_id
    • protection
    • reboot
    • smbios
    • started
    • stop_on_destroy
    • tablet_device
    • tags
    • template
  • Blocks
    • agent
    • audio_device
    • bios
    • cdrom
    • clone
      • simple clone
      • migrate between nodes
    • cpu
    • disk
    • efi_disk
    • hostpci
    • initialization
    • keyboard_layout
    • kvm_arguments
    • memory
    • network_device
    • numa
    • operating_system
    • serial_device
    • scsi_hardware
    • startup
    • timeouts
      • CRUD operations
      • specific API calls (if supported/needed)
    • tpm_state
    • usb
    • vga
@bpg bpg added the ✨ enhancement New feature or request label Apr 20, 2024
@bpg bpg pinned this issue Apr 20, 2024
@bpg bpg added the size/XXL label Apr 20, 2024
@bpg bpg added this to the v1.0 milestone Apr 25, 2024
@sergelogvinov
Copy link
Contributor

Hi, i think that we need to add reboot flag. which allow/skip rebooting the VM if it needed after changes.
(Currently, I usually comment out the reboot block in the code...)

Thanks.

@maksimsamt
Copy link

@bpg ,
What is the approximate forecast on this new implementation?
Unfortunately, the current implementation of proxmox_virtual_environment_vm cannot be used for clone operations, especially in prod environments. As you mentioned in your task description, there are some important issues with disk provisioning/changing/adding etc from clone vm or template. And basically in almost all scenarios (disk modify or adding new one) the issue is that the current main disk is destroyed and a new one is created.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/XXL ✨ enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants