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

fix(proxmox): use default values when possible #10208

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 0 additions & 1 deletion builder/proxmox/common/step_start_vm.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ func (s *stepStartVM) Run(ctx context.Context, state multistep.StateBag) multist
QemuKVM: kvm,
Boot: c.Boot, // Boot priority, example: "order=virtio0;ide2;net0", virtio0:Disk0 -> ide0:CDROM -> net0:Network
QemuCpu: c.CPUType,
Description: "Packer ephemeral build VM",
Copy link
Collaborator

Choose a reason for hiding this comment

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

This should be automatically either removed or replaced with the configured template description as part of the template-conversion step. Is this not happening for you?
I believe it is a good thing to have this in place during the build so others seeing the VM can understand what it is.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I tried again today and I can confirm that the description parameter is passed to the final VM. I've the following template.

$ qm config 200
name: ubuntu-20.04
description: Packer ephemeral build VM
template: 1
[...]

I've created a VM from this template.

$ qm config 108
name: templated
description: Packer ephemeral build VM
[...]

This is not critical but if the description is passed to the final VM, it's not that useful.

Copy link
Contributor

Choose a reason for hiding this comment

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

What do you think of this change @carlpett ? Should we go on with it ? 🙂 cheers !

Copy link
Collaborator

Choose a reason for hiding this comment

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

Ooops, must have missed this notification in the christmas mail heaps. Sorry!
What I would have expected in this is that the template with VMID 200 shouldn't have a description at all, it's supposed to be removed before being converted to a template. If it has stuck around somehow, then it's expected that it'll get cloned onto VMs built from the template.

I'm unable to reproduce this locally, though. Could you tell me what version of Packer and Proxmox you have, and a sample build configuration?

Copy link
Contributor

Choose a reason for hiding this comment

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

bump @aerialls -- did you see Carl's comment above?

Memory: c.Memory,
QemuCores: c.Cores,
QemuSockets: c.Sockets,
Expand Down