packer-plugin-proxmox icon indicating copy to clipboard operation
packer-plugin-proxmox copied to clipboard

[Issue 71] Adds convert_to_template option to proxmox builders

Open LethalServant opened this issue 3 years ago • 12 comments

Adds convert_to_template bool option to proxmox-iso and proxmox-clone builders configuration. This gives the user more control over the machine image, whether it stays a VM or is converted to a VM Template. The convert_to_template option is optional, and the default value is false, resulting in the VM not being converted to a template. In practice the option is only need if the user wants the machine image to become a VM Template.

Tests: Given working proxmox-iso and proxmox-clone packer file configurations, the following values were changed and run for each builder:

convert_to_template      = true  // result: vm is a template
convert_to_template      = false // result: vm is not a template 
remove convert_to_template option, testing default value // result: vm is not a template

Closes #71

LethalServant avatar Mar 07 '22 01:03 LethalServant

CLA assistant check
All committers have signed the CLA.

hashicorp-cla avatar Mar 07 '22 01:03 hashicorp-cla

Hi @LethalServant, So this would change the default behaviour of the builder quite a bit, is there a compelling reason for this?

carlpett avatar Apr 07 '22 16:04 carlpett

@LethalServant do you have any update on @carlpett's question?

sylviamoss avatar May 06 '22 08:05 sylviamoss

It should keep the default behaviour of converting into a template. and if the option is set, it should change the default behaviour to leave the VM.

ie. The convert_to_template option is optional, and the default value is TRUE, resulting in the VM being converted to a template. If the value is set to FALSE, no template is created. This would prevent a breaking change.

adrian-hoasted avatar May 11 '22 09:05 adrian-hoasted

It's been two months, any update on this? Would love to have this functionality.

zakx avatar Sep 27 '22 23:09 zakx

It's been two months, any update on this? Would love to have this functionality.

Hi @LethalServant thanks for working to push this forward. We haven't had a chance to review this since you last updated. But I'm adding it to our planning board so we can give it some cycles next week. Quickly looking at the approach I don't know if skip_convert_to_template is the best way to avoid changing the default behavior.

I will be releasing a new version of the plugin today v1.1.0 to address #119. After that change we can work to get this change in. Thanks again for pushing this change forward and for sticking with us.

nywilken avatar Nov 01 '22 16:11 nywilken

Note: removed the bump minor label since in the current state, this does not change how the plugin works, so this can be a patch release.

lbajolet-hashicorp avatar Oct 24 '23 18:10 lbajolet-hashicorp

The author of this PR hasn't had any GitHub activity in a year or two. Is there a path forward to merge this?

mfisher87 avatar Jan 28 '24 08:01 mfisher87

checking in on this. Is it possible to merge in this feature? As I understand the current builder methods (ISO, and Clone) only allow you to create templates instead of going straight to a running VM?

Im looking to have packer build out a functional VM from ISO instead of a template. Is this possible in the proxmox environment? Currently we have a functional process using Vsphere but I am currently exploring proxmox as an alternative.

AnthonyTippy avatar Mar 27 '24 14:03 AnthonyTippy

Would love to see this merged in for our current workflow.

tacoman avatar Mar 27 '24 16:03 tacoman

Hi @AnthonyTippy @tacoman @mfisher87,

This looks pretty stale still, haven't heard of feedback from @LethalServant yet (to be fair to them, we waited a really long time for reviewing the code so there's definitely a lot of blame on us).

If someone wants to pickup that PR and add contributions on top to address the comments (that will likely need to be in a separate PR to supersede this one) I posted in my review, that would be very appreciated for sure, please let us know and we'll make sure to review the changes with minimal delay this time around.

lbajolet-hashicorp avatar Mar 28 '24 13:03 lbajolet-hashicorp

Hey @lbajolet-hashicorp

I started working on this feature back around v1.0.4 so I think the code base has changed a lot and it would take some effort to get this back in mergeable state. Not sure when I'll be able to get to this, if someone else is in a better position to add this feature either by picking this up or starting from scratch, go for it. Cheers!

LethalServant avatar Mar 29 '24 01:03 LethalServant

Since this one was left aside by @LethalServant's admission, and since @mpywell has opened a PR to implement this one, which is nearing completion, I believe we can close this open PR and refer to #283 for further updates.

Thanks @LethalServant for the original proposal and implementation, sorry it didn't get to the point where we could merge it, but hopefully the feature will be part of the plugin soon :)

lbajolet-hashicorp avatar Oct 28 '24 19:10 lbajolet-hashicorp