linuxubuntu-18.04packerproxmoxpacker-builder

Packer: Create proxmox VM not Template


Can we create Proxmox virtual machine via Packer (Not a template)? Because in my case it creates a VM than stops it and makes it template. and I don't need a template I need VM

muhammadfaizanyounus@Muhammads-MacBook-Pro proxmox % packer build test3.json      
proxmox: output will be in this color.

==> proxmox: Creating VM
==> proxmox: Starting VM
==> proxmox: Waiting 3m0s for boot
==> proxmox: Typing the boot command
==> proxmox: Using ssh communicator to connect: aaa.bbb.ccc.ddd
==> proxmox: Waiting for SSH to become available...
==> proxmox: Connected to SSH!
==> proxmox: Stopping VM
==> proxmox: Converting VM to template
==> proxmox: Adding a cloud-init cdrom in storage pool local-lvm
Build 'proxmox' finished.

==> Builds finished. The artifacts of successful builds are:
--> proxmox: A template was created: 152

Solution

  • that's how it is... As for me, at the end of the Packer process, I run a sed command on VM conf file to change from "Template: 1" to "Template: 0"

    Regards