{"id":16781314,"url":"https://github.com/romantomjak/packer-proxmox-template","last_synced_at":"2025-04-05T22:05:20.169Z","repository":{"id":144100841,"uuid":"275157522","full_name":"romantomjak/packer-proxmox-template","owner":"romantomjak","description":"Packer configuration for creating Debian virtual machine templates for Proxmox VE","archived":false,"fork":false,"pushed_at":"2024-11-18T00:05:27.000Z","size":66,"stargazers_count":111,"open_issues_count":1,"forks_count":27,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-29T21:03:55.784Z","etag":null,"topics":["cloud-init","debian","packer","proxmox","proxmox-template"],"latest_commit_sha":null,"homepage":"","language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/romantomjak.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-06-26T13:03:42.000Z","updated_at":"2025-03-05T18:17:02.000Z","dependencies_parsed_at":null,"dependency_job_id":"23973e1e-a856-44ae-a04a-880a089b2e64","html_url":"https://github.com/romantomjak/packer-proxmox-template","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romantomjak%2Fpacker-proxmox-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romantomjak%2Fpacker-proxmox-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romantomjak%2Fpacker-proxmox-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romantomjak%2Fpacker-proxmox-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/romantomjak","download_url":"https://codeload.github.com/romantomjak/packer-proxmox-template/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247406085,"owners_count":20933803,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cloud-init","debian","packer","proxmox","proxmox-template"],"created_at":"2024-10-13T07:42:41.793Z","updated_at":"2025-04-05T22:05:20.147Z","avatar_url":"https://github.com/romantomjak.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# packer-proxmox-template\n\nPacker configuration for creating Debian virtual machine templates for Proxmox VE.\n\n## Requirements\n\n- [Packer](https://www.packer.io/downloads) 1.9.1+\n- [Proxmox VE](https://www.proxmox.com/en/proxmox-ve) 6.2+\n\n## Minimum background information\n\nLaunching a virtual machine requires an operating system to be installed. VM installation is usually done using an ISO image file and depending on the OS, this can be a time consuming task one might want to avoid. Luckily, this can be automated using a process known as _preseeding_.\n\n\u003e Preseeding provides a way to answer questions asked during the installation process, without having to manually enter the answers while the installation is running. You can check out the configuration for a standard Debian installation in [preseed.cfg](preseed.cfg) and read more about this method in the [preseed documentation](https://wiki.debian.org/DebianInstaller/Preseed).\n\nProxmox Templates provide an easy way to deploy many VMs of the same type, but naturally we don't want them to be _completely_ identical. They may need a different hostname, an IP address, etc. This is what _cloud-init_ takes care of.\n\n\u003e Cloud-init is used for initial machine configuration like creating users or preseeding `authorized_keys` file for SSH authentication. You can check out the configuration in [cloud.cfg](cloud.cfg) and read more about this in [cloud-init documentation](https://cloudinit.readthedocs.io/en/latest/).\n\n:rotating_light: **IMPORTANT!** :rotating_light:\n\nDo not forget to replace `ssh_authorized_keys` in `cloud.cfg` with your own public keys as otherwise you won't be able to log in to the machine since cloud-init is configured to set the root password to a random one after the template has been built.\n\nThe public SSH keys will added to a password-less sudo user named `debian`.\n\n## Creating a new VM Template\n\nTemplates are created by converting an existing VM to a template. As soon as the VM is converted, it cannot be started anymore. If you want to modify an existing template, you need to create a new template.\n\nHere's how to do all that in one step:\n\n```sh\n$ packer build -var-file example-variables.pkrvars.hcl .\nproxmox: output will be in this color.\n\n==\u003e proxmox: Creating VM\n==\u003e proxmox: No VM ID given, getting next free from Proxmox\n==\u003e proxmox: Starting VM\n\n...\n\n==\u003e proxmox: Stopping VM\n==\u003e proxmox: Converting VM to template\nBuild 'proxmox' finished.\n\n==\u003e Builds finished. The artifacts of successful builds are:\n--\u003e proxmox: A template was created: 102\n```\n\n:books: **Tip!**\n\nPacker automatically loads any var file that matches the name `*.auto.pkrvars.hcl`, without the need to pass the file via the command line. If you rename the example variable definitions file from `example-variables.pkrvars.hcl` to `example-variables.auto.pkrvars.hcl`, then you can run the build just by calling:\n\n```sh\n$ packer build .\n```\n\n## Deploy a VM from a Template\n\nRight-click the template in Proxmox VE, and select \"Clone\".\n\n- **full clone** is a complete copy and is fully independent from the original VM or VM Template, but it requires the same disk space as the original\n- **linked clone** requires less disk space but cannot run without access to the base VM Template. Not supported with LVM \u0026 ISCSI storage types\n\n## Contributing\n\nYou can contribute in many ways and not just by changing the code! If you have\nany ideas, just open an issue and tell me what you think.\n\nContributing code-wise - please fork the repository and submit a pull request.\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fromantomjak%2Fpacker-proxmox-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fromantomjak%2Fpacker-proxmox-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fromantomjak%2Fpacker-proxmox-template/lists"}