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

clone: Add support to clone VM by ID, check if VM IDs are in valid range. #157

Merged
merged 2 commits into from
Feb 24, 2023
Merged

Conversation

sebastian-de
Copy link
Contributor

The clone builder currently supports cloning VMs by name only. Add a new attribute clone_vm_id to be able to clone VMs by ID, too.

The valid VMID ranges for Proxmox are hard to find, the only reference I found was this: https://pve-devel.pve.proxmox.narkive.com/Pa6mH1OP/avoiding-vmid-reuse#post8
I confirmed these numbers by testing on a PVE 7.3, so I also added the range-check for vm_id in a second commit.

Technically Proxmox VMIDs are unsigned 32bit integers, but are limited to
the range 100-999999999. Source:
https://pve-devel.pve.proxmox.narkive.com/Pa6mH1OP/avoiding-vmid-reuse#post8
Check if vm_id is in that range.
@sebastian-de sebastian-de requested a review from a team as a code owner February 12, 2023 11:47
Copy link
Contributor

@lbajolet-hashicorp lbajolet-hashicorp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @sebastian-de,

LGTM! Thanks for this.

@lbajolet-hashicorp lbajolet-hashicorp merged commit 9cb889b into hashicorp:main Feb 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants