├── http ├── ubuntu │ ├── meta-data │ └── user-data ├── windows-scripts │ ├── .gitignore │ └── setup.ps1 ├── talos │ └── schematic.yaml ├── alpine │ └── answers ├── rocky-9 │ └── ks.cfg ├── almalinux-9 │ └── ks.cfg ├── almalinux-10 │ └── ks.cfg ├── rocky-10 │ └── ks.cfg ├── windows │ ├── Autounattend-server.xml.pkrtpl │ └── Autounattend-win11.xml.pkrtpl ├── debian │ └── preseed.cfg └── ubuntu-18.04 │ └── preseed.cfg ├── .gitignore ├── config.pkr.hcl ├── .github ├── workflows │ ├── talos.yml │ ├── rocky-9.yml │ ├── rocky-10.yml │ ├── debian-12.yml │ ├── debian-13.yml │ ├── almalinux-9.yml │ ├── alpine-3.19.yml │ ├── alpine-3.20.yml │ ├── alpine-3.21.yml │ ├── alpine-3.22.yml │ ├── almalinux-10.yml │ ├── ubuntu-22.04.yml │ ├── ubuntu-24.04.yml │ ├── debian-11.yml │ ├── ubuntu-18.04.yml │ ├── ubuntu-20.04.yml │ ├── windows-11.yml │ ├── opnsense-25.7.yml │ ├── windows-server-2022.yml │ ├── windows-server-2025.yml │ ├── windows-server-2019.yml │ └── packer.yml └── renovate.json5 ├── rocky-9.pkrvars.hcl ├── almalinux-9.pkrvars.hcl ├── ubuntu-20.04.pkrvars.hcl ├── rocky-10.pkrvars.hcl ├── almalinux-10.pkrvars.hcl ├── ubuntu-22.04.pkrvars.hcl ├── ubuntu-24.04.pkrvars.hcl ├── ubuntu-18.04.pkrvars.hcl ├── talos.pkrvars.hcl ├── LICENSE ├── debian-13.pkrvars.hcl ├── debian-12.pkrvars.hcl ├── debian-11.pkrvars.hcl ├── windows-server-2022.pkrvars.hcl ├── windows-server-2019.pkrvars.hcl ├── windows-server-2025.pkrvars.hcl ├── windows-11.pkrvars.hcl ├── alpine-3.19.pkrvars.hcl ├── alpine-3.20.pkrvars.hcl ├── alpine-3.21.pkrvars.hcl ├── alpine-3.22.pkrvars.hcl ├── opnsense-25.7.pkrvars.hcl ├── generic.pkr.hcl ├── README.md └── variables.pkr.hcl /http/ubuntu/meta-data: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /http/windows-scripts/.gitignore: -------------------------------------------------------------------------------- 1 | custom/* 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | config.json 2 | my.pkrvars.hcl 3 | packer_cache/ 4 | *.iso 5 | !Autounattend.iso 6 | packer.exe 7 | *.auto.pkrvars.hcl 8 | -------------------------------------------------------------------------------- /http/talos/schematic.yaml: -------------------------------------------------------------------------------- 1 | customization: 2 | systemExtensions: 3 | officialExtensions: 4 | - siderolabs/qemu-guest-agent 5 | - siderolabs/iscsi-tools 6 | - siderolabs/util-linux-tools 7 | -------------------------------------------------------------------------------- /config.pkr.hcl: -------------------------------------------------------------------------------- 1 | packer { 2 | required_plugins { 3 | proxmox = { 4 | # renovate: githubReleaseVar repo=hashicorp/packer-plugin-proxmox 5 | version = "v1.2.3" 6 | source = "github.com/hashicorp/proxmox" 7 | } 8 | } 9 | } -------------------------------------------------------------------------------- /http/alpine/answers: -------------------------------------------------------------------------------- 1 | KEYMAPOPTS="us us" 2 | HOSTNAMEOPTS="-n alpine" 3 | INTERFACESOPTS="auto lo 4 | iface lo inet loopback 5 | 6 | auto eth0 7 | iface eth0 inet dhcp 8 | " 9 | DNSOPTS="-n 192.168.1.1" 10 | TIMEZONEOPTS="-z UTC" 11 | PROXYOPTS="none" 12 | APKREPOSOPTS="-1" 13 | SSHDOPTS="-c openssh" 14 | NTPOPTS="-c openntpd" 15 | DISKOPTS="-L -m sys /dev/sda" -------------------------------------------------------------------------------- /.github/workflows/talos.yml: -------------------------------------------------------------------------------- 1 | name: Talos 2 | on: 3 | workflow_dispatch: 4 | push: 5 | branches: [master] 6 | paths: ['talos.pkrvars.hcl'] 7 | jobs: 8 | build: 9 | uses: ./.github/workflows/packer.yml 10 | with: 11 | name: talos 12 | vm_id: 1012 13 | secrets: 14 | netbird_setup_key: ${{ secrets.NETBIRD_SETUP_KEY }} 15 | proxmox_host: ${{ secrets.proxmox_host }} 16 | proxmox_user: ${{ secrets.proxmox_user }} 17 | proxmox_password: ${{ secrets.proxmox_password }} 18 | -------------------------------------------------------------------------------- /.github/workflows/rocky-9.yml: -------------------------------------------------------------------------------- 1 | name: Rocky-9 2 | on: 3 | workflow_dispatch: 4 | push: 5 | branches: [master] 6 | paths: ['rocky-9.pkrvars.hcl'] 7 | jobs: 8 | build: 9 | uses: ./.github/workflows/packer.yml 10 | with: 11 | name: rocky-9 12 | vm_id: 1009 13 | secrets: 14 | netbird_setup_key: ${{ secrets.NETBIRD_SETUP_KEY }} 15 | proxmox_host: ${{ secrets.proxmox_host }} 16 | proxmox_user: ${{ secrets.proxmox_user }} 17 | proxmox_password: ${{ secrets.proxmox_password }} 18 | -------------------------------------------------------------------------------- /.github/workflows/rocky-10.yml: -------------------------------------------------------------------------------- 1 | name: Rocky-10 2 | on: 3 | workflow_dispatch: 4 | push: 5 | branches: [master] 6 | paths: ['rocky-10.pkrvars.hcl'] 7 | jobs: 8 | build: 9 | uses: ./.github/workflows/packer.yml 10 | with: 11 | name: rocky-10 12 | vm_id: 1018 13 | secrets: 14 | netbird_setup_key: ${{ secrets.NETBIRD_SETUP_KEY }} 15 | proxmox_host: ${{ secrets.proxmox_host }} 16 | proxmox_user: ${{ secrets.proxmox_user }} 17 | proxmox_password: ${{ secrets.proxmox_password }} 18 | -------------------------------------------------------------------------------- /.github/workflows/debian-12.yml: -------------------------------------------------------------------------------- 1 | name: Debian-12 2 | on: 3 | workflow_dispatch: 4 | push: 5 | branches: [master] 6 | paths: ['debian-12.pkrvars.hcl'] 7 | jobs: 8 | build: 9 | uses: ./.github/workflows/packer.yml 10 | with: 11 | name: debian-12 12 | vm_id: 1006 13 | secrets: 14 | netbird_setup_key: ${{ secrets.NETBIRD_SETUP_KEY }} 15 | proxmox_host: ${{ secrets.proxmox_host }} 16 | proxmox_user: ${{ secrets.proxmox_user }} 17 | proxmox_password: ${{ secrets.proxmox_password }} 18 | -------------------------------------------------------------------------------- /.github/workflows/debian-13.yml: -------------------------------------------------------------------------------- 1 | name: Debian-13 2 | on: 3 | workflow_dispatch: 4 | push: 5 | branches: [master] 6 | paths: ['debian-13.pkrvars.hcl'] 7 | jobs: 8 | build: 9 | uses: ./.github/workflows/packer.yml 10 | with: 11 | name: debian-13 12 | vm_id: 1020 13 | secrets: 14 | netbird_setup_key: ${{ secrets.NETBIRD_SETUP_KEY }} 15 | proxmox_host: ${{ secrets.proxmox_host }} 16 | proxmox_user: ${{ secrets.proxmox_user }} 17 | proxmox_password: ${{ secrets.proxmox_password }} 18 | -------------------------------------------------------------------------------- /.github/workflows/almalinux-9.yml: -------------------------------------------------------------------------------- 1 | name: AlmaLinux-9 2 | on: 3 | workflow_dispatch: 4 | push: 5 | branches: [master] 6 | paths: ['almalinux-9.pkrvars.hcl'] 7 | jobs: 8 | build: 9 | uses: ./.github/workflows/packer.yml 10 | with: 11 | name: almalinux-9 12 | vm_id: 1011 13 | secrets: 14 | netbird_setup_key: ${{ secrets.NETBIRD_SETUP_KEY }} 15 | proxmox_host: ${{ secrets.proxmox_host }} 16 | proxmox_user: ${{ secrets.proxmox_user }} 17 | proxmox_password: ${{ secrets.proxmox_password }} 18 | -------------------------------------------------------------------------------- /.github/workflows/alpine-3.19.yml: -------------------------------------------------------------------------------- 1 | name: Alpine-3.19 2 | on: 3 | workflow_dispatch: 4 | push: 5 | branches: [master] 6 | paths: ['alpine-3.19.pkrvars.hcl'] 7 | jobs: 8 | build: 9 | uses: ./.github/workflows/packer.yml 10 | with: 11 | name: alpine-3.19 12 | vm_id: 1010 13 | secrets: 14 | netbird_setup_key: ${{ secrets.NETBIRD_SETUP_KEY }} 15 | proxmox_host: ${{ secrets.proxmox_host }} 16 | proxmox_user: ${{ secrets.proxmox_user }} 17 | proxmox_password: ${{ secrets.proxmox_password }} 18 | -------------------------------------------------------------------------------- /.github/workflows/alpine-3.20.yml: -------------------------------------------------------------------------------- 1 | name: Alpine-3.20 2 | on: 3 | workflow_dispatch: 4 | push: 5 | branches: [master] 6 | paths: ['alpine-3.20.pkrvars.hcl'] 7 | jobs: 8 | build: 9 | uses: ./.github/workflows/packer.yml 10 | with: 11 | name: alpine-3.20 12 | vm_id: 1013 13 | secrets: 14 | netbird_setup_key: ${{ secrets.NETBIRD_SETUP_KEY }} 15 | proxmox_host: ${{ secrets.proxmox_host }} 16 | proxmox_user: ${{ secrets.proxmox_user }} 17 | proxmox_password: ${{ secrets.proxmox_password }} 18 | -------------------------------------------------------------------------------- /.github/workflows/alpine-3.21.yml: -------------------------------------------------------------------------------- 1 | name: Alpine-3.21 2 | on: 3 | workflow_dispatch: 4 | push: 5 | branches: [master] 6 | paths: ['alpine-3.21.pkrvars.hcl'] 7 | jobs: 8 | build: 9 | uses: ./.github/workflows/packer.yml 10 | with: 11 | name: alpine-3.21 12 | vm_id: 1014 13 | secrets: 14 | netbird_setup_key: ${{ secrets.NETBIRD_SETUP_KEY }} 15 | proxmox_host: ${{ secrets.proxmox_host }} 16 | proxmox_user: ${{ secrets.proxmox_user }} 17 | proxmox_password: ${{ secrets.proxmox_password }} 18 | -------------------------------------------------------------------------------- /.github/workflows/alpine-3.22.yml: -------------------------------------------------------------------------------- 1 | name: Alpine-3.22 2 | on: 3 | workflow_dispatch: 4 | push: 5 | branches: [master] 6 | paths: ['alpine-3.22.pkrvars.hcl'] 7 | jobs: 8 | build: 9 | uses: ./.github/workflows/packer.yml 10 | with: 11 | name: alpine-3.22 12 | vm_id: 1015 13 | secrets: 14 | netbird_setup_key: ${{ secrets.NETBIRD_SETUP_KEY }} 15 | proxmox_host: ${{ secrets.proxmox_host }} 16 | proxmox_user: ${{ secrets.proxmox_user }} 17 | proxmox_password: ${{ secrets.proxmox_password }} 18 | -------------------------------------------------------------------------------- /.github/workflows/almalinux-10.yml: -------------------------------------------------------------------------------- 1 | name: AlmaLinux-10 2 | on: 3 | workflow_dispatch: 4 | push: 5 | branches: [master] 6 | paths: ['almalinux-10.pkrvars.hcl'] 7 | jobs: 8 | build: 9 | uses: ./.github/workflows/packer.yml 10 | with: 11 | name: almalinux-10 12 | vm_id: 1017 13 | secrets: 14 | netbird_setup_key: ${{ secrets.NETBIRD_SETUP_KEY }} 15 | proxmox_host: ${{ secrets.proxmox_host }} 16 | proxmox_user: ${{ secrets.proxmox_user }} 17 | proxmox_password: ${{ secrets.proxmox_password }} 18 | -------------------------------------------------------------------------------- /.github/workflows/ubuntu-22.04.yml: -------------------------------------------------------------------------------- 1 | name: Ubuntu-22.04 2 | on: 3 | workflow_dispatch: 4 | push: 5 | branches: [master] 6 | paths: ['ubuntu-22.04.pkrvars.hcl'] 7 | jobs: 8 | build: 9 | uses: ./.github/workflows/packer.yml 10 | with: 11 | name: ubuntu-22.04 12 | vm_id: 1007 13 | secrets: 14 | netbird_setup_key: ${{ secrets.NETBIRD_SETUP_KEY }} 15 | proxmox_host: ${{ secrets.proxmox_host }} 16 | proxmox_user: ${{ secrets.proxmox_user }} 17 | proxmox_password: ${{ secrets.proxmox_password }} 18 | -------------------------------------------------------------------------------- /.github/workflows/ubuntu-24.04.yml: -------------------------------------------------------------------------------- 1 | name: Ubuntu-24.04 2 | on: 3 | workflow_dispatch: 4 | push: 5 | branches: [master] 6 | paths: ['ubuntu-24.04.pkrvars.hcl'] 7 | jobs: 8 | build: 9 | uses: ./.github/workflows/packer.yml 10 | with: 11 | name: ubuntu-24.04 12 | vm_id: 1016 13 | secrets: 14 | netbird_setup_key: ${{ secrets.NETBIRD_SETUP_KEY }} 15 | proxmox_host: ${{ secrets.proxmox_host }} 16 | proxmox_user: ${{ secrets.proxmox_user }} 17 | proxmox_password: ${{ secrets.proxmox_password }} 18 | -------------------------------------------------------------------------------- /.github/workflows/debian-11.yml: -------------------------------------------------------------------------------- 1 | name: Debian-11 2 | on: 3 | workflow_dispatch: 4 | push: 5 | branches: [master] 6 | paths: ['debian-11.pkrvars.hcl'] 7 | jobs: 8 | build: 9 | uses: ./.github/workflows/packer.yml 10 | with: 11 | name: debian-11 12 | vm_id: 1003 13 | secrets: 14 | netbird_setup_key: ${{ secrets.NETBIRD_SETUP_KEY }} 15 | proxmox_host: ${{ secrets.proxmox_host }} 16 | proxmox_user: ${{ secrets.proxmox_user }} 17 | proxmox_password: ${{ secrets.proxmox_password }} 18 | -------------------------------------------------------------------------------- /.github/workflows/ubuntu-18.04.yml: -------------------------------------------------------------------------------- 1 | name: Ubuntu-18.04 2 | on: 3 | workflow_dispatch: 4 | push: 5 | branches: [master] 6 | paths: ['ubuntu-18.04.pkrvars.hcl'] 7 | jobs: 8 | build: 9 | uses: ./.github/workflows/packer.yml 10 | with: 11 | name: ubuntu-18.04 12 | vm_id: 1001 13 | secrets: 14 | netbird_setup_key: ${{ secrets.NETBIRD_SETUP_KEY }} 15 | proxmox_host: ${{ secrets.proxmox_host }} 16 | proxmox_user: ${{ secrets.proxmox_user }} 17 | proxmox_password: ${{ secrets.proxmox_password }} 18 | -------------------------------------------------------------------------------- /.github/workflows/ubuntu-20.04.yml: -------------------------------------------------------------------------------- 1 | name: Ubuntu-20.04 2 | on: 3 | workflow_dispatch: 4 | push: 5 | branches: [master] 6 | paths: ['ubuntu-20.04.pkrvars.hcl'] 7 | jobs: 8 | build: 9 | uses: ./.github/workflows/packer.yml 10 | with: 11 | name: ubuntu-20.04 12 | vm_id: 1000 13 | secrets: 14 | netbird_setup_key: ${{ secrets.NETBIRD_SETUP_KEY }} 15 | proxmox_host: ${{ secrets.proxmox_host }} 16 | proxmox_user: ${{ secrets.proxmox_user }} 17 | proxmox_password: ${{ secrets.proxmox_password }} 18 | -------------------------------------------------------------------------------- /.github/workflows/windows-11.yml: -------------------------------------------------------------------------------- 1 | name: Windows-11 2 | on: 3 | workflow_dispatch: 4 | push: 5 | branches: [master] 6 | paths: ['windows-11.pkrvars.hcl'] 7 | jobs: 8 | build: 9 | uses: ./.github/workflows/packer.yml 10 | with: 11 | name: windows-11 12 | vm_id: 1021 13 | os_type: windows 14 | secrets: 15 | netbird_setup_key: ${{ secrets.NETBIRD_SETUP_KEY }} 16 | proxmox_host: ${{ secrets.proxmox_host }} 17 | proxmox_user: ${{ secrets.proxmox_user }} 18 | proxmox_password: ${{ secrets.proxmox_password }} 19 | -------------------------------------------------------------------------------- /.github/workflows/opnsense-25.7.yml: -------------------------------------------------------------------------------- 1 | name: Opnsense-25.7 2 | on: 3 | workflow_dispatch: 4 | push: 5 | branches: [master] 6 | paths: ['opnsense-25.7.pkrvars.hcl'] 7 | jobs: 8 | build: 9 | uses: ./.github/workflows/packer.yml 10 | with: 11 | name: opnsense-25.7 12 | vm_id: 1022 13 | os_type: opnsense 14 | secrets: 15 | netbird_setup_key: ${{ secrets.NETBIRD_SETUP_KEY }} 16 | proxmox_host: ${{ secrets.proxmox_host }} 17 | proxmox_user: ${{ secrets.proxmox_user }} 18 | proxmox_password: ${{ secrets.proxmox_password }} 19 | -------------------------------------------------------------------------------- /rocky-9.pkrvars.hcl: -------------------------------------------------------------------------------- 1 | # renovate: datasource=custom.rockyLinuxRelease 2 | name = "rocky-9-template" 3 | iso_file = "Rocky-9.7-x86_64-minimal.iso" 4 | iso_url = "https://download.rockylinux.org/pub/rocky/9.7/isos/x86_64/Rocky-9.7-x86_64-minimal.iso" 5 | iso_checksum = "file:https://download.rockylinux.org/pub/rocky/9.7/isos/x86_64/CHECKSUM" 6 | http_directory = "./http/rocky-9" 7 | boot_wait = "5s" 8 | boot_command = [" text inst.ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/ks.cfg"] 9 | provisioner = [ 10 | "userdel --remove --force packer" 11 | ] 12 | -------------------------------------------------------------------------------- /almalinux-9.pkrvars.hcl: -------------------------------------------------------------------------------- 1 | # renovate: datasource=custom.almaLinuxRelease 2 | name = "almalinux-9-template" 3 | iso_file = "AlmaLinux-9.6-x86_64-minimal.iso" 4 | iso_url = "https://repo.almalinux.org/almalinux/9.6/isos/x86_64/AlmaLinux-9.6-x86_64-minimal.iso" 5 | iso_checksum = "file:https://repo.almalinux.org/almalinux/9.6/isos/x86_64/CHECKSUM" 6 | http_directory = "./http/almalinux-9" 7 | boot_wait = "5s" 8 | boot_command = [" text inst.ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/ks.cfg"] 9 | provisioner = [ 10 | "userdel --remove --force packer" 11 | ] 12 | -------------------------------------------------------------------------------- /.github/workflows/windows-server-2022.yml: -------------------------------------------------------------------------------- 1 | name: Windows-Server-2022 2 | on: 3 | workflow_dispatch: 4 | push: 5 | branches: [master] 6 | paths: ['windows-server-2022.pkrvars.hcl'] 7 | jobs: 8 | build: 9 | uses: ./.github/workflows/packer.yml 10 | with: 11 | name: windows-server-2022 12 | vm_id: 1008 13 | os_type: windows 14 | secrets: 15 | netbird_setup_key: ${{ secrets.NETBIRD_SETUP_KEY }} 16 | proxmox_host: ${{ secrets.proxmox_host }} 17 | proxmox_user: ${{ secrets.proxmox_user }} 18 | proxmox_password: ${{ secrets.proxmox_password }} 19 | -------------------------------------------------------------------------------- /.github/workflows/windows-server-2025.yml: -------------------------------------------------------------------------------- 1 | name: Windows-Server-2025 2 | on: 3 | workflow_dispatch: 4 | push: 5 | branches: [master] 6 | paths: ['windows-server-2025.pkrvars.hcl'] 7 | jobs: 8 | build: 9 | uses: ./.github/workflows/packer.yml 10 | with: 11 | name: windows-server-2025 12 | vm_id: 1019 13 | os_type: windows 14 | secrets: 15 | netbird_setup_key: ${{ secrets.NETBIRD_SETUP_KEY }} 16 | proxmox_host: ${{ secrets.proxmox_host }} 17 | proxmox_user: ${{ secrets.proxmox_user }} 18 | proxmox_password: ${{ secrets.proxmox_password }} 19 | -------------------------------------------------------------------------------- /.github/workflows/windows-server-2019.yml: -------------------------------------------------------------------------------- 1 | name: Windows-Server-2019 2 | on: 3 | workflow_dispatch: 4 | push: 5 | branches: [master] 6 | paths: ['windows-server-2019.pkrvars.hcl'] 7 | jobs: 8 | build: 9 | uses: ./.github/workflows/packer.yml 10 | with: 11 | name: windows-server-2019 12 | vm_id: 1005 13 | os_type: windows 14 | secrets: 15 | netbird_setup_key: ${{ secrets.NETBIRD_SETUP_KEY }} 16 | proxmox_host: ${{ secrets.proxmox_host }} 17 | proxmox_user: ${{ secrets.proxmox_user }} 18 | proxmox_password: ${{ secrets.proxmox_password }} 19 | -------------------------------------------------------------------------------- /http/ubuntu/user-data: -------------------------------------------------------------------------------- 1 | #cloud-config 2 | autoinstall: 3 | version: 1 4 | identity: 5 | hostname: ubuntu 6 | username: packer 7 | password: '$6$FhcddHFVZ7ABA4Gi$QybBjJXeTESb.NIDf7umP5rubBXM0N.SseGarXYz1kZpit8UgV6CVWo7ubIoacgdBEPUXTWXe92GyAVJ.jOJZ.' 8 | network: 9 | network: 10 | version: 2 11 | ethernets: 12 | ens18: 13 | dhcp4: true 14 | storage: 15 | layout: 16 | name: direct 17 | packages: 18 | - qemu-guest-agent 19 | ssh: 20 | install-server: true 21 | late-commands: 22 | - curtin in-target --target=/target -- apt update 23 | - curtin in-target --target=/target -- apt upgrade -y -------------------------------------------------------------------------------- /ubuntu-20.04.pkrvars.hcl: -------------------------------------------------------------------------------- 1 | # renovate: datasource=custom.ubuntuLinuxRelease 2 | name = "ubuntu-20.04-template" 3 | iso_file = "ubuntu-20.04.5-live-server-amd64.iso" 4 | iso_url = "https://old-releases.ubuntu.com/releases/20.04/ubuntu-20.04.5-live-server-amd64.iso" 5 | iso_checksum = "file:https://old-releases.ubuntu.com/releases/20.04/SHA256SUMS" 6 | http_directory = "./http/ubuntu" 7 | boot_wait = "5s" 8 | boot_command = [ 9 | " ", 10 | "autoinstall ds=nocloud-net;s=http://{{ .HTTPIP }}:{{ .HTTPPort }}/", 11 | "" 12 | ] 13 | provisioner = [ 14 | "cloud-init clean", 15 | "rm /etc/cloud/cloud.cfg.d/*", 16 | "userdel --remove --force packer" 17 | ] 18 | -------------------------------------------------------------------------------- /rocky-10.pkrvars.hcl: -------------------------------------------------------------------------------- 1 | # renovate: datasource=custom.rockyLinuxRelease 2 | name = "rocky-10-template" 3 | iso_file = "Rocky-10.1-x86_64-minimal.iso" 4 | iso_url = "https://download.rockylinux.org/pub/rocky/10.1/isos/x86_64/Rocky-10.1-x86_64-minimal.iso" 5 | iso_checksum = "file:https://download.rockylinux.org/pub/rocky/10.1/isos/x86_64/CHECKSUM" 6 | http_directory = "./http/rocky-10" 7 | boot_wait = "5s" 8 | boot_command = [ 9 | "c ", 10 | "linux /images/pxeboot/vmlinuz inst.text inst.ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/ks.cfg", 11 | "", 12 | "initrd /images/pxeboot/initrd.img", 13 | "", 14 | "boot", 15 | "" 16 | ] 17 | provisioner = [ 18 | "userdel --remove --force packer" 19 | ] 20 | -------------------------------------------------------------------------------- /almalinux-10.pkrvars.hcl: -------------------------------------------------------------------------------- 1 | # renovate: datasource=custom.almaLinuxRelease 2 | name = "almalinux-10-template" 3 | iso_file = "AlmaLinux-10.0-x86_64-minimal.iso" 4 | iso_url = "https://repo.almalinux.org/almalinux/10.0/isos/x86_64/AlmaLinux-10.0-x86_64-minimal.iso" 5 | iso_checksum = "file:https://repo.almalinux.org/almalinux/10.0/isos/x86_64/CHECKSUM" 6 | http_directory = "./http/almalinux-10" 7 | boot_wait = "5s" 8 | boot_command = [ 9 | "c ", 10 | "linux /images/pxeboot/vmlinuz inst.text inst.ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/ks.cfg", 11 | "", 12 | "initrd /images/pxeboot/initrd.img", 13 | "", 14 | "boot", 15 | "" 16 | ] 17 | provisioner = [ 18 | "userdel --remove --force packer" 19 | ] 20 | -------------------------------------------------------------------------------- /ubuntu-22.04.pkrvars.hcl: -------------------------------------------------------------------------------- 1 | # renovate: datasource=custom.ubuntuLinuxRelease 2 | name = "ubuntu-22.04-template" 3 | iso_file = "ubuntu-22.04.4-live-server-amd64.iso" 4 | iso_url = "https://old-releases.ubuntu.com/releases/22.04/ubuntu-22.04.4-live-server-amd64.iso" 5 | iso_checksum = "file:https://old-releases.ubuntu.com/releases/22.04/SHA256SUMS" 6 | http_directory = "./http/ubuntu" 7 | boot_wait = "5s" 8 | boot_command = [ 9 | "c ", 10 | "linux /casper/vmlinuz --- autoinstall ds='nocloud-net;s=http://{{ .HTTPIP }}:{{ .HTTPPort }}/'", 11 | "", 12 | "initrd /casper/initrd", 13 | "", 14 | "boot", 15 | "" 16 | ] 17 | provisioner = [ 18 | "cloud-init clean", 19 | "rm /etc/cloud/cloud.cfg.d/*", 20 | "userdel --remove --force packer" 21 | ] 22 | -------------------------------------------------------------------------------- /ubuntu-24.04.pkrvars.hcl: -------------------------------------------------------------------------------- 1 | # renovate: datasource=custom.ubuntuLinuxRelease 2 | name = "ubuntu-24.04-template" 3 | iso_file = "ubuntu-24.04.2-live-server-amd64.iso" 4 | iso_url = "https://old-releases.ubuntu.com/releases/24.04/ubuntu-24.04.2-live-server-amd64.iso" 5 | iso_checksum = "file:https://old-releases.ubuntu.com/releases/24.04/SHA256SUMS" 6 | http_directory = "./http/ubuntu" 7 | boot_wait = "5s" 8 | boot_command = [ 9 | "c ", 10 | "linux /casper/vmlinuz --- autoinstall ds='nocloud-net;s=http://{{ .HTTPIP }}:{{ .HTTPPort }}/'", 11 | "", 12 | "initrd /casper/initrd", 13 | "", 14 | "boot", 15 | "" 16 | ] 17 | provisioner = [ 18 | "cloud-init clean", 19 | "rm /etc/cloud/cloud.cfg.d/*", 20 | "userdel --remove --force packer" 21 | ] 22 | -------------------------------------------------------------------------------- /ubuntu-18.04.pkrvars.hcl: -------------------------------------------------------------------------------- 1 | # renovate: datasource=custom.ubuntuLinuxRelease 2 | name = "ubuntu-18.04-template" 3 | iso_file = "ubuntu-18.04.5-server-amd64.iso" 4 | iso_url = "https://old-releases.ubuntu.com/releases/18.04/ubuntu-18.04.5-server-amd64.iso" 5 | iso_checksum = "file:https://old-releases.ubuntu.com/releases/18.04/SHA256SUMS" 6 | http_directory = "./http/ubuntu-18.04" 7 | boot_command = [ 8 | "", 9 | "", 10 | "", 11 | "/install/vmlinuz ", 12 | "initrd=/install/initrd.gz ", 13 | "priority=critical ", 14 | "locale=en_US ", 15 | "passwd/username=packer ", 16 | "passwd/user-fullname=packer ", 17 | "passwd/user-password=packer ", 18 | "passwd/user-password-again=packer ", 19 | "preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg", 20 | "" 21 | ] 22 | provisioner = [ 23 | "userdel --remove --force packer" 24 | ] 25 | -------------------------------------------------------------------------------- /talos.pkrvars.hcl: -------------------------------------------------------------------------------- 1 | name = "talos-template" 2 | iso_file = "archlinux-2024.08.01-x86_64.iso" 3 | iso_url = "https://www.archlinux.de/download/iso/2024.08.01/archlinux-2024.08.01-x86_64.iso" 4 | iso_checksum = "file:https://www.archlinux.de/download/iso/2024.08.01/sha256sums.txt" 5 | http_directory = "./http/talos" 6 | ssh_username = "root" 7 | boot_wait = "5s" 8 | boot_command = [ 9 | "", 10 | "passwdpackerpacker", 11 | ] 12 | provisioner = [ 13 | "curl -L http://$PACKER_HTTP_IP:$PACKER_HTTP_PORT/schematic.yaml -o schematic.yaml", 14 | "export SCHEMATIC=$(curl -L -X POST --data-binary @schematic.yaml https://factory.talos.dev/schematics | grep -o '\"id\":\"[^\"]*' | grep -o '[^\"]*$')", 15 | # renovate: githubReleaseVar repo=siderolabs/talos 16 | "curl -L https://factory.talos.dev/image/$SCHEMATIC/v1.12.0/nocloud-amd64.raw.xz -o /tmp/talos.raw.xz", 17 | "xz -d -c /tmp/talos.raw.xz | dd of=/dev/sda && sync" 18 | ] 19 | -------------------------------------------------------------------------------- /http/windows-scripts/setup.ps1: -------------------------------------------------------------------------------- 1 | $ErrorActionPreference = "Stop" 2 | 3 | # Switch network connection to private mode 4 | # Required for WinRM firewall rules 5 | $profile = Get-NetConnectionProfile 6 | Set-NetConnectionProfile -Name $profile.Name -NetworkCategory Private 7 | 8 | # Enable WinRM service 9 | winrm quickconfig -quiet 10 | winrm set winrm/config/service '@{AllowUnencrypted="true"}' 11 | winrm set winrm/config/service/auth '@{Basic="true"}' 12 | 13 | # Disable IPv6 because it leads to problems with proxmox terraform 14 | Get-NetAdapter | foreach { Disable-NetAdapterBinding -InterfaceAlias $_.Name -ComponentID ms_tcpip6 } 15 | 16 | # Reset auto logon count 17 | # https://docs.microsoft.com/en-us/windows-hardware/customize/desktop/unattend/microsoft-windows-shell-setup-autologon-logoncount#logoncount-known-issue 18 | Set-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon' -Name AutoLogonCount -Value 0 19 | 20 | # Run a custom installer script if there is one 21 | $customInstaller = Join-Path $PSScriptRoot "custom\custom.ps1" 22 | if (Test-Path $customInstaller) { 23 | & $customInstaller 24 | } 25 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 Pumba98 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /debian-13.pkrvars.hcl: -------------------------------------------------------------------------------- 1 | # renovate: datasource=custom.debianLinuxRelease 2 | name = "debian-13-template" 3 | iso_file = "debian-13.1.0-amd64-netinst.iso" 4 | iso_url = "https://cdimage.debian.org/mirror/cdimage/archive/13.1.0/amd64/iso-cd/debian-13.1.0-amd64-netinst.iso" 5 | iso_checksum = "file:https://cdimage.debian.org/mirror/cdimage/archive/13.1.0/amd64/iso-cd/SHA256SUMS" 6 | http_directory = "./http/debian" 7 | boot_command = [ 8 | "", 9 | "install ", 10 | " preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg ", 11 | "auto ", "locale=en_US.UTF-8 ", 12 | "kbd-chooser/method=us ", 13 | "keyboard-configuration/xkb-keymap=us ", 14 | "netcfg/get_hostname=debian ", 15 | "netcfg/get_domain=local ", 16 | "fb=false ", 17 | "debconf/frontend=noninteractive ", 18 | "console-setup/ask_detect=false ", 19 | "console-keymaps-at/keymap=us ", 20 | "grub-installer/bootdev=/dev/sda ", 21 | "passwd/username=packer ", 22 | "passwd/user-fullname=packer ", 23 | "passwd/user-password=packer ", 24 | "passwd/user-password-again=packer ", 25 | "" 26 | ] 27 | provisioner = [ 28 | "userdel --remove --force packer" 29 | ] 30 | -------------------------------------------------------------------------------- /debian-12.pkrvars.hcl: -------------------------------------------------------------------------------- 1 | # renovate: datasource=custom.debianLinuxRelease 2 | name = "debian-12-template" 3 | iso_file = "debian-12.12.0-amd64-netinst.iso" 4 | iso_url = "https://cdimage.debian.org/mirror/cdimage/archive/12.12.0/amd64/iso-cd/debian-12.12.0-amd64-netinst.iso" 5 | iso_checksum = "file:https://cdimage.debian.org/mirror/cdimage/archive/12.12.0/amd64/iso-cd/SHA256SUMS" 6 | http_directory = "./http/debian" 7 | boot_command = [ 8 | "", 9 | "install ", 10 | " preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg ", 11 | "auto ", "locale=en_US.UTF-8 ", 12 | "kbd-chooser/method=us ", 13 | "keyboard-configuration/xkb-keymap=us ", 14 | "netcfg/get_hostname=debian ", 15 | "netcfg/get_domain=local ", 16 | "fb=false ", 17 | "debconf/frontend=noninteractive ", 18 | "console-setup/ask_detect=false ", 19 | "console-keymaps-at/keymap=us ", 20 | "grub-installer/bootdev=/dev/sda ", 21 | "passwd/username=packer ", 22 | "passwd/user-fullname=packer ", 23 | "passwd/user-password=packer ", 24 | "passwd/user-password-again=packer ", 25 | "" 26 | ] 27 | provisioner = [ 28 | "userdel --remove --force packer" 29 | ] 30 | -------------------------------------------------------------------------------- /debian-11.pkrvars.hcl: -------------------------------------------------------------------------------- 1 | # renovate: datasource=custom.debianLinuxRelease 2 | name = "debian-11-template" 3 | iso_file = "debian-11.11.0-amd64-netinst.iso" 4 | iso_url = "https://cdimage.debian.org/mirror/cdimage/archive/11.11.0/amd64/iso-cd/debian-11.11.0-amd64-netinst.iso" 5 | iso_checksum = "file:https://cdimage.debian.org/mirror/cdimage/archive/11.11.0/amd64/iso-cd/SHA256SUMS" 6 | http_directory = "./http/debian" 7 | boot_command = [ 8 | "", 9 | "install ", 10 | " preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg ", 11 | "auto ", "locale=en_US.UTF-8 ", 12 | "kbd-chooser/method=us ", 13 | "keyboard-configuration/xkb-keymap=us ", 14 | "netcfg/get_hostname=debian ", 15 | "netcfg/get_domain=local ", 16 | "fb=false ", 17 | "debconf/frontend=noninteractive ", 18 | "console-setup/ask_detect=false ", 19 | "console-keymaps-at/keymap=us ", 20 | "grub-installer/bootdev=/dev/sda ", 21 | "passwd/username=packer ", 22 | "passwd/user-fullname=packer ", 23 | "passwd/user-password=packer ", 24 | "passwd/user-password-again=packer ", 25 | "" 26 | ] 27 | provisioner = [ 28 | "userdel --remove --force packer" 29 | ] 30 | 31 | -------------------------------------------------------------------------------- /windows-server-2022.pkrvars.hcl: -------------------------------------------------------------------------------- 1 | name = "windows-server-2022-template" 2 | iso_file = "SERVER_EVAL_x64FRE_en-us.iso" 3 | iso_url = "https://software-static.download.prss.microsoft.com/sg/download/888969d5-f34g-4e03-ac9d-1f9786c66749/SERVER_EVAL_x64FRE_en-us.iso" 4 | iso_checksum = "3e4fa6d8507b554856fc9ca6079cc402df11a8b79344871669f0251535255325" 5 | iso_download = true 6 | disk_size = "20G" 7 | additional_iso_files = [ 8 | { 9 | iso_file = "virtio-win-0.1.285.iso" 10 | iso_url = "https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/archive-virtio/virtio-win-0.1.285-1/virtio-win-0.1.285.iso" 11 | iso_checksum = "e14cf2b94492c3e925f0070ba7fdfedeb2048c91eea9c5a5afb30232a3976331" 12 | } 13 | ] 14 | unattended_content = { 15 | "/Autounattend.xml" = { 16 | template = "./http/windows/Autounattend-server.xml.pkrtpl" 17 | vars = { 18 | driver_version = "2k22" 19 | image_name = "Windows Server 2022 SERVERSTANDARD" 20 | } 21 | } 22 | } 23 | additional_cd_files = [ 24 | { 25 | type = "sata" 26 | index = 3 27 | files = ["./http/windows-scripts/*"] 28 | } 29 | ] 30 | os = "win10" 31 | communicator = "winrm" 32 | http_directory = "" 33 | boot_command = [] 34 | provisioner = [] 35 | -------------------------------------------------------------------------------- /windows-server-2019.pkrvars.hcl: -------------------------------------------------------------------------------- 1 | name = "windows-server-2019-template" 2 | iso_file = "17763.737.190906-2324.rs5_release_svc_refresh_SERVER_EVAL_x64FRE_en-us_1.iso" 3 | iso_url = "https://software-download.microsoft.com/download/pr/17763.737.190906-2324.rs5_release_svc_refresh_SERVER_EVAL_x64FRE_en-us_1.iso" 4 | iso_checksum = "549bca46c055157291be6c22a3aaaed8330e78ef4382c99ee82c896426a1cee1" 5 | iso_download = true 6 | disk_size = "20G" 7 | additional_iso_files = [ 8 | { 9 | iso_file = "virtio-win-0.1.285.iso" 10 | iso_url = "https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/archive-virtio/virtio-win-0.1.285-1/virtio-win-0.1.285.iso" 11 | iso_checksum = "e14cf2b94492c3e925f0070ba7fdfedeb2048c91eea9c5a5afb30232a3976331" 12 | } 13 | ] 14 | unattended_content = { 15 | "/Autounattend.xml" = { 16 | template = "./http/windows/Autounattend-server.xml.pkrtpl" 17 | vars = { 18 | driver_version = "2k19" 19 | image_name = "Windows Server 2019 SERVERSTANDARD" 20 | } 21 | } 22 | } 23 | additional_cd_files = [ 24 | { 25 | type = "sata" 26 | index = 3 27 | files = ["./http/windows-scripts/*"] 28 | } 29 | ] 30 | os = "win10" 31 | communicator = "winrm" 32 | http_directory = "" 33 | boot_command = [] 34 | provisioner = [] 35 | -------------------------------------------------------------------------------- /windows-server-2025.pkrvars.hcl: -------------------------------------------------------------------------------- 1 | name = "windows-server-2025-template" 2 | iso_file = "26100.1742.240906-0331.ge_release_svc_refresh_SERVER_EVAL_x64FRE_en-us.iso" 3 | iso_url = "https://software-static.download.prss.microsoft.com/dbazure/888969d5-f34g-4e03-ac9d-1f9786c66749/26100.1742.240906-0331.ge_release_svc_refresh_SERVER_EVAL_x64FRE_en-us.iso" 4 | iso_checksum = "d0ef4502e350e3c6c53c15b1b3020d38a5ded011bf04998e950720ac8579b23d" 5 | iso_download = true 6 | disk_size = "20G" 7 | additional_iso_files = [ 8 | { 9 | iso_file = "virtio-win-0.1.285.iso" 10 | iso_url = "https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/archive-virtio/virtio-win-0.1.285-1/virtio-win-0.1.285.iso" 11 | iso_checksum = "e14cf2b94492c3e925f0070ba7fdfedeb2048c91eea9c5a5afb30232a3976331" 12 | } 13 | ] 14 | unattended_content = { 15 | "/Autounattend.xml" = { 16 | template = "./http/windows/Autounattend-server.xml.pkrtpl" 17 | vars = { 18 | driver_version = "2k25" 19 | image_name = "Windows Server 2025 SERVERSTANDARD" 20 | } 21 | } 22 | } 23 | additional_cd_files = [ 24 | { 25 | type = "sata" 26 | index = 3 27 | files = ["./http/windows-scripts/*"] 28 | } 29 | ] 30 | os = "win11" 31 | communicator = "winrm" 32 | http_directory = "" 33 | boot_command = [] 34 | provisioner = [] 35 | -------------------------------------------------------------------------------- /windows-11.pkrvars.hcl: -------------------------------------------------------------------------------- 1 | name = "windows-11-template" 2 | iso_file = "26200.6584.250915-1905.25h2_ge_release_svc_refresh_CLIENTENTERPRISEEVAL_OEMRET_x64FRE_en-us.iso" 3 | iso_url = "https://software-static.download.prss.microsoft.com/dbazure/888969d5-f34g-4e03-ac9d-1f9786c66749/26200.6584.250915-1905.25h2_ge_release_svc_refresh_CLIENTENTERPRISEEVAL_OEMRET_x64FRE_en-us.iso" 4 | iso_checksum = "a61adeab895ef5a4db436e0a7011c92a2ff17bb0357f58b13bbc4062e535e7b9" 5 | iso_download = true 6 | disk_size = "20G" 7 | additional_iso_files = [ 8 | { 9 | iso_file = "virtio-win-0.1.285.iso" 10 | iso_url = "https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/archive-virtio/virtio-win-0.1.285-1/virtio-win-0.1.285.iso" 11 | iso_checksum = "e14cf2b94492c3e925f0070ba7fdfedeb2048c91eea9c5a5afb30232a3976331" 12 | } 13 | ] 14 | unattended_content = { 15 | "/Autounattend.xml" = { 16 | template = "./http/windows/Autounattend-win11.xml.pkrtpl" 17 | vars = { 18 | driver_version = "w11" 19 | image_name = "Windows 11 Enterprise Evaluation" 20 | } 21 | } 22 | } 23 | additional_cd_files = [ 24 | { 25 | type = "sata" 26 | index = 3 27 | files = ["./http/windows-scripts/*"] 28 | } 29 | ] 30 | os = "win11" 31 | communicator = "winrm" 32 | http_directory = "" 33 | boot_command = [] 34 | provisioner = [] 35 | -------------------------------------------------------------------------------- /http/rocky-9/ks.cfg: -------------------------------------------------------------------------------- 1 | # Use CD-ROM installation media 2 | # renovate: datasource=custom.rockyLinuxRelease depName=rocky-9-template 3 | repo --name="AppStream" --baseurl=http://download.rockylinux.org/pub/rocky/9.7/AppStream/x86_64/os/ 4 | cdrom 5 | # Use text install 6 | text 7 | # Don't run the Setup Agent on first boot 8 | firstboot --disabled 9 | ignoredisk --only-use=sda 10 | # Keyboard layouts 11 | keyboard --vckeymap=us --xlayouts='us' 12 | # System language 13 | lang en_US.UTF-8 14 | 15 | # Network information 16 | network --bootproto=dhcp --activate 17 | network --hostname=localhost.localdomain 18 | 19 | # Root password 20 | rootpw packer 21 | 22 | # System services 23 | selinux --permissive 24 | firewall --enabled 25 | services --enabled="NetworkManager,sshd,chronyd" 26 | # System timezone 27 | timezone Etc/UTC --utc 28 | # Partition clearing information 29 | clearpart --none --initlabel 30 | # Disk partitionning information 31 | part / --fstype="xfs" --grow --size=4096 32 | 33 | skipx 34 | 35 | user --name=packer --groups=wheel --plaintext --password=packer 36 | 37 | reboot 38 | 39 | %packages 40 | @^minimal-environment 41 | openssh-server 42 | openssh-clients 43 | qemu-guest-agent 44 | sudo 45 | curl 46 | wget 47 | python3 48 | 49 | %end 50 | 51 | %addon com_redhat_kdump --disable 52 | 53 | %end 54 | 55 | %post 56 | 57 | yum update -y 58 | yum install -y cloud-init 59 | 60 | echo '%wheel ALL=(ALL) NOPASSWD:ALL' > /etc/sudoers.d/wheel 61 | passwd -l root 62 | 63 | %end -------------------------------------------------------------------------------- /http/almalinux-9/ks.cfg: -------------------------------------------------------------------------------- 1 | # Use CD-ROM installation media 2 | # renovate: datasource=custom.almaLinuxRelease depName=almalinux-9-template 3 | repo --name="AppStream" --baseurl=http://repo.almalinux.org/almalinux/9.6/AppStream/x86_64/os/ 4 | cdrom 5 | # Use text install 6 | text 7 | # Don't run the Setup Agent on first boot 8 | firstboot --disabled 9 | ignoredisk --only-use=sda 10 | # Keyboard layouts 11 | keyboard --vckeymap=us --xlayouts='us' 12 | # System language 13 | lang en_US.UTF-8 14 | 15 | # Network information 16 | network --bootproto=dhcp --activate 17 | network --hostname=localhost.localdomain 18 | 19 | # Root password 20 | rootpw packer 21 | 22 | # System services 23 | selinux --permissive 24 | firewall --enabled 25 | services --enabled="NetworkManager,sshd,chronyd" 26 | # System timezone 27 | timezone Etc/UTC --utc 28 | # Partition clearing information 29 | clearpart --none --initlabel 30 | # Disk partitionning information 31 | part / --fstype="xfs" --grow --size=4096 32 | 33 | skipx 34 | 35 | user --name=packer --groups=wheel --plaintext --password=packer 36 | 37 | reboot 38 | 39 | %packages 40 | @^minimal-environment 41 | openssh-server 42 | openssh-clients 43 | qemu-guest-agent 44 | sudo 45 | curl 46 | wget 47 | python3 48 | 49 | %end 50 | 51 | %addon com_redhat_kdump --disable 52 | 53 | %end 54 | 55 | %post 56 | 57 | yum update -y 58 | yum install -y cloud-init 59 | 60 | echo '%wheel ALL=(ALL) NOPASSWD:ALL' > /etc/sudoers.d/wheel 61 | passwd -l root 62 | 63 | %end -------------------------------------------------------------------------------- /http/almalinux-10/ks.cfg: -------------------------------------------------------------------------------- 1 | # Use CD-ROM installation media 2 | # renovate: datasource=custom.rockyLinuxRelease depName=almalinux-10-template 3 | repo --name="BaseOS" --baseurl=http://repo.almalinux.org/almalinux/10.1/BaseOS/x86_64/os/ 4 | # renovate: datasource=custom.almaLinuxRelease depName=almalinux-10-template 5 | repo --name="AppStream" --baseurl=http://repo.almalinux.org/almalinux/10.0/AppStream/x86_64/os/ 6 | cdrom 7 | # Use text install 8 | text 9 | # Don't run the Setup Agent on first boot 10 | firstboot --disabled 11 | ignoredisk --only-use=sda 12 | # Keyboard layouts 13 | keyboard --vckeymap=us --xlayouts='us' 14 | # System language 15 | lang en_US.UTF-8 16 | 17 | # Network information 18 | network --device=link --bootproto=dhcp --hostname=localhost.localdomain 19 | 20 | # Root password 21 | rootpw packer 22 | 23 | # System services 24 | selinux --permissive 25 | firewall --enabled 26 | services --enabled="NetworkManager,sshd,chronyd" 27 | # System timezone 28 | timezone Etc/UTC --utc 29 | # Partition clearing information 30 | clearpart --none --initlabel 31 | # Disk partitionning information 32 | part biosboot --fstype=biosboot --size=1 33 | part / --fstype="xfs" --grow --size=4096 34 | 35 | skipx 36 | 37 | user --name=packer --groups=wheel --plaintext --password=packer 38 | 39 | reboot 40 | 41 | %packages 42 | @^minimal-environment 43 | openssh-server 44 | openssh-clients 45 | qemu-guest-agent 46 | sudo 47 | curl 48 | wget 49 | python3 50 | 51 | %end 52 | 53 | %addon com_redhat_kdump --disable 54 | 55 | %end 56 | 57 | %post 58 | 59 | yum update -y 60 | yum install -y cloud-init 61 | 62 | echo '%wheel ALL=(ALL) NOPASSWD:ALL' > /etc/sudoers.d/wheel 63 | passwd -l root 64 | 65 | %end -------------------------------------------------------------------------------- /http/rocky-10/ks.cfg: -------------------------------------------------------------------------------- 1 | # Use CD-ROM installation media 2 | # renovate: datasource=custom.rockyLinuxRelease depName=rocky-10-template 3 | repo --name="BaseOS" --baseurl=http://download.rockylinux.org/pub/rocky/10.1/BaseOS/x86_64/os/ 4 | # renovate: datasource=custom.rockyLinuxRelease depName=rocky-10-template 5 | repo --name="AppStream" --baseurl=http://download.rockylinux.org/pub/rocky/10.1/AppStream/x86_64/os/ 6 | cdrom 7 | # Use text install 8 | text 9 | # Don't run the Setup Agent on first boot 10 | firstboot --disabled 11 | ignoredisk --only-use=sda 12 | # Keyboard layouts 13 | keyboard --vckeymap=us --xlayouts='us' 14 | # System language 15 | lang en_US.UTF-8 16 | 17 | # Network information 18 | network --device=link --bootproto=dhcp --hostname=localhost.localdomain 19 | 20 | # Root password 21 | rootpw packer 22 | 23 | # System services 24 | selinux --permissive 25 | firewall --enabled 26 | services --enabled="NetworkManager,sshd,chronyd" 27 | # System timezone 28 | timezone Etc/UTC --utc 29 | # Partition clearing information 30 | clearpart --none --initlabel 31 | # Disk partitionning information 32 | part biosboot --fstype=biosboot --size=1 33 | part / --fstype="xfs" --grow --size=4096 34 | 35 | skipx 36 | 37 | user --name=packer --groups=wheel --plaintext --password=packer 38 | 39 | reboot 40 | 41 | %packages 42 | @^minimal-environment 43 | openssh-server 44 | openssh-clients 45 | qemu-guest-agent 46 | sudo 47 | curl 48 | wget 49 | python3 50 | 51 | %end 52 | 53 | %addon com_redhat_kdump --disable 54 | 55 | %end 56 | 57 | %post 58 | 59 | yum update -y 60 | yum install -y cloud-init 61 | 62 | echo '%wheel ALL=(ALL) NOPASSWD:ALL' > /etc/sudoers.d/wheel 63 | passwd -l root 64 | 65 | %end -------------------------------------------------------------------------------- /alpine-3.19.pkrvars.hcl: -------------------------------------------------------------------------------- 1 | # renovate: datasource=custom.alpineLinuxRelease 2 | name = "alpine-3.19-template" 3 | iso_file = "alpine-virt-3.19.9-x86_64.iso" 4 | iso_url = "https://dl-cdn.alpinelinux.org/alpine/v3.19/releases/x86_64/alpine-virt-3.19.9-x86_64.iso" 5 | iso_checksum = "file:https://dl-cdn.alpinelinux.org/alpine/v3.19/releases/x86_64/alpine-virt-3.19.9-x86_64.iso.sha256" 6 | http_directory = "./http/alpine" 7 | boot_command = [ 8 | "root", 9 | "ifconfig eth0 up && udhcpc -i eth0", 10 | "wget http://{{ .HTTPIP }}:{{ .HTTPPort }}/answers", 11 | "setup-alpine -f answers", 12 | "packer", 13 | "packer", 14 | "", 15 | "y", 16 | "rc-service sshd stop ", 17 | "mount /dev/vg0/lv_root /mnt", 18 | "mount --bind /dev/ /mnt/dev", 19 | "chroot /mnt", 20 | "echo https://dl-cdn.alpinelinux.org/alpine/v$(cat /etc/alpine-release | cut -d'.' -f1,2)/community/ >> /etc/apk/repositories", 21 | "apk update", 22 | "apk upgrade", 23 | "apk add --no-cache qemu-guest-agent", 24 | "rc-update add qemu-guest-agent", 25 | "apk add --no-cache sudo", 26 | "echo '%wheel ALL=(ALL) NOPASSWD:ALL' > /etc/sudoers.d/wheel", 27 | "adduser packer -H -D", 28 | "echo packer:packer | chpasswd", 29 | "adduser packer wheel", 30 | "exit", 31 | "umount /mnt/dev", 32 | "umount /mnt", 33 | "reboot" 34 | ] 35 | provisioner = [ 36 | "apk add --no-cache cloud-init", 37 | "setup-cloud-init", 38 | "passwd -l root", 39 | "deluser --remove-home packer" 40 | ] 41 | -------------------------------------------------------------------------------- /alpine-3.20.pkrvars.hcl: -------------------------------------------------------------------------------- 1 | # renovate: datasource=custom.alpineLinuxRelease 2 | name = "alpine-3.20-template" 3 | iso_file = "alpine-virt-3.20.8-x86_64.iso" 4 | iso_url = "https://dl-cdn.alpinelinux.org/alpine/v3.20/releases/x86_64/alpine-virt-3.20.8-x86_64.iso" 5 | iso_checksum = "file:https://dl-cdn.alpinelinux.org/alpine/v3.20/releases/x86_64/alpine-virt-3.20.8-x86_64.iso.sha256" 6 | http_directory = "./http/alpine" 7 | boot_command = [ 8 | "root", 9 | "ifconfig eth0 up && udhcpc -i eth0", 10 | "wget http://{{ .HTTPIP }}:{{ .HTTPPort }}/answers", 11 | "setup-alpine -f answers", 12 | "packer", 13 | "packer", 14 | "", 15 | "y", 16 | "rc-service sshd stop ", 17 | "mount /dev/vg0/lv_root /mnt", 18 | "mount --bind /dev/ /mnt/dev", 19 | "chroot /mnt", 20 | "echo https://dl-cdn.alpinelinux.org/alpine/v$(cat /etc/alpine-release | cut -d'.' -f1,2)/community/ >> /etc/apk/repositories", 21 | "apk update", 22 | "apk upgrade", 23 | "apk add --no-cache qemu-guest-agent", 24 | "rc-update add qemu-guest-agent", 25 | "apk add --no-cache sudo", 26 | "echo '%wheel ALL=(ALL) NOPASSWD:ALL' > /etc/sudoers.d/wheel", 27 | "adduser packer -H -D", 28 | "echo packer:packer | chpasswd", 29 | "adduser packer wheel", 30 | "exit", 31 | "umount /mnt/dev", 32 | "umount /mnt", 33 | "reboot" 34 | ] 35 | provisioner = [ 36 | "apk add --no-cache cloud-init", 37 | "setup-cloud-init", 38 | "passwd -l root", 39 | "deluser --remove-home packer" 40 | ] 41 | -------------------------------------------------------------------------------- /alpine-3.21.pkrvars.hcl: -------------------------------------------------------------------------------- 1 | # renovate: datasource=custom.alpineLinuxRelease 2 | name = "alpine-3.21-template" 3 | iso_file = "alpine-virt-3.21.5-x86_64.iso" 4 | iso_url = "https://dl-cdn.alpinelinux.org/alpine/v3.21/releases/x86_64/alpine-virt-3.21.5-x86_64.iso" 5 | iso_checksum = "file:https://dl-cdn.alpinelinux.org/alpine/v3.21/releases/x86_64/alpine-virt-3.21.5-x86_64.iso.sha256" 6 | http_directory = "./http/alpine" 7 | boot_command = [ 8 | "root", 9 | "ifconfig eth0 up && udhcpc -i eth0", 10 | "wget http://{{ .HTTPIP }}:{{ .HTTPPort }}/answers", 11 | "setup-alpine -f answers", 12 | "packer", 13 | "packer", 14 | "", 15 | "y", 16 | "rc-service sshd stop ", 17 | "mount /dev/vg0/lv_root /mnt", 18 | "mount --bind /dev/ /mnt/dev", 19 | "chroot /mnt", 20 | "echo https://dl-cdn.alpinelinux.org/alpine/v$(cat /etc/alpine-release | cut -d'.' -f1,2)/community/ >> /etc/apk/repositories", 21 | "apk update", 22 | "apk upgrade", 23 | "apk add --no-cache qemu-guest-agent", 24 | "rc-update add qemu-guest-agent", 25 | "apk add --no-cache sudo", 26 | "echo '%wheel ALL=(ALL) NOPASSWD:ALL' > /etc/sudoers.d/wheel", 27 | "adduser packer -H -D", 28 | "echo packer:packer | chpasswd", 29 | "adduser packer wheel", 30 | "exit", 31 | "umount /mnt/dev", 32 | "umount /mnt", 33 | "reboot" 34 | ] 35 | provisioner = [ 36 | "apk add --no-cache cloud-init", 37 | "setup-cloud-init", 38 | "passwd -l root", 39 | "deluser --remove-home packer" 40 | ] 41 | -------------------------------------------------------------------------------- /alpine-3.22.pkrvars.hcl: -------------------------------------------------------------------------------- 1 | # renovate: datasource=custom.alpineLinuxRelease 2 | name = "alpine-3.22-template" 3 | iso_file = "alpine-virt-3.22.2-x86_64.iso" 4 | iso_url = "https://dl-cdn.alpinelinux.org/alpine/v3.22/releases/x86_64/alpine-virt-3.22.2-x86_64.iso" 5 | iso_checksum = "file:https://dl-cdn.alpinelinux.org/alpine/v3.22/releases/x86_64/alpine-virt-3.22.2-x86_64.iso.sha256" 6 | http_directory = "./http/alpine" 7 | boot_command = [ 8 | "root", 9 | "ifconfig eth0 up && udhcpc -i eth0", 10 | "wget http://{{ .HTTPIP }}:{{ .HTTPPort }}/answers", 11 | "setup-alpine -f answers", 12 | "packer", 13 | "packer", 14 | "", 15 | "y", 16 | "rc-service sshd stop ", 17 | "mount /dev/vg0/lv_root /mnt", 18 | "mount --bind /dev/ /mnt/dev", 19 | "chroot /mnt", 20 | "echo https://dl-cdn.alpinelinux.org/alpine/v$(cat /etc/alpine-release | cut -d'.' -f1,2)/community/ >> /etc/apk/repositories", 21 | "apk update", 22 | "apk upgrade", 23 | "apk add --no-cache qemu-guest-agent", 24 | "rc-update add qemu-guest-agent", 25 | "apk add --no-cache sudo", 26 | "echo '%wheel ALL=(ALL) NOPASSWD:ALL' > /etc/sudoers.d/wheel", 27 | "adduser packer -H -D", 28 | "echo packer:packer | chpasswd", 29 | "adduser packer wheel", 30 | "exit", 31 | "umount /mnt/dev", 32 | "umount /mnt", 33 | "reboot" 34 | ] 35 | provisioner = [ 36 | "apk add --no-cache cloud-init", 37 | "setup-cloud-init", 38 | "passwd -l root", 39 | "deluser --remove-home packer" 40 | ] 41 | -------------------------------------------------------------------------------- /.github/workflows/packer.yml: -------------------------------------------------------------------------------- 1 | name: Packer 2 | on: 3 | workflow_call: 4 | inputs: 5 | name: 6 | required: true 7 | type: string 8 | vm_id: 9 | required: true 10 | type: number 11 | os_type: 12 | required: false 13 | type: string 14 | default: linux 15 | secrets: 16 | netbird_setup_key: 17 | required: true 18 | proxmox_host: 19 | required: true 20 | proxmox_user: 21 | required: true 22 | proxmox_password: 23 | required: true 24 | jobs: 25 | build: 26 | runs-on: ubuntu-latest 27 | steps: 28 | - name: Checkout code 29 | uses: actions/checkout@v6 30 | - name: Netbird Connect 31 | uses: Alemiz112/netbird-connect@175ca0487002e6d4d96d16da5f4b91f639e8a765 #v1.0.1 32 | with: 33 | setup-key: ${{ secrets.netbird_setup_key }} 34 | - name: Use Packer 35 | uses: hashicorp-contrib/setup-packer@v3 36 | with: 37 | # renovate: githubReleaseVar repo=hashicorp/packer 38 | packer-version: 1.14.3 39 | - name: Install mkisofs 40 | run: sudo apt update && sudo apt install -y mkisofs 41 | - name: Build image from template 42 | env: 43 | PKR_VAR_proxmox_host: ${{ secrets.proxmox_host }} 44 | PKR_VAR_proxmox_user: ${{ secrets.proxmox_user }} 45 | PKR_VAR_proxmox_password: ${{ secrets.proxmox_password }} 46 | PKR_VAR_node: proxmox 47 | PKR_VAR_pool: Templates 48 | PKR_VAR_iso_download: "true" 49 | PKR_VAR_iso_download_pve: "true" 50 | PKR_VAR_vmid: ${{ inputs.vm_id }} 51 | PKR_VAR_packer_http_interface: "wt0" 52 | PACKER_KEY_INTERVAL: 100ms 53 | run: | 54 | packer init config.pkr.hcl 55 | packer build -var-file="${{ inputs.name }}.pkrvars.hcl" -only="${{ inputs.os_type }}.*" -force . 56 | 57 | - name: Netbird Disconnect 58 | shell: bash 59 | run: sudo netbird down 60 | -------------------------------------------------------------------------------- /opnsense-25.7.pkrvars.hcl: -------------------------------------------------------------------------------- 1 | # renovate: datasource=custom.opnsenseRelease 2 | name = "opnsense-25.7-template" 3 | iso_file = "OPNsense-25.7-dvd-amd64.iso" 4 | iso_url = "https://pkg.opnsense.org/releases/25.7/OPNsense-25.7-dvd-amd64.iso.bz2" 5 | iso_checksum = "file:https://pkg.opnsense.org/releases/25.7/OPNsense-25.7-checksums-amd64.sha256" 6 | disk_size = "16G" # minimum 7 | memory = 4096 # minimum 8 | 9 | iso_download_pve = false # not compatible with bz2 10 | 11 | # default credentials - change this after installation 12 | ssh_username = "root" 13 | ssh_password = "opnsense" 14 | 15 | ################################################# 16 | # 17 | # - single nic 18 | # - make it the WAN device getting an IP via DHCP (usually it is LAN with a static 192.168.1.1) 19 | # - install opnsense-cli for updating the config.xml 20 | # - ssh is enable at boot time (root login, password) via config.xml 21 | # - firewall is **DISABLED** at boot time via config.xml 22 | # 23 | 24 | boot_wait = "90s" # 60s, 90s, 120s (change this if needed) 25 | boot_command = [ 26 | # login as installer 27 | "installer", 28 | "", 29 | "opnsense", 30 | "", 31 | 32 | # dialog for keyboard 33 | "", 34 | "", 35 | 36 | # choose (default) zfs installer 37 | "", 38 | "", 39 | # disk probe 40 | "", 41 | # select default stripe 42 | "", 43 | # select the only disk 44 | "", 45 | "", 46 | "", 47 | 48 | # confirm with yes 49 | "y", 50 | # wait for cloning to hard disk(change this if needed) 51 | "", 52 | 53 | # complete the installation 54 | "c", 55 | "", 56 | # reboot 57 | "", 58 | "r", 59 | "", 60 | 61 | # wait for boot (change this if needed) 62 | "", 63 | 64 | # login after install 65 | "root", 66 | "", 67 | "opnsense", 68 | "", 69 | 70 | # assign interface 71 | "", 72 | "1", 73 | "", 74 | 75 | # NO for LAGG 76 | "", 77 | "", 78 | "", 79 | 80 | # NO for VLAN 81 | "", 82 | "", 83 | "", 84 | 85 | # WAN interface name 86 | "", 87 | "vtnet0", 88 | "", 89 | 90 | # none 91 | "", 92 | "", 93 | 94 | # none 95 | "", 96 | "", 97 | 98 | # confirm 99 | "", 100 | "y", 101 | "", 102 | 103 | # wait to finish 104 | "", 105 | 106 | # shell login 107 | "8", 108 | "", 109 | 110 | # install opnsense-cli (this helps editing the config.xml) 111 | # https://github.com/mihakralj/opnsense-cli 112 | "", 113 | "pkg add https://github.com/mihakralj/opnsense-cli/releases/download/0.14.0/opnsense-cli-0.14.0.pkg", 114 | "", 115 | 116 | # start + setup ssh 117 | "", 118 | "service openssh onestart", 119 | "", 120 | 121 | # enable at boot time 122 | # 123 | # 124 | # enabled 125 | # 1 126 | # 1 127 | # 128 | "", 129 | "opnsense set system/ssh/enabled enabled && opnsense set system/ssh/passwordauth 1 && opnsense set system/ssh/permitrootlogin 1", 130 | "", 131 | 132 | # install os-qemu-guest-agent 133 | "", 134 | "pkg install -y os-qemu-guest-agent", 135 | "", 136 | 137 | # enable at boot time 138 | "", 139 | "sysrc qemu_guest_agent_enable=\"YES\"", 140 | "", 141 | 142 | # start guest agent now (ignore error) 143 | "", 144 | "service qemu-guest-agent start", 145 | "", 146 | 147 | # disable the firewall at boot 148 | # 149 | # yes 150 | "", 151 | "opnsense set system/disablefilter yes", 152 | "", 153 | 154 | # commit config.xml changes (ignore error) 155 | "", 156 | "yes | opnsense commit || true", 157 | "", 158 | 159 | # temp disable the firewall (this terminates packer) 160 | "", 161 | "pfctl -d", 162 | "" 163 | ] 164 | 165 | provisioner = [] 166 | -------------------------------------------------------------------------------- /.github/renovate.json5: -------------------------------------------------------------------------------- 1 | { 2 | extends: [ 3 | 'config:recommended', 4 | ], 5 | customManagers: [ 6 | { 7 | customType: 'regex', 8 | fileMatch: [ 9 | 'config.pkr.hcl', 10 | '.yml', 11 | '.pkrvars.hcl', 12 | ], 13 | matchStrings: [ 14 | 'githubReleaseVar repo=(?.*?)\n .*version = "(?.*)"\n', 15 | 'githubReleaseVar repo=(?.*?)\n .*version: (?.*)\n', 16 | 'githubReleaseVar repo=(?.*?)\n .*SCHEMATIC/(?.*)/nocloud', 17 | ], 18 | datasourceTemplate: 'github-releases', 19 | }, 20 | { 21 | customType: 'regex', 22 | fileMatch: [ 23 | '.pkrvars.hcl', 24 | '.cfg', 25 | ], 26 | matchStrings: [ 27 | 'datasource=(?\\S+)\nname *= "(?.*?)"\niso_file *= "debian-(?.*?)-amd64-netinst.iso"\niso_url *= "(?.*/)(.*)/amd64/iso-cd/debian-(.*)-amd64-netinst.iso"\niso_checksum *= "file:.*/amd64/iso-cd/SHA256SUMS"', 28 | 'datasource=(?\\S+)\nname *= "(?.*?)"\niso_file *= "ubuntu-(?.*?)-.*server-amd64.iso"\niso_url *= "(?.*/)(.*)/ubuntu-(.*)-.*server-amd64.iso"', 29 | 'datasource=(?\\S+)\nname *= "(?.*?)"\niso_file *= "alpine-virt-(?.*?)-x86_64.iso"\niso_url *= "(?.*)/alpine-virt-(.*)-x86_64.iso"\niso_checksum *= "file:.*/alpine-virt-(.*)-x86_64.iso.sha256"', 30 | 'datasource=(?\\S+)\nname *= "(?.*?)"\niso_file *= "Rocky-(?.*?)-x86_64-minimal.iso"\niso_url *= "(?.*)/(.*)/isos/x86_64/Rocky-(.*)-x86_64-minimal.iso"\niso_checksum *= "file:.*/(.*)/isos/x86_64/CHECKSUM"', 31 | 'datasource=(?\\S+) depName=(?.*?)\nrepo --name="BaseOS" --baseurl=http://download.rockylinux.org/pub/rocky/(?.*?)/BaseOS/x86_64/os/', 32 | 'datasource=(?\\S+) depName=(?.*?)\nrepo --name="AppStream" --baseurl=http://download.rockylinux.org/pub/rocky/(?.*?)/AppStream/x86_64/os/', 33 | 'datasource=(?\\S+)\nname *= "(?.*?)"\niso_file *= "AlmaLinux-(?.*?)-x86_64-minimal.iso"\niso_url *= "(?.*)/(.*)/isos/x86_64/AlmaLinux-(.*)-x86_64-minimal.iso"\niso_checksum *= "file:.*/(.*)/isos/x86_64/CHECKSUM"', 34 | 'datasource=(?\\S+) depName=(?.*?)\nrepo --name="BaseOS" --baseurl=http://repo.almalinux.org/almalinux/(?.*?)/BaseOS/x86_64/os/', 35 | 'datasource=(?\\S+) depName=(?.*?)\nrepo --name="AppStream" --baseurl=http://repo.almalinux.org/almalinux/(?.*?)/AppStream/x86_64/os/', 36 | 'datasource=(?\\S+)\nname *= "(?.*?)"\niso_file *= "OPNsense-(?.*?)-dvd-amd64.iso"\niso_url *= "(?.*/)(.*)/OPNsense-(.*)-dvd-amd64.iso.bz2"\niso_checksum *= "file:.*/OPNsense-(.*)-checksums-amd64.sha256"', 37 | ], 38 | datasourceTemplate: '{{ datasource }}', 39 | }, 40 | ], 41 | packageRules: [ 42 | { 43 | matchPackageNames: [ 44 | 'hashicorp/packer', 45 | ], 46 | extractVersion: '^v(?.*)$', 47 | }, 48 | { 49 | matchDatasources: [ 50 | 'custom.debianLinuxRelease', 51 | 'custom.ubuntuLinuxRelease', 52 | ], 53 | extractVersion: '^(?\\d+.\\d+.\\d+)/$', 54 | }, 55 | { 56 | matchDatasources: [ 57 | 'custom.rockyLinuxRelease', 58 | 'custom.almaLinuxRelease', 59 | 'custom.opnsenseRelease', 60 | ], 61 | extractVersion: '^(?\\d+.\\d+)/$', 62 | }, 63 | { 64 | matchDatasources: [ 65 | 'custom.alpineLinuxRelease', 66 | ], 67 | extractVersion: '^alpine-virt-(?\\d+.\\d+.\\d+)-x86_64.iso$', 68 | }, 69 | { 70 | matchDatasources: [ 71 | 'custom.ubuntuLinuxRelease', 72 | ], 73 | versioning: 'ubuntu', 74 | }, 75 | { 76 | matchDatasources: [ 77 | 'custom.debianLinuxRelease', 78 | 'custom.ubuntuLinuxRelease', 79 | 'custom.rockyLinuxRelease', 80 | 'custom.almaLinuxRelease', 81 | 'custom.opnsenseRelease', 82 | ], 83 | matchUpdateTypes: [ 84 | 'major', 85 | ], 86 | enabled: false, 87 | }, 88 | { 89 | matchDatasources: [ 90 | 'custom.alpineLinuxRelease', 91 | ], 92 | matchUpdateTypes: [ 93 | 'major', 94 | 'minor', 95 | ], 96 | enabled: false, 97 | }, 98 | ], 99 | customDatasources: { 100 | debianLinuxRelease: { 101 | defaultRegistryUrlTemplate: 'https://cdimage.debian.org/mirror/cdimage/archive/', 102 | format: 'html', 103 | }, 104 | ubuntuLinuxRelease: { 105 | defaultRegistryUrlTemplate: 'https://old-releases.ubuntu.com/releases/', 106 | format: 'html', 107 | }, 108 | alpineLinuxRelease: { 109 | defaultRegistryUrlTemplate: 'https://dl-cdn.alpinelinux.org/alpine/', 110 | format: 'html', 111 | }, 112 | rockyLinuxRelease: { 113 | defaultRegistryUrlTemplate: 'https://download.rockylinux.org/pub/rocky/', 114 | format: 'html', 115 | }, 116 | almaLinuxRelease: { 117 | defaultRegistryUrlTemplate: 'https://repo.almalinux.org/almalinux/', 118 | format: 'html', 119 | }, 120 | opnsenseRelease: { 121 | defaultRegistryUrlTemplate: 'https://pkg.opnsense.org/releases/', 122 | format: 'html', 123 | }, 124 | }, 125 | } 126 | -------------------------------------------------------------------------------- /generic.pkr.hcl: -------------------------------------------------------------------------------- 1 | locals { 2 | unattended_content = { 3 | for key, value in var.unattended_content : key => templatefile(value.template, merge(value.vars, { 4 | winrm_username = var.winrm_username 5 | winrm_password = var.winrm_password 6 | windows_edition = var.windows_edition == "" ? value.vars.image_name : var.windows_edition 7 | windows_language = var.windows_language 8 | windows_input_language = var.windows_input_language 9 | })) 10 | } 11 | unattended_as_cd = length(var.unattended_content) > 0 ? [{ 12 | type = "sata" 13 | index = 3 + length(var.unattended_content) 14 | content = local.unattended_content 15 | label = "Windows Unattended CD" 16 | }] : [] 17 | additional_cd_files = concat(var.additional_cd_files, local.unattended_as_cd) 18 | } 19 | 20 | source "proxmox-iso" "vm" { 21 | proxmox_url = "https://${var.proxmox_host}/api2/json" 22 | username = var.proxmox_user 23 | password = var.proxmox_password 24 | token = var.proxmox_token 25 | insecure_skip_tls_verify = var.proxmox_insecure_tls 26 | 27 | vm_id = var.vmid 28 | vm_name = var.name 29 | template_name = var.name 30 | template_description = var.description == "" ? "${var.name}, generated by packer at ${formatdate("YYYY-MM-DD hh:mm:ss", timestamp())}" : var.description 31 | node = var.node 32 | pool = var.pool 33 | 34 | cpu_type = var.cpu_type 35 | sockets = var.cpu_sockets 36 | cores = var.cpu_cores 37 | memory = var.memory 38 | 39 | http_interface = var.packer_http_interface 40 | http_bind_address = var.packer_http_bind_address 41 | http_port_min = var.packer_http_port == -1 ? 8000 : "${var.packer_http_port}" 42 | http_port_max = var.packer_http_port == -1 ? 9000 : "${var.packer_http_port}" 43 | 44 | disks { 45 | storage_pool = var.disk_storage_pool 46 | disk_size = var.disk_size 47 | format = var.disk_format 48 | type = var.disk_type 49 | cache_mode = var.disk_cache 50 | } 51 | 52 | network_adapters { 53 | bridge = var.network_adapter 54 | model = var.network_adapter_model 55 | mac_address = var.network_adapter_mac 56 | vlan_tag = var.network_adapter_vlan == -1 ? "" : "${var.network_adapter_vlan}" 57 | firewall = var.network_adapter_firewall 58 | } 59 | 60 | vga { 61 | type = var.vga_type 62 | memory = var.vga_memory 63 | } 64 | 65 | os = var.os 66 | scsi_controller = var.scsi_controller 67 | onboot = var.start_at_boot 68 | qemu_agent = var.qemu_agent 69 | bios = var.bios 70 | 71 | boot_iso { 72 | # type = var.iso_type 73 | # index = var.iso_index 74 | iso_file = var.iso_download ? "" : "${var.iso_storage_pool}:iso/${var.iso_file}" 75 | iso_storage_pool = var.iso_storage_pool 76 | iso_url = var.iso_download ? var.iso_url : "" 77 | iso_checksum = var.iso_checksum 78 | iso_download_pve = var.iso_download_pve 79 | unmount = var.iso_unmount 80 | } 81 | 82 | dynamic "additional_iso_files" { 83 | for_each = var.additional_iso_files 84 | content { 85 | # type = additional_iso_files.value.type 86 | # index = additional_iso_files.value.index 87 | iso_file = var.iso_download ? "" : "${var.iso_storage_pool}:iso/${additional_iso_files.value.iso_file}" 88 | iso_storage_pool = var.iso_storage_pool 89 | iso_url = var.iso_download ? additional_iso_files.value.iso_url : "" 90 | iso_checksum = additional_iso_files.value.iso_checksum 91 | iso_download_pve = var.iso_download_pve 92 | unmount = var.iso_unmount 93 | } 94 | } 95 | 96 | dynamic "additional_iso_files" { 97 | for_each = local.additional_cd_files 98 | iterator = iso 99 | content { 100 | type = iso.value.type 101 | index = iso.value.index 102 | iso_storage_pool = var.iso_storage_pool 103 | cd_files = contains(keys(iso.value), "files") ? iso.value.files : [] 104 | cd_content = contains(keys(iso.value), "content") ? iso.value.content : {} 105 | cd_label = contains(keys(iso.value), "label") ? iso.value.label : "" 106 | unmount = var.iso_unmount 107 | } 108 | } 109 | 110 | cloud_init = var.cloud_init 111 | cloud_init_storage_pool = var.cloud_init_storage_pool 112 | 113 | boot = "order=${var.disk_type}0;ide2;net0" 114 | boot_command = var.boot_command 115 | boot_wait = var.boot_wait 116 | task_timeout = var.task_timeout 117 | http_directory = var.http_directory 118 | communicator = var.communicator 119 | ssh_username = var.ssh_username 120 | ssh_password = var.ssh_password 121 | ssh_timeout = var.ssh_timeout 122 | winrm_username = var.winrm_username 123 | winrm_password = var.winrm_password 124 | winrm_insecure = var.winrm_insecure 125 | winrm_use_ssl = var.winrm_use_ssl 126 | } 127 | 128 | build { 129 | name = "linux" 130 | sources = ["source.proxmox-iso.vm"] 131 | 132 | provisioner "shell" { 133 | execute_command = "echo 'packer' | {{ .Vars }} sudo -S -E sh -eux '{{ .Path }}'" 134 | inline = var.provisioner 135 | skip_clean = true 136 | } 137 | } 138 | 139 | build { 140 | name = "opnsense" 141 | sources = ["source.proxmox-iso.vm"] 142 | } 143 | 144 | build { 145 | name = "windows" 146 | sources = ["source.proxmox-iso.vm"] 147 | } 148 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Packer Templates for Proxmox 2 | 3 | **Tested with Packer 1.10 and with Proxmox 8.1.4** 4 | 5 | Build VM Templates with Packer for Proxmox. The generated templates are meant to be used with cloud-init, they come without a User or root login. 6 | Only the Windows Server Template has a Administrator user by default (Password `packer`). It's ready for Ansible setup via winrm. 7 | 8 | **All templates are made for my personal environment and may need adjustments for yours!** 9 | 10 | ## Overview 11 | 12 | | OS | Status | 13 | | -------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 14 | | [Ubnuntu 24.04](./ubuntu-24.04.pkrvars.hcl) | [![ubuntu-24.04](https://github.com/Pumba98/proxmox-packer-templates/actions/workflows/ubuntu-24.04.yml/badge.svg)](https://github.com/Pumba98/proxmox-packer-templates/actions/workflows/ubuntu-24.04.yml) | 15 | | [Ubnuntu 22.04](./ubuntu-22.04.pkrvars.hcl) | [![ubuntu-22.04](https://github.com/Pumba98/proxmox-packer-templates/actions/workflows/ubuntu-22.04.yml/badge.svg)](https://github.com/Pumba98/proxmox-packer-templates/actions/workflows/ubuntu-22.04.yml) | 16 | | [Ubnuntu 20.04](./ubuntu-20.04.pkrvars.hcl) | [![ubuntu-20.04](https://github.com/Pumba98/proxmox-packer-templates/actions/workflows/ubuntu-20.04.yml/badge.svg)](https://github.com/Pumba98/proxmox-packer-templates/actions/workflows/ubuntu-20.04.yml) | 17 | | [Ubnuntu 18.04](./ubuntu-18.04.pkrvars.hcl) | [![ubuntu-18.04](https://github.com/Pumba98/proxmox-packer-templates/actions/workflows/ubuntu-18.04.yml/badge.svg)](https://github.com/Pumba98/proxmox-packer-templates/actions/workflows/ubuntu-18.04.yml) | 18 | | [Debian 13](./debian-13.pkrvars.hcl) | [![debian-13](https://github.com/Pumba98/proxmox-packer-templates/actions/workflows/debian-13.yml/badge.svg)](https://github.com/Pumba98/proxmox-packer-templates/actions/workflows/debian-13.yml) | 19 | | [Debian 12](./debian-12.pkrvars.hcl) | [![debian-12](https://github.com/Pumba98/proxmox-packer-templates/actions/workflows/debian-12.yml/badge.svg)](https://github.com/Pumba98/proxmox-packer-templates/actions/workflows/debian-12.yml) | 20 | | [Debian 11](./debian-11.pkrvars.hcl) | [![debian-11](https://github.com/Pumba98/proxmox-packer-templates/actions/workflows/debian-11.yml/badge.svg)](https://github.com/Pumba98/proxmox-packer-templates/actions/workflows/debian-11.yml) | 21 | | [AlmaLinux 10](./almalinux-10.pkrvars.hcl) | [![almalinux-10](https://github.com/Pumba98/proxmox-packer-templates/actions/workflows/almalinux-10.yml/badge.svg)](https://github.com/Pumba98/proxmox-packer-templates/actions/workflows/almalinux-10.yml) | 22 | | [AlmaLinux 9](./almalinux-9.pkrvars.hcl) | [![almalinux-9](https://github.com/Pumba98/proxmox-packer-templates/actions/workflows/almalinux-9.yml/badge.svg)](https://github.com/Pumba98/proxmox-packer-templates/actions/workflows/almalinux-9.yml) | 23 | | [Rocky 10](./rocky-10.pkrvars.hcl) | [![rocky-10](https://github.com/Pumba98/proxmox-packer-templates/actions/workflows/rocky-10.yml/badge.svg)](https://github.com/Pumba98/proxmox-packer-templates/actions/workflows/rocky-10.yml) | 24 | | [Rocky 9](./rocky-9.pkrvars.hcl) | [![rocky-9](https://github.com/Pumba98/proxmox-packer-templates/actions/workflows/rocky-9.yml/badge.svg)](https://github.com/Pumba98/proxmox-packer-templates/actions/workflows/rocky-9.yml) | 25 | | [Alpine 3.22](./alpine-3.22.pkrvars.hcl) | [![alpine-3.22](https://github.com/Pumba98/proxmox-packer-templates/actions/workflows/alpine-3.22.yml/badge.svg)](https://github.com/Pumba98/proxmox-packer-templates/actions/workflows/alpine-3.22.yml) | 26 | | [Alpine 3.21](./alpine-3.21.pkrvars.hcl) | [![alpine-3.21](https://github.com/Pumba98/proxmox-packer-templates/actions/workflows/alpine-3.21.yml/badge.svg)](https://github.com/Pumba98/proxmox-packer-templates/actions/workflows/alpine-3.21.yml) | 27 | | [Alpine 3.20](./alpine-3.20.pkrvars.hcl) | [![alpine-3.20](https://github.com/Pumba98/proxmox-packer-templates/actions/workflows/alpine-3.20.yml/badge.svg)](https://github.com/Pumba98/proxmox-packer-templates/actions/workflows/alpine-3.20.yml) | 28 | | [Alpine 3.19](./alpine-3.19.pkrvars.hcl) | [![alpine-3.19](https://github.com/Pumba98/proxmox-packer-templates/actions/workflows/alpine-3.19.yml/badge.svg)](https://github.com/Pumba98/proxmox-packer-templates/actions/workflows/alpine-3.19.yml) | 29 | | [Windows Server 2025](./windows-server-2025.pkrvars.hcl) | [![windows-server-2025](https://github.com/Pumba98/proxmox-packer-templates/actions/workflows/windows-server-2025.yml/badge.svg)](https://github.com/Pumba98/proxmox-packer-templates/actions/workflows/windows-server-2025.yml) | 30 | | [Windows Server 2022](./windows-server-2022.pkrvars.hcl) | [![windows-server-2022](https://github.com/Pumba98/proxmox-packer-templates/actions/workflows/windows-server-2022.yml/badge.svg)](https://github.com/Pumba98/proxmox-packer-templates/actions/workflows/windows-server-2022.yml) | 31 | | [Windows Server 2019](./windows-server-2019.pkrvars.hcl) | [![windows-server-2019](https://github.com/Pumba98/proxmox-packer-templates/actions/workflows/windows-server-2019.yml/badge.svg)](https://github.com/Pumba98/proxmox-packer-templates/actions/workflows/windows-server-2019.yml) | 32 | | [Windows 11](./windows-11.pkrvars.hcl) | [![windows-11](https://github.com/Pumba98/proxmox-packer-templates/actions/workflows/windows-11.yml/badge.svg)](https://github.com/Pumba98/proxmox-packer-templates/actions/workflows/windows-11.yml) | 33 | | [Talos Linux](./talos.pkrvars.hcl) | [![talos](https://github.com/Pumba98/proxmox-packer-templates/actions/workflows/talos.yml/badge.svg)](https://github.com/Pumba98/proxmox-packer-templates/actions/workflows/talos.yml) | 34 | | [OPNsense 25.7](./opnsense-25.7.pkrvars.hcl) | [![opnsense-25.7](https://github.com/Pumba98/proxmox-packer-templates/actions/workflows/opnsense-25.7.yml/badge.svg)](https://github.com/Pumba98/proxmox-packer-templates/actions/workflows/opnsense-25.7.yml) | 35 | 36 | ## How to build 37 | 38 | ### Prepare Packer 39 | 40 | First initialize the proxmox packer plugin: 41 | 42 | ```sh 43 | packer init config.pkr.hcl 44 | ``` 45 | 46 | ### Prepare your variables 47 | 48 | The templates all use a generic source builder ([generic.pkr.hcl](./generic.pkr.hcl)) that's driven by variables. The OS specific settings are only variables and preseed files. 49 | 50 | To build packer templates you need to set some variables via file (`-var-file=my.pkrvars.hcl`), cli (`-var variablename=value`), or environment (`PKR_VAR_variablename=value`): 51 | 52 | - proxmox_host 53 | - proxmox_user 54 | - proxmox_password 55 | - proxmox_token 56 | - node 57 | - vmid 58 | 59 | Other interesting variables are: 60 | 61 | - pool 62 | - proxmox_insecure_tls 63 | - disk_storage_pool 64 | - iso_storage_pool 65 | - cloud_init_storage_pool 66 | - iso_download 67 | - Windows: 68 | - windows_edition 69 | - windows_language / windows_input_language 70 | - winrm_username / winrm_password (Win11 alway creates a user, Win Server will use Administrator) 71 | 72 | See [variables.pkr.hcl](./variables.pkr.hcl) for all varaibles. 73 | 74 | ### Build a template 75 | 76 | To build a template (e.g. `debian-11`) run: 77 | 78 | ```sh 79 | packer build -var-file="debian-11.pkrvars.hcl" -only="linux.*" . 80 | ``` 81 | 82 | For opnsense: 83 | 84 | ```sh 85 | packer build -var-file="opnsense-25.7.pkrvars.hcl" -only="opnsense.*" . 86 | ``` 87 | 88 | For windows: 89 | 90 | ```sh 91 | packer build -var-file="windows-server-2019.pkrvars.hcl" -only="windows.*" . 92 | ``` 93 | 94 | ## Customization 95 | 96 | ### Windows 97 | 98 | You can run additional setup actions for windows by creating a file `http/windows-scripts/custom/custom.ps1`. 99 | 100 | Example: 101 | 102 | ```powershell 103 | # debloat Windows 11: https://github.com/Raphire/Win11Debloat 104 | & ([scriptblock]::Create((irm "https://debloat.raphi.re/"))) -RunDefaults -Sysprep -Silent 105 | ``` 106 | 107 | ## Useful Tips 108 | 109 | ### Packer Webserver Forwarding 110 | 111 | In some cases your proxmox server might be in a datacatenter. You can ssh to the proxmox server but the proxmox server can't connect to your build computer. 112 | 113 | Set the following variables in your configuration. 114 | 115 | - packer_http_interface to `127.0.0.1` 116 | - packer_http_port to `8000` 117 | 118 | **Your Proxmox Server can be reached via ssh** 119 | 120 | Start this in a console on your build host and keep it open during build time. 121 | 122 | ```bash 123 | # forward 127.0.0.1:8000 to the remote proxmox to 127.0.0.1:8000 124 | ssh -N -R 127.0.0.1:8000:127.0.0.1:8000 root@proxmox 125 | ``` 126 | 127 | **Your Proxmox Server can't be reached from the build computer via ssh** 128 | 129 | In this case you need a 2nd computer that can be reached from the proxmox computer and the build computer acting as relais. 130 | 131 | On the proxmox host: 132 | 133 | ```bash 134 | ssh -N -L 127.0.0.1:8000:127.0.0.1:8000 user@lighthouse 135 | ``` 136 | 137 | On the build computer: 138 | 139 | ```bash 140 | ssh -N -R 127.0.0.1:8000:127.0.0.1:8000 user@lighthouse 141 | ``` 142 | -------------------------------------------------------------------------------- /variables.pkr.hcl: -------------------------------------------------------------------------------- 1 | variable "vmid" { 2 | description = "The ID used to reference the virtual machine. If not given, the next free ID on the node will be used." 3 | type = number 4 | default = 0 5 | } 6 | 7 | variable "name" { 8 | description = "The name of the VM within Proxmox." 9 | type = string 10 | } 11 | 12 | variable "description" { 13 | description = "The description of the VM. Shows as the 'Notes' field in the Proxmox GUI." 14 | type = string 15 | default = "" 16 | } 17 | 18 | variable "node" { 19 | description = "The name of the Proxmox Node on which to place the VM." 20 | type = string 21 | } 22 | 23 | variable "pool" { 24 | description = "The resource pool to which the VM will be added." 25 | type = string 26 | default = "" 27 | } 28 | 29 | variable "cpu_type" { 30 | description = "The type of CPU to emulate in the Guest." 31 | type = string 32 | default = "host" 33 | } 34 | 35 | variable "cpu_sockets" { 36 | description = "The number of CPU sockets to allocate to the VM." 37 | type = number 38 | default = 1 39 | } 40 | 41 | variable "cpu_cores" { 42 | description = "The number of CPU cores per CPU socket to allocate to the VM." 43 | type = number 44 | default = 2 45 | } 46 | 47 | variable "memory" { 48 | description = "The amount of memory to allocate to the VM in Megabytes." 49 | type = number 50 | default = 2048 51 | } 52 | 53 | variable "disk_storage_pool" { 54 | description = "The name of the storage pool on which to store the disks." 55 | type = string 56 | default = "local" 57 | } 58 | 59 | variable "disk_size" { 60 | description = "The size of the created disk." 61 | type = string 62 | default = "5G" 63 | } 64 | 65 | variable "disk_format" { 66 | description = "The drive's backing file's data format." 67 | type = string 68 | default = "qcow2" 69 | } 70 | 71 | variable "disk_type" { 72 | description = "The type of disk device to add." 73 | type = string 74 | default = "scsi" 75 | } 76 | 77 | variable "disk_cache" { 78 | description = "The drive's cache mode." 79 | type = string 80 | default = "none" 81 | } 82 | 83 | variable "network_adapter" { 84 | description = "Bridge to which the network device should be attached." 85 | type = string 86 | default = "vmbr0" 87 | } 88 | 89 | variable "network_adapter_model" { 90 | description = "Network Card Model." 91 | type = string 92 | default = "virtio" 93 | } 94 | 95 | variable "network_adapter_mac" { 96 | description = "Override the randomly generated MAC Address for the VM." 97 | type = string 98 | default = null 99 | } 100 | 101 | variable "network_adapter_vlan" { 102 | description = "The VLAN tag to apply to packets on this device." 103 | type = number 104 | default = -1 105 | } 106 | 107 | variable "network_adapter_firewall" { 108 | description = "Whether to enable the Proxmox firewall on this network device." 109 | type = bool 110 | default = false 111 | } 112 | 113 | variable "vga_type" { 114 | description = "The type of display to virtualize." 115 | type = string 116 | default = "std" 117 | } 118 | 119 | variable "vga_memory" { 120 | description = "Sets the VGA memory (in MiB)." 121 | type = number 122 | default = 32 123 | } 124 | 125 | variable "os" { 126 | description = "The operating system." 127 | type = string 128 | default = "l26" 129 | } 130 | 131 | variable "scsi_controller" { 132 | description = "The SCSI controller model to emulate." 133 | type = string 134 | default = "virtio-scsi-pci" 135 | } 136 | 137 | variable "start_at_boot" { 138 | description = "Whether to have the VM startup after the PVE node starts." 139 | type = bool 140 | default = true 141 | } 142 | 143 | variable "qemu_agent" { 144 | description = "Whether to enable the QEMU Guest Agent. qemu-guest-agent daemon must run the in the quest." 145 | type = bool 146 | default = true 147 | } 148 | 149 | variable "bios" { 150 | description = "Set the machine bios." 151 | type = string 152 | default = "seabios" 153 | } 154 | 155 | 156 | 157 | 158 | 159 | 160 | variable "proxmox_host" { 161 | description = "IP and Port of the Proxmox host." 162 | type = string 163 | } 164 | 165 | variable "proxmox_user" { 166 | description = "Username when authenticating to Proxmox, including the realm." 167 | type = string 168 | } 169 | 170 | variable "proxmox_password" { 171 | description = "Password for the Proxmox user." 172 | type = string 173 | default = "" 174 | } 175 | 176 | variable "proxmox_token" { 177 | description = "Proxmox Token if you are using API Tokens. If both are set, `proxmox_token` takes precedence." 178 | type = string 179 | default = "" 180 | } 181 | 182 | variable "proxmox_insecure_tls" { 183 | description = "Skip validating the certificate." 184 | type = bool 185 | default = false 186 | } 187 | 188 | variable "iso_download" { 189 | description = "Wether to download from iso_url or use the existing iso_file in the iso_storage_pool." 190 | type = bool 191 | default = true 192 | } 193 | 194 | variable "iso_download_pve" { 195 | description = "Download the specified `iso_url` directly from the PVE node." 196 | type = bool 197 | default = false 198 | } 199 | 200 | variable "iso_url" { 201 | description = "URL to the iso file." 202 | type = string 203 | } 204 | 205 | variable "iso_checksum" { 206 | description = "Checksum of the iso file" 207 | type = string 208 | } 209 | 210 | variable "iso_file" { 211 | description = "Name of the iso file" 212 | type = string 213 | } 214 | 215 | variable "iso_storage_pool" { 216 | description = "Storage pool of the iso file" 217 | type = string 218 | default = "local" 219 | } 220 | 221 | variable "iso_unmount" { 222 | description = "Wether to remove the mounted ISO from the template after finishing." 223 | type = bool 224 | default = true 225 | } 226 | 227 | variable "cloud_init" { 228 | description = "Wether to add a Cloud-Init CDROM drive after the virtual machine has been converted to a template." 229 | type = bool 230 | default = true 231 | } 232 | 233 | variable "cloud_init_storage_pool" { 234 | description = "Name of the Proxmox storage pool to store the Cloud-Init CDROM on." 235 | type = string 236 | default = "local" 237 | } 238 | 239 | variable "additional_iso_files" { 240 | description = "Additional ISO files attached to the virtual machine." 241 | type = list(object({ 242 | iso_file = string 243 | iso_url = string 244 | iso_checksum = string 245 | })) 246 | default = [] 247 | } 248 | 249 | variable "additional_cd_files" { 250 | description = "Additional files attached to the virtual machine as iso." 251 | type = list(object({ 252 | type = string 253 | index = number 254 | files = list(string) 255 | })) 256 | default = [] 257 | } 258 | 259 | variable "boot_command" { 260 | description = "The keys to type when the virtual machine is first booted in order to start the OS installer." 261 | type = list(string) 262 | } 263 | 264 | variable "boot_wait" { 265 | description = "The time to wait before typing boot_command." 266 | type = string 267 | default = "10s" 268 | } 269 | 270 | variable "task_timeout" { 271 | description = "The timeout for Promox API operations, e.g. clones" 272 | type = string 273 | default = "5m" 274 | } 275 | 276 | variable "http_directory" { 277 | description = "Path to a directory to serve using an HTTP server." 278 | type = string 279 | default = "./http" 280 | } 281 | 282 | variable "unattended_content" { 283 | description = "Key/Values for the windows unattended cd with the Autounattend.xml file." 284 | type = map(object({ 285 | template = string 286 | vars = map(string) 287 | })) 288 | default = {} 289 | } 290 | 291 | variable "communicator" { 292 | description = "The packer communicator to use" 293 | type = string 294 | default = "ssh" 295 | } 296 | 297 | variable "ssh_username" { 298 | description = "The ssh username to connect to the guest" 299 | type = string 300 | default = "packer" 301 | } 302 | 303 | variable "ssh_password" { 304 | description = "The ssh password to connect to the guest" 305 | type = string 306 | default = "packer" 307 | } 308 | 309 | variable "ssh_timeout" { 310 | description = "The timeout waiting for ssh connection" 311 | type = string 312 | default = "30m" 313 | } 314 | 315 | variable "winrm_username" { 316 | description = "The winrm username to connect to the guest. Keep 'Administrator' for Windows Server." 317 | type = string 318 | default = "Administrator" 319 | } 320 | 321 | variable "winrm_password" { 322 | description = "The winrm password to connect to the guest." 323 | type = string 324 | default = "packer" 325 | } 326 | 327 | variable "winrm_insecure" { 328 | description = "Skip validating the winrm ssl certificate." 329 | type = bool 330 | default = true 331 | } 332 | 333 | variable "winrm_use_ssl" { 334 | description = "Use winrm ssl connection." 335 | type = bool 336 | default = false 337 | } 338 | 339 | variable "windows_edition" { 340 | description = "Windows edition of the ISO file to install (this is usefull to overwrite for Windows 11 Pro or Server Core/Datacenter)." 341 | type = string 342 | default = "" 343 | } 344 | 345 | variable "windows_language" { 346 | description = "Windows language to use. The ISO file must contain this lanugage." 347 | type = string 348 | default = "en-US" 349 | } 350 | 351 | variable "windows_input_language" { 352 | description = "Windows language for the keyboard to use. The ISO file must contain this lanugage." 353 | type = string 354 | default = "en-US" 355 | } 356 | 357 | variable "provisioner" { 358 | description = "The packer provisioner commands." 359 | type = list(string) 360 | } 361 | 362 | variable "packer_http_interface" { 363 | description = "Name of the network interface that Packer gets HTTPIP from. Defaults to the first non loopback interface." 364 | type = string 365 | default = "" 366 | } 367 | 368 | variable "packer_http_bind_address" { 369 | description = "This is the bind address for the HTTP server. Defaults to 0.0.0.0 so that it will work with any network interface." 370 | type = string 371 | default = "" 372 | } 373 | 374 | variable "packer_http_port" { 375 | description = "Port the HTTP server started to serve the http_directory (required only for ssh portworarding)." 376 | type = number 377 | default = -1 378 | } 379 | -------------------------------------------------------------------------------- /http/windows/Autounattend-server.xml.pkrtpl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 12 | 13 | 14 | D:\viostor\${driver_version}\amd64 15 | 16 | 17 | 18 | D:\NetKVM\${driver_version}\amd64 19 | 20 | 21 | 22 | D:\Balloon\${driver_version}\amd64 23 | 24 | 25 | 26 | D:\pvpanic\${driver_version}\amd64 27 | 28 | 29 | 30 | D:\qemupciserial\${driver_version}\amd64 31 | 32 | 33 | 34 | D:\qxldod\${driver_version}\amd64 35 | 36 | 37 | 38 | D:\vioinput\${driver_version}\amd64 39 | 40 | 41 | 42 | D:\viorng\${driver_version}\amd64 43 | 44 | 45 | 46 | D:\vioscsi\${driver_version}\amd64 47 | 48 | 49 | 50 | D:\vioserial\${driver_version}\amd64 51 | 52 | 53 | 54 | 55 | 56 | ${windows_language} 57 | 58 | ${windows_input_language} 59 | ${windows_language} 60 | ${windows_language} 61 | ${windows_language} 62 | 63 | 64 | 65 | 66 | 67 | 68 | 1 69 | Primary 70 | 100 71 | 72 | 73 | 2 74 | Primary 75 | true 76 | 77 | 78 | 79 | 80 | 1 81 | 1 82 | 83 | NTFS 84 | true 85 | 86 | 87 | false 88 | NTFS 89 | C 90 | 2 91 | 2 92 | 93 | 94 | 95 | 0 96 | true 97 | 98 | OnError 99 | 100 | 101 | true 102 | Administrator 103 | Administrators 104 | 105 | Never 106 | 107 | 108 | 109 | 110 | 111 | 0 112 | 2 113 | 114 | OnError 115 | false 116 | 117 | 118 | /IMAGE/NAME 119 | ${windows_edition} 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | * 129 | UTC 130 | 131 | 132 | false 133 | 134 | 135 | 136 | 137 | true 138 | Remote Desktop 139 | all 140 | 141 | 142 | 143 | 144 | 0 145 | 146 | 147 | 148 | 149 | 150 | true 151 | Administrator 152 | 153 | ${winrm_password} 154 | true</PlainText> 155 | </Password> 156 | </AutoLogon> 157 | <FirstLogonCommands> 158 | <SynchronousCommand wcm:action="add"> 159 | <Order>1</Order> 160 | <!-- Enable WinRM service --> 161 | <CommandLine>powershell -ExecutionPolicy Bypass -File F:\setup.ps1</CommandLine> 162 | <RequiresUserInput>true</RequiresUserInput> 163 | </SynchronousCommand> 164 | <SynchronousCommand wcm:action="add"> 165 | <!-- Configure Remote execution for ansible --> 166 | <Order>2</Order> 167 | <CommandLine>powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/ansible/ansible/devel/examples/scripts/ConfigureRemotingForAnsible.ps1'))"</CommandLine> 168 | </SynchronousCommand> 169 | <SynchronousCommand wcm:action="add"> 170 | <Order>3</Order> 171 | <!-- Install Proxmox guest-agent --> 172 | <CommandLine>powershell -NoProfile -ExecutionPolicy Bypass -Command "D:\guest-agent\qemu-ga-x86_64.msi /quiet"</CommandLine> 173 | </SynchronousCommand> 174 | </FirstLogonCommands> 175 | <OOBE> 176 | <ProtectYourPC>3</ProtectYourPC> 177 | <HideEULAPage>true</HideEULAPage> 178 | <HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE> 179 | </OOBE> 180 | <UserAccounts> 181 | <AdministratorPassword> 182 | <Value>${winrm_password}</Value> 183 | <PlainText>true</PlainText> 184 | </AdministratorPassword> 185 | </UserAccounts> 186 | </component> 187 | </settings> 188 | <settings pass="offlineServicing"> 189 | <component name="Microsoft-Windows-LUA-Settings" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> 190 | <EnableLUA>false</EnableLUA> 191 | </component> 192 | </settings> 193 | </unattend> -------------------------------------------------------------------------------- /http/windows/Autounattend-win11.xml.pkrtpl: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="utf-8"?> 2 | <unattend xmlns="urn:schemas-microsoft-com:unattend"> 3 | <settings pass="windowsPE"> 4 | <component name="Microsoft-Windows-PnpCustomizationsWinPE" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" processorArchitecture="amd64" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"> 5 | 6 | <!-- 7 | This makes the VirtIO drivers available to Windows, assuming that 8 | the VirtIO driver disk at https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/stable-virtio/virtio-win.iso 9 | (see https://docs.fedoraproject.org/en-US/quick-docs/creating-windows-virtual-machines-using-virtio-drivers/index.html#virtio-win-direct-downloads) 10 | is available as drive D: 11 | --> 12 | <DriverPaths> 13 | <PathAndCredentials wcm:action="add" wcm:keyValue="2"> 14 | <Path>D:\viostor\${driver_version}\amd64</Path> 15 | </PathAndCredentials> 16 | 17 | <PathAndCredentials wcm:action="add" wcm:keyValue="3"> 18 | <Path>D:\NetKVM\${driver_version}\amd64</Path> 19 | </PathAndCredentials> 20 | 21 | <PathAndCredentials wcm:action="add" wcm:keyValue="4"> 22 | <Path>D:\Balloon\${driver_version}\amd64</Path> 23 | </PathAndCredentials> 24 | 25 | <PathAndCredentials wcm:action="add" wcm:keyValue="5"> 26 | <Path>D:\pvpanic\${driver_version}\amd64</Path> 27 | </PathAndCredentials> 28 | 29 | <PathAndCredentials wcm:action="add" wcm:keyValue="6"> 30 | <Path>D:\qemupciserial\${driver_version}\amd64</Path> 31 | </PathAndCredentials> 32 | 33 | <PathAndCredentials wcm:action="add" wcm:keyValue="7"> 34 | <Path>D:\qxldod\${driver_version}\amd64</Path> 35 | </PathAndCredentials> 36 | 37 | <PathAndCredentials wcm:action="add" wcm:keyValue="8"> 38 | <Path>D:\vioinput\${driver_version}\amd64</Path> 39 | </PathAndCredentials> 40 | 41 | <PathAndCredentials wcm:action="add" wcm:keyValue="9"> 42 | <Path>D:\viorng\${driver_version}\amd64</Path> 43 | </PathAndCredentials> 44 | 45 | <PathAndCredentials wcm:action="add" wcm:keyValue="10"> 46 | <Path>D:\vioscsi\${driver_version}\amd64</Path> 47 | </PathAndCredentials> 48 | 49 | <PathAndCredentials wcm:action="add" wcm:keyValue="11"> 50 | <Path>D:\vioserial\${driver_version}\amd64</Path> 51 | </PathAndCredentials> 52 | </DriverPaths> 53 | </component> 54 | <component name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> 55 | <SetupUILanguage> 56 | <UILanguage>${windows_language}</UILanguage> 57 | </SetupUILanguage> 58 | <InputLocale>${windows_input_language}</InputLocale> 59 | <SystemLocale>${windows_language}</SystemLocale> 60 | <UILanguage>${windows_language}</UILanguage> 61 | <UserLocale>${windows_language}</UserLocale> 62 | </component> 63 | <component name="Microsoft-Windows-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> 64 | <!-- TPM 2.0 and SecureBoot bypass --> 65 | <RunSynchronous> 66 | <RunSynchronousCommand wcm:action="add"> 67 | <Order>1</Order> 68 | <Description>BypassTPMCheck</Description> 69 | <Path>cmd /c reg add "HKLM\SYSTEM\Setup\LabConfig" /v "BypassTPMCheck" /t REG_DWORD /d 1</Path> 70 | </RunSynchronousCommand> 71 | <RunSynchronousCommand wcm:action="add"> 72 | <Order>2</Order> 73 | <Description>BypassSecureBootCheck</Description> 74 | <Path>cmd /c reg add "HKLM\SYSTEM\Setup\LabConfig" /v "BypassSecureBootCheck" /t REG_DWORD /d 1</Path> 75 | </RunSynchronousCommand> 76 | <RunSynchronousCommand wcm:action="add"> 77 | <Order>3</Order> 78 | <Description>BypassRAMCheck</Description> 79 | <Path>cmd /c reg add "HKLM\SYSTEM\Setup\LabConfig" /v "BypassRAMCheck" /t REG_DWORD /d 1</Path> 80 | </RunSynchronousCommand> 81 | </RunSynchronous> 82 | <DiskConfiguration> 83 | <Disk wcm:action="add"> 84 | <CreatePartitions> 85 | <CreatePartition wcm:action="add"> 86 | <Order>1</Order> 87 | <Type>Primary</Type> 88 | <Size>100</Size> 89 | </CreatePartition> 90 | <CreatePartition wcm:action="add"> 91 | <Order>2</Order> 92 | <Type>Primary</Type> 93 | <Extend>true</Extend> 94 | </CreatePartition> 95 | </CreatePartitions> 96 | <ModifyPartitions> 97 | <ModifyPartition wcm:action="add"> 98 | <Order>1</Order> 99 | <PartitionID>1</PartitionID> 100 | <Label>System Reserved</Label> 101 | <Format>NTFS</Format> 102 | <Active>true</Active> 103 | </ModifyPartition> 104 | <ModifyPartition wcm:action="add"> 105 | <Extend>false</Extend> 106 | <Format>NTFS</Format> 107 | <Letter>C</Letter> 108 | <Order>2</Order> 109 | <PartitionID>2</PartitionID> 110 | <Label>Windows</Label> 111 | </ModifyPartition> 112 | </ModifyPartitions> 113 | <DiskID>0</DiskID> 114 | <WillWipeDisk>true</WillWipeDisk> 115 | <!-- <MBR>true</MBR> --> 116 | </Disk> 117 | <WillShowUI>OnError</WillShowUI> 118 | </DiskConfiguration> 119 | <UserData> 120 | <AcceptEula>true</AcceptEula> 121 | <FullName>${winrm_username}</FullName> 122 | <Organization>Administrators</Organization> 123 | <ProductKey> 124 | <WillShowUI>Never</WillShowUI> 125 | </ProductKey> 126 | </UserData> 127 | <ImageInstall> 128 | <OSImage> 129 | <InstallTo> 130 | <DiskID>0</DiskID> 131 | <PartitionID>2</PartitionID> 132 | </InstallTo> 133 | <WillShowUI>OnError</WillShowUI> 134 | <InstallToAvailablePartition>false</InstallToAvailablePartition> 135 | <InstallFrom> 136 | <MetaData wcm:action="add"> 137 | <Key>/IMAGE/NAME</Key> 138 | <Value>${windows_edition}</Value> 139 | </MetaData> 140 | </InstallFrom> 141 | </OSImage> 142 | </ImageInstall> 143 | </component> 144 | </settings> 145 | <settings pass="specialize"> 146 | <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> 147 | <ComputerName>*</ComputerName> 148 | <TimeZone>UTC</TimeZone> 149 | </component> 150 | <component name="Microsoft-Windows-TerminalServices-LocalSessionManager" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> 151 | <fDenyTSConnections>false</fDenyTSConnections> 152 | </component> 153 | <component name="Networking-MPSSVC-Svc" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> 154 | <FirewallGroups> 155 | <FirewallGroup wcm:action="add" wcm:keyValue="RemoteDesktop"> 156 | <Active>true</Active> 157 | <Group>Remote Desktop</Group> 158 | <Profile>all</Profile> 159 | </FirewallGroup> 160 | </FirewallGroups> 161 | </component> 162 | <component name="Microsoft-Windows-TerminalServices-RDP-WinStationExtensions" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> 163 | <UserAuthentication>0</UserAuthentication> 164 | </component> 165 | </settings> 166 | <settings pass="oobeSystem"> 167 | <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> 168 | <AutoLogon> 169 | <Enabled>true</Enabled> 170 | <Username>${winrm_username}</Username> 171 | <Password> 172 | <Value>${winrm_password}</Value> 173 | <PlainText>true</PlainText> 174 | </Password> 175 | </AutoLogon> 176 | <FirstLogonCommands> 177 | <SynchronousCommand wcm:action="add"> 178 | <Order>1</Order> 179 | <!-- Enable WinRM service --> 180 | <CommandLine>powershell -ExecutionPolicy Bypass -File F:\setup.ps1</CommandLine> 181 | <RequiresUserInput>true</RequiresUserInput> 182 | </SynchronousCommand> 183 | <SynchronousCommand wcm:action="add"> 184 | <!-- Configure Remote execution for ansible --> 185 | <Order>2</Order> 186 | <CommandLine>powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/ansible/ansible-documentation/refs/heads/devel/examples/scripts/ConfigureRemotingForAnsible.ps1'))"</CommandLine> 187 | </SynchronousCommand> 188 | <SynchronousCommand wcm:action="add"> 189 | <Order>3</Order> 190 | <!-- Install Proxmox guest-agent --> 191 | <CommandLine>powershell -NoProfile -ExecutionPolicy Bypass -Command "D:\guest-agent\qemu-ga-x86_64.msi /quiet"</CommandLine> 192 | </SynchronousCommand> 193 | </FirstLogonCommands> 194 | <OOBE> 195 | <ProtectYourPC>3</ProtectYourPC> 196 | <HideEULAPage>true</HideEULAPage> 197 | <HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE> 198 | <SkipUserOOBE>true</SkipUserOOBE> 199 | <SkipMachineOOBE>true</SkipMachineOOBE> 200 | </OOBE> 201 | <UserAccounts> 202 | <LocalAccounts> 203 | <LocalAccount wcm:action="add"> 204 | <Name>${winrm_username}</Name> 205 | <Group>Administrators</Group> 206 | <Password> 207 | <Value>${winrm_password}</Value> 208 | <PlainText>true</PlainText> 209 | </Password> 210 | </LocalAccount> 211 | </LocalAccounts> 212 | </UserAccounts> 213 | </component> 214 | </settings> 215 | <settings pass="offlineServicing"> 216 | <component name="Microsoft-Windows-LUA-Settings" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> 217 | <EnableLUA>false</EnableLUA> 218 | </component> 219 | </settings> 220 | </unattend> -------------------------------------------------------------------------------- /http/debian/preseed.cfg: -------------------------------------------------------------------------------- 1 | #### Contents of the preconfiguration file (for buster) 2 | ### Localization 3 | # Preseeding only locale sets language, country and locale. 4 | d-i debian-installer/locale string en_US 5 | 6 | # The values can also be preseeded individually for greater flexibility. 7 | #d-i debian-installer/language string en 8 | #d-i debian-installer/country string NL 9 | #d-i debian-installer/locale string en_GB.UTF-8 10 | # Optionally specify additional locales to be generated. 11 | #d-i localechooser/supported-locales multiselect en_US.UTF-8, nl_NL.UTF-8 12 | 13 | # Keyboard selection. 14 | d-i keyboard-configuration/xkb-keymap select us 15 | # d-i keyboard-configuration/toggle select No toggling 16 | 17 | ### Network configuration 18 | # Disable network configuration entirely. This is useful for cdrom 19 | # installations on non-networked devices where the network questions, 20 | # warning and long timeouts are a nuisance. 21 | #d-i netcfg/enable boolean false 22 | 23 | # netcfg will choose an interface that has link if possible. This makes it 24 | # skip displaying a list if there is more than one interface. 25 | d-i netcfg/choose_interface select auto 26 | 27 | # To pick a particular interface instead: 28 | #d-i netcfg/choose_interface select eth1 29 | 30 | # To set a different link detection timeout (default is 3 seconds). 31 | # Values are interpreted as seconds. 32 | #d-i netcfg/link_wait_timeout string 10 33 | 34 | # If you have a slow dhcp server and the installer times out waiting for 35 | # it, this might be useful. 36 | #d-i netcfg/dhcp_timeout string 60 37 | #d-i netcfg/dhcpv6_timeout string 60 38 | 39 | # If you prefer to configure the network manually, uncomment this line and 40 | # the static network configuration below. 41 | #d-i netcfg/disable_autoconfig boolean true 42 | 43 | # If you want the preconfiguration file to work on systems both with and 44 | # without a dhcp server, uncomment these lines and the static network 45 | # configuration below. 46 | #d-i netcfg/dhcp_failed note 47 | #d-i netcfg/dhcp_options select Configure network manually 48 | 49 | # Static network configuration. 50 | # 51 | # IPv4 example 52 | #d-i netcfg/get_ipaddress string 192.168.1.42 53 | #d-i netcfg/get_netmask string 255.255.255.0 54 | #d-i netcfg/get_gateway string 192.168.1.1 55 | #d-i netcfg/get_nameservers string 192.168.1.1 56 | #d-i netcfg/confirm_static boolean true 57 | # 58 | # IPv6 example 59 | #d-i netcfg/get_ipaddress string fc00::2 60 | #d-i netcfg/get_netmask string ffff:ffff:ffff:ffff:: 61 | #d-i netcfg/get_gateway string fc00::1 62 | #d-i netcfg/get_nameservers string fc00::1 63 | #d-i netcfg/confirm_static boolean true 64 | 65 | # Any hostname and domain names assigned from dhcp take precedence over 66 | # values set here. However, setting the values still prevents the questions 67 | # from being shown, even if values come from dhcp. 68 | d-i netcfg/get_hostname string unassigned-hostname 69 | d-i netcfg/get_domain string unassigned-domain 70 | 71 | # If you want to force a hostname, regardless of what either the DHCP 72 | # server returns or what the reverse DNS entry for the IP is, uncomment 73 | # and adjust the following line. 74 | #d-i netcfg/hostname string somehost 75 | 76 | # Disable that annoying WEP key dialog. 77 | d-i netcfg/wireless_wep string 78 | # The wacky dhcp hostname that some ISPs use as a password of sorts. 79 | #d-i netcfg/dhcp_hostname string radish 80 | 81 | # If non-free firmware is needed for the network or other hardware, you can 82 | # configure the installer to always try to load it, without prompting. Or 83 | # change to false to disable asking. 84 | #d-i hw-detect/load_firmware boolean true 85 | 86 | ### Network console 87 | # Use the following settings if you wish to make use of the network-console 88 | # component for remote installation over SSH. This only makes sense if you 89 | # intend to perform the remainder of the installation manually. 90 | #d-i anna/choose_modules string network-console 91 | #d-i network-console/authorized_keys_url string http://10.0.0.1/openssh-key 92 | #d-i network-console/password password r00tme 93 | #d-i network-console/password-again password r00tme 94 | 95 | ### Mirror settings 96 | # If you select ftp, the mirror/country string does not need to be set. 97 | #d-i mirror/protocol string ftp 98 | d-i mirror/country string manual 99 | d-i mirror/http/hostname string http.us.debian.org 100 | d-i mirror/http/directory string /debian 101 | d-i mirror/http/proxy string 102 | 103 | # Suite to install. 104 | #d-i mirror/suite string testing 105 | # Suite to use for loading installer components (optional). 106 | #d-i mirror/udeb/suite string testing 107 | 108 | ### Account setup 109 | # Skip creation of a root account (normal user account will be able to 110 | # use sudo). 111 | d-i passwd/root-login boolean false 112 | # Alternatively, to skip creation of a normal user account. 113 | #d-i passwd/make-user boolean false 114 | 115 | # Root password, either in clear text 116 | #d-i passwd/root-password password r00tme 117 | #d-i passwd/root-password-again password r00tme 118 | # or encrypted using a crypt(3) hash. 119 | #d-i passwd/root-password-crypted password [crypt(3) hash] 120 | 121 | # To create a normal user account. 122 | #d-i passwd/user-fullname string Debian User 123 | #d-i passwd/username string debian 124 | # Normal user's password, either in clear text 125 | #d-i passwd/user-password password insecure 126 | #d-i passwd/user-password-again password insecure 127 | # or encrypted using a crypt(3) hash. 128 | #d-i passwd/user-password-crypted password [crypt(3) hash] 129 | # Create the first user with the specified UID instead of the default. 130 | #d-i passwd/user-uid string 1010 131 | 132 | # The user account will be added to some standard initial groups. To 133 | # override that, use this. 134 | #d-i passwd/user-default-groups string audio cdrom video 135 | 136 | ### Clock and time zone setup 137 | # Controls whether or not the hardware clock is set to UTC. 138 | d-i clock-setup/utc boolean true 139 | 140 | # You may set this to any valid setting for $TZ; see the contents of 141 | # /usr/share/zoneinfo/ for valid values. 142 | d-i time/zone string US/Eastern 143 | 144 | # Controls whether to use NTP to set the clock during the install 145 | d-i clock-setup/ntp boolean true 146 | # NTP server to use. The default is almost always fine here. 147 | #d-i clock-setup/ntp-server string ntp.example.com 148 | 149 | ### Partitioning 150 | ## Partitioning example 151 | # If the system has free space you can choose to only partition that space. 152 | # This is only honoured if partman-auto/method (below) is not set. 153 | #d-i partman-auto/init_automatically_partition select biggest_free 154 | 155 | # Alternatively, you may specify a disk to partition. If the system has only 156 | # one disk the installer will default to using that, but otherwise the device 157 | # name must be given in traditional, non-devfs format (so e.g. /dev/sda 158 | # and not e.g. /dev/discs/disc0/disc). 159 | # For example, to use the first SCSI/SATA hard disk: 160 | d-i partman-auto/disk string /dev/sda 161 | # In addition, you'll need to specify the method to use. 162 | # The presently available methods are: 163 | # - regular: use the usual partition types for your architecture 164 | # - lvm: use LVM to partition the disk 165 | # - crypto: use LVM within an encrypted partition 166 | d-i partman-auto/method string regular 167 | 168 | # You can define the amount of space that will be used for the LVM volume 169 | # group. It can either be a size with its unit (eg. 20 GB), a percentage of 170 | # free space or the 'max' keyword. 171 | #d-i partman-auto-lvm/guided_size string max 172 | 173 | # If one of the disks that are going to be automatically partitioned 174 | # contains an old LVM configuration, the user will normally receive a 175 | # warning. This can be preseeded away... 176 | #d-i partman-lvm/device_remove_lvm boolean true 177 | # The same applies to pre-existing software RAID array: 178 | #d-i partman-md/device_remove_md boolean true 179 | # And the same goes for the confirmation to write the lvm partitions. 180 | #d-i partman-lvm/confirm boolean true 181 | #d-i partman-lvm/confirm_nooverwrite boolean true 182 | 183 | # You can choose one of the three predefined partitioning recipes: 184 | # - atomic: all files in one partition 185 | # - home: separate /home partition 186 | # - multi: separate /home, /var, and /tmp partitions 187 | #d-i partman-auto/choose_recipe select atomic 188 | 189 | # create swap partition 190 | d-i partman-basicfilesystems/no_swap boolean true 191 | 192 | # Or provide a recipe of your own... 193 | # If you have a way to get a recipe file into the d-i environment, you can 194 | # just point at it. 195 | #d-i partman-auto/expert_recipe_file string /hd-media/recipe 196 | 197 | # If not, you can put an entire recipe into the preconfiguration file in one 198 | # (logical) line. This example creates a small /boot partition, suitable 199 | # swap, and uses the rest of the space for the root partition: 200 | #d-i partman-auto/expert_recipe string \ 201 | # boot-root :: \ 202 | # 40 50 100 ext3 \ 203 | # $primary{ } $bootable{ } \ 204 | # method{ format } format{ } \ 205 | # use_filesystem{ } filesystem{ ext3 } \ 206 | # mountpoint{ /boot } \ 207 | # . \ 208 | # 500 10000 1000000000 ext3 \ 209 | # method{ format } format{ } \ 210 | # use_filesystem{ } filesystem{ ext3 } \ 211 | # mountpoint{ / } \ 212 | # . \ 213 | # 64 512 300% linux-swap \ 214 | # method{ swap } format{ } \ 215 | # . 216 | 217 | d-i partman-auto/expert_recipe string \ 218 | root :: \ 219 | 100 1000000 1000000 ext4 \ 220 | $primary{ } $bootable{ } method{ format } \ 221 | format{ } use_filesystem{ } filesystem{ ext4 } \ 222 | mountpoint{ / } \ 223 | . 224 | 225 | d-i partman-auto/choose_recipe select root 226 | 227 | # The full recipe format is documented in the file partman-auto-recipe.txt 228 | # included in the 'debian-installer' package or available from D-I source 229 | # repository. This also documents how to specify settings such as file 230 | # system labels, volume group names and which physical devices to include 231 | # in a volume group. 232 | 233 | # This makes partman automatically partition without confirmation, provided 234 | # that you told it what to do using one of the methods above. 235 | d-i partman-partitioning/confirm_write_new_label boolean true 236 | #d-i partman/choose_partition select finish 237 | #d-i partman/confirm boolean true 238 | #d-i partman/confirm_nooverwrite boolean true 239 | partman-basicfilesystems partman-basicfilesystems/no_swap boolean false 240 | d-i partman/choose_partition select finish 241 | d-i partman/confirm boolean true 242 | d-i partman/confirm_nooverwrite boolean true 243 | 244 | # When disk encryption is enabled, skip wiping the partitions beforehand. 245 | #d-i partman-auto-crypto/erase_disks boolean false 246 | 247 | ## Partitioning using RAID 248 | # The method should be set to "raid". 249 | #d-i partman-auto/method string raid 250 | # Specify the disks to be partitioned. They will all get the same layout, 251 | # so this will only work if the disks are the same size. 252 | #d-i partman-auto/disk string /dev/sda /dev/sdb 253 | 254 | # Next you need to specify the physical partitions that will be used. 255 | #d-i partman-auto/expert_recipe string \ 256 | # multiraid :: \ 257 | # 1000 5000 4000 raid \ 258 | # $primary{ } method{ raid } \ 259 | # . \ 260 | # 64 512 300% raid \ 261 | # method{ raid } \ 262 | # . \ 263 | # 500 10000 1000000000 raid \ 264 | # method{ raid } \ 265 | # . 266 | 267 | # Last you need to specify how the previously defined partitions will be 268 | # used in the RAID setup. Remember to use the correct partition numbers 269 | # for logical partitions. RAID levels 0, 1, 5, 6 and 10 are supported; 270 | # devices are separated using "#". 271 | # Parameters are: 272 | # <raidtype> <devcount> <sparecount> <fstype> <mountpoint> \ 273 | # <devices> <sparedevices> 274 | 275 | #d-i partman-auto-raid/recipe string \ 276 | # 1 2 0 ext3 / \ 277 | # /dev/sda1#/dev/sdb1 \ 278 | # . \ 279 | # 1 2 0 swap - \ 280 | # /dev/sda5#/dev/sdb5 \ 281 | # . \ 282 | # 0 2 0 ext3 /home \ 283 | # /dev/sda6#/dev/sdb6 \ 284 | # . 285 | 286 | # For additional information see the file partman-auto-raid-recipe.txt 287 | # included in the 'debian-installer' package or available from D-I source 288 | # repository. 289 | 290 | # This makes partman automatically partition without confirmation. 291 | #d-i partman-md/confirm boolean true 292 | #d-i partman-partitioning/confirm_write_new_label boolean true 293 | #d-i partman/choose_partition select finish 294 | #d-i partman/confirm boolean true 295 | #d-i partman/confirm_nooverwrite boolean true 296 | 297 | ## Controlling how partitions are mounted 298 | # The default is to mount by UUID, but you can also choose "traditional" to 299 | # use traditional device names, or "label" to try filesystem labels before 300 | # falling back to UUIDs. 301 | #d-i partman/mount_style select uuid 302 | 303 | ### Base system installation 304 | # Configure APT to not install recommended packages by default. Use of this 305 | # option can result in an incomplete system and should only be used by very 306 | # experienced users. 307 | #d-i base-installer/install-recommends boolean false 308 | 309 | # The kernel image (meta) package to be installed; "none" can be used if no 310 | # kernel is to be installed. 311 | #d-i base-installer/kernel/image string linux-image-686 312 | 313 | ### Apt setup 314 | # You can choose to install non-free and contrib software. 315 | #d-i apt-setup/non-free boolean true 316 | #d-i apt-setup/contrib boolean true 317 | # Uncomment this if you don't want to use a network mirror. 318 | #d-i apt-setup/use_mirror boolean false 319 | # Select which update services to use; define the mirrors to be used. 320 | # Values shown below are the normal defaults. 321 | #d-i apt-setup/services-select multiselect security, updates 322 | #d-i apt-setup/security_host string security.debian.org 323 | 324 | # Additional repositories, local[0-9] available 325 | #d-i apt-setup/local0/repository string \ 326 | # http://local.server/debian stable main 327 | #d-i apt-setup/local0/comment string local server 328 | # Enable deb-src lines 329 | #d-i apt-setup/local0/source boolean true 330 | # URL to the public key of the local repository; you must provide a key or 331 | # apt will complain about the unauthenticated repository and so the 332 | # sources.list line will be left commented out 333 | #d-i apt-setup/local0/key string http://local.server/key 334 | 335 | # By default the installer requires that repositories be authenticated 336 | # using a known gpg key. This setting can be used to disable that 337 | # authentication. Warning: Insecure, not recommended. 338 | #d-i debian-installer/allow_unauthenticated boolean true 339 | 340 | # Uncomment this to add multiarch configuration for i386 341 | #d-i apt-setup/multiarch string i386 342 | 343 | 344 | # No additional CDs for setup 345 | d-i apt-setup/cdrom/set-first boolean false 346 | 347 | 348 | ### Package selection 349 | #tasksel tasksel/first multiselect standard, web-server, kde-desktop 350 | tasksel tasksel/first multiselect standard 351 | 352 | # Individual additional packages to install 353 | #d-i pkgsel/include string openssh-server build-essential 354 | d-i pkgsel/include string qemu-guest-agent cloud-init openssh-server 355 | # Whether to upgrade packages after debootstrap. 356 | # Allowed values: none, safe-upgrade, full-upgrade 357 | d-i pkgsel/upgrade select full-upgrade 358 | 359 | # Some versions of the installer can report back on what software you have 360 | # installed, and what software you use. The default is not to report back, 361 | # but sending reports helps the project determine what software is most 362 | # popular and include it on CDs. 363 | popularity-contest popularity-contest/participate boolean false 364 | 365 | ### Boot loader installation 366 | # Grub is the default boot loader (for x86). If you want lilo installed 367 | # instead, uncomment this: 368 | #d-i grub-installer/skip boolean true 369 | # To also skip installing lilo, and install no bootloader, uncomment this 370 | # too: 371 | #d-i lilo-installer/skip boolean true 372 | 373 | 374 | # This is fairly safe to set, it makes grub install automatically to the MBR 375 | # if no other operating system is detected on the machine. 376 | d-i grub-installer/only_debian boolean true 377 | 378 | # This one makes grub-installer install to the MBR if it also finds some other 379 | # OS, which is less safe as it might not be able to boot that other OS. 380 | d-i grub-installer/with_other_os boolean true 381 | 382 | # Due notably to potential USB sticks, the location of the MBR can not be 383 | # determined safely in general, so this needs to be specified: 384 | #d-i grub-installer/bootdev string /dev/sda 385 | # To install to the first device (assuming it is not a USB stick): 386 | #d-i grub-installer/bootdev string default 387 | 388 | # Alternatively, if you want to install to a location other than the mbr, 389 | # uncomment and edit these lines: 390 | #d-i grub-installer/only_debian boolean false 391 | #d-i grub-installer/with_other_os boolean false 392 | #d-i grub-installer/bootdev string (hd0,1) 393 | # To install grub to multiple disks: 394 | #d-i grub-installer/bootdev string (hd0,1) (hd1,1) (hd2,1) 395 | 396 | # Optional password for grub, either in clear text 397 | #d-i grub-installer/password password r00tme 398 | #d-i grub-installer/password-again password r00tme 399 | # or encrypted using an MD5 hash, see grub-md5-crypt(8). 400 | #d-i grub-installer/password-crypted password [MD5 hash] 401 | 402 | # Use the following option to add additional boot parameters for the 403 | # installed system (if supported by the bootloader installer). 404 | # Note: options passed to the installer will be added automatically. 405 | #d-i debian-installer/add-kernel-opts string nousb 406 | 407 | ### Finishing up the installation 408 | # During installations from serial console, the regular virtual consoles 409 | # (VT1-VT6) are normally disabled in /etc/inittab. Uncomment the next 410 | # line to prevent this. 411 | #d-i finish-install/keep-consoles boolean true 412 | 413 | # Avoid that last message about the install being complete. 414 | d-i finish-install/reboot_in_progress note 415 | 416 | # This will prevent the installer from ejecting the CD during the reboot, 417 | # which is useful in some situations. 418 | #d-i cdrom-detect/eject boolean false 419 | 420 | # This is how to make the installer shutdown when finished, but not 421 | # reboot into the installed system. 422 | #d-i debian-installer/exit/halt boolean true 423 | # This will power off the machine instead of just halting it. 424 | #d-i debian-installer/exit/poweroff boolean true 425 | 426 | ### Preseeding other packages 427 | # Depending on what software you choose to install, or if things go wrong 428 | # during the installation process, it's possible that other questions may 429 | # be asked. You can preseed those too, of course. To get a list of every 430 | # possible question that could be asked during an install, do an 431 | # installation, and then run these commands: 432 | # debconf-get-selections --installer > file 433 | # debconf-get-selections >> file 434 | 435 | 436 | #### Advanced options 437 | ### Running custom commands during the installation 438 | # d-i preseeding is inherently not secure. Nothing in the installer checks 439 | # for attempts at buffer overflows or other exploits of the values of a 440 | # preconfiguration file like this one. Only use preconfiguration files from 441 | # trusted locations! To drive that home, and because it's generally useful, 442 | # here's a way to run any shell command you'd like inside the installer, 443 | # automatically. 444 | 445 | # This first command is run as early as possible, just after 446 | # preseeding is read. 447 | #d-i preseed/early_command string anna-install some-udeb 448 | # This command is run immediately before the partitioner starts. It may be 449 | # useful to apply dynamic partitioner preseeding that depends on the state 450 | # of the disks (which may not be visible when preseed/early_command runs). 451 | #d-i partman/early_command \ 452 | # string debconf-set partman-auto/disk "$(list-devices disk | head -n1)" 453 | # This command is run just before the install finishes, but when there is 454 | # still a usable /target directory. You can chroot to /target and use it 455 | # directly, or use the apt-install and in-target commands to easily install 456 | # packages and run commands in the target system. 457 | #d-i preseed/late_command string apt-install zsh; in-target chsh -s /bin/zsh -------------------------------------------------------------------------------- /http/ubuntu-18.04/preseed.cfg: -------------------------------------------------------------------------------- 1 | #### Contents of the preconfiguration file (for stretch) 2 | ### Localization 3 | # Preseeding only locale sets language, country and locale. 4 | d-i debian-installer/locale string en_US 5 | 6 | # The values can also be preseeded individually for greater flexibility. 7 | #d-i debian-installer/language string en 8 | #d-i debian-installer/country string NL 9 | #d-i debian-installer/locale string en_GB.UTF-8 10 | # Optionally specify additional locales to be generated. 11 | #d-i localechooser/supported-locales multiselect en_US.UTF-8, nl_NL.UTF-8 12 | 13 | # Keyboard selection. 14 | # Disable automatic (interactive) keymap detection. 15 | d-i console-setup/ask_detect boolean false 16 | d-i keyboard-configuration/xkb-keymap select us 17 | # To select a variant of the selected layout: 18 | #d-i keyboard-configuration/xkb-keymap select us(dvorak) 19 | # d-i keyboard-configuration/toggle select No toggling 20 | 21 | ### Network configuration 22 | # Disable network configuration entirely. This is useful for cdrom 23 | # installations on non-networked devices where the network questions, 24 | # warning and long timeouts are a nuisance. 25 | #d-i netcfg/enable boolean false 26 | 27 | # netcfg will choose an interface that has link if possible. This makes it 28 | # skip displaying a list if there is more than one interface. 29 | d-i netcfg/choose_interface select auto 30 | 31 | 32 | 33 | # To set a different link detection timeout (default is 3 seconds). 34 | # Values are interpreted as seconds. 35 | #d-i netcfg/link_wait_timeout string 10 36 | 37 | # If you have a slow dhcp server and the installer times out waiting for 38 | # it, this might be useful. 39 | #d-i netcfg/dhcp_timeout string 60 40 | #d-i netcfg/dhcpv6_timeout string 60 41 | 42 | # If you prefer to configure the network manually, uncomment this line and 43 | # the static network configuration below. 44 | #d-i netcfg/disable_autoconfig boolean true 45 | 46 | # If you want the preconfiguration file to work on systems both with and 47 | # without a dhcp server, uncomment these lines and the static network 48 | # configuration below. 49 | #d-i netcfg/dhcp_failed note 50 | #d-i netcfg/dhcp_options select Configure network manually 51 | 52 | # Static network configuration. 53 | # 54 | # IPv4 example 55 | #d-i netcfg/get_ipaddress string 192.168.1.42 56 | #d-i netcfg/get_netmask string 255.255.255.0 57 | #d-i netcfg/get_gateway string 192.168.1.1 58 | #d-i netcfg/get_nameservers string 192.168.1.1 59 | #d-i netcfg/confirm_static boolean true 60 | # 61 | # IPv6 example 62 | #d-i netcfg/get_ipaddress string fc00::2 63 | #d-i netcfg/get_netmask string ffff:ffff:ffff:ffff:: 64 | #d-i netcfg/get_gateway string fc00::1 65 | #d-i netcfg/get_nameservers string fc00::1 66 | #d-i netcfg/confirm_static boolean true 67 | 68 | # Any hostname and domain names assigned from dhcp take precedence over 69 | # values set here. However, setting the values still prevents the questions 70 | # from being shown, even if values come from dhcp. 71 | d-i netcfg/get_hostname string unassigned-hostname 72 | d-i netcfg/get_domain string unassigned-domain 73 | 74 | # If you want to force a hostname, regardless of what either the DHCP 75 | # server returns or what the reverse DNS entry for the IP is, uncomment 76 | # and adjust the following line. 77 | #d-i netcfg/hostname string somehost 78 | 79 | # Disable that annoying WEP key dialog. 80 | d-i netcfg/wireless_wep string 81 | # The wacky dhcp hostname that some ISPs use as a password of sorts. 82 | #d-i netcfg/dhcp_hostname string radish 83 | 84 | # If non-free firmware is needed for the network or other hardware, you can 85 | # configure the installer to always try to load it, without prompting. Or 86 | # change to false to disable asking. 87 | #d-i hw-detect/load_firmware boolean true 88 | 89 | ### Network console 90 | # Use the following settings if you wish to make use of the network-console 91 | # component for remote installation over SSH. This only makes sense if you 92 | # intend to perform the remainder of the installation manually. 93 | #d-i anna/choose_modules string network-console 94 | #d-i network-console/authorized_keys_url string http://10.0.0.1/openssh-key 95 | #d-i network-console/password password r00tme 96 | #d-i network-console/password-again password r00tme 97 | # Use this instead if you prefer to use key-based authentication 98 | #d-i network-console/authorized_keys_url http://host/authorized_keys 99 | 100 | ### Mirror settings 101 | # If you select ftp, the mirror/country string does not need to be set. 102 | #d-i mirror/protocol string ftp 103 | d-i mirror/country string manual 104 | d-i mirror/http/hostname string archive.ubuntu.com 105 | d-i mirror/http/directory string /ubuntu 106 | d-i mirror/http/proxy string 107 | 108 | # Alternatively: by default, the installer uses CC.archive.ubuntu.com where 109 | # CC is the ISO-3166-2 code for the selected country. You can preseed this 110 | # so that it does so without asking. 111 | #d-i mirror/http/mirror select CC.archive.ubuntu.com 112 | 113 | # Suite to install. 114 | #d-i mirror/suite string stretch 115 | # Suite to use for loading installer components (optional). 116 | #d-i mirror/udeb/suite string stretch 117 | # Components to use for loading installer components (optional). 118 | #d-i mirror/udeb/components multiselect main, restricted 119 | 120 | ### Account setup 121 | # Skip creation of a root account (normal user account will be able to 122 | # use sudo). The default is false; preseed this to true if you want to set 123 | # a root password. 124 | #d-i passwd/root-login boolean false 125 | # Alternatively, to skip creation of a normal user account. 126 | #d-i passwd/make-user boolean false 127 | 128 | # Root password, either in clear text 129 | #d-i passwd/root-password password r00tme 130 | #d-i passwd/root-password-again password r00tme 131 | # or encrypted using a crypt(3) hash. 132 | #d-i passwd/root-password-crypted password [crypt(3) hash] 133 | 134 | # To create a normal user account. 135 | #d-i passwd/user-fullname string Ubuntu User 136 | #d-i passwd/username string ubuntu 137 | # Normal user's password, either in clear text 138 | #d-i passwd/user-password password insecure 139 | #d-i passwd/user-password-again password insecure 140 | # or encrypted using a crypt(3) hash. 141 | #d-i passwd/user-password-crypted password [crypt(3) hash] 142 | # Create the first user with the specified UID instead of the default. 143 | #d-i passwd/user-uid string 1010 144 | # The installer will warn about weak passwords. If you are sure you know 145 | # what you're doing and want to override it, uncomment this. 146 | d-i user-setup/allow-password-weak boolean true 147 | 148 | # The user account will be added to some standard initial groups. To 149 | # override that, use this. 150 | #d-i passwd/user-default-groups string audio cdrom video 151 | 152 | # Set to true if you want to encrypt the first user's home directory. 153 | d-i user-setup/encrypt-home boolean false 154 | 155 | ### Clock and time zone setup 156 | # Controls whether or not the hardware clock is set to UTC. 157 | d-i clock-setup/utc boolean true 158 | 159 | # You may set this to any valid setting for $TZ; see the contents of 160 | # /usr/share/zoneinfo/ for valid values. 161 | d-i time/zone string US/Eastern 162 | 163 | # Controls whether to use NTP to set the clock during the install 164 | d-i clock-setup/ntp boolean true 165 | # NTP server to use. The default is almost always fine here. 166 | #d-i clock-setup/ntp-server string ntp.example.com 167 | 168 | ### i386 specific disk storage 169 | # Activate DASD disks 170 | #d-i s390-dasd/dasd string 0.0.0200,0.0.0300,0.0.0400 171 | 172 | # DASD configuration; by default dasdfmt (low-level format) if needed 173 | #d-i s390-dasd/auto-format boolean true 174 | #d-i s390-dasd/force-format boolean true 175 | 176 | # zFCP activation and configuration 177 | # d-i s390-zfcp/zfcp string 0.0.1b34:0x400870075678a1b2:0x201480c800000000, \ 178 | # 0.0.1b34:0x400870075679a1b2:0x201480c800000000 179 | 180 | ### Partitioning 181 | ## Partitioning example 182 | # If the system has free space you can choose to only partition that space. 183 | # This is only honoured if partman-auto/method (below) is not set. 184 | # Alternatives: custom, some_device, some_device_crypto, some_device_lvm. 185 | #d-i partman-auto/init_automatically_partition select biggest_free 186 | 187 | # Alternatively, you may specify a disk to partition. If the system has only 188 | # one disk the installer will default to using that, but otherwise the device 189 | # name must be given in traditional, non-devfs format (so e.g. /dev/sda 190 | # and not e.g. /dev/discs/disc0/disc). 191 | # For example, to use the first SCSI/SATA hard disk: 192 | #d-i partman-auto/disk string /dev/sda 193 | # In addition, you'll need to specify the method to use. 194 | # The presently available methods are: 195 | # - regular: use the usual partition types for your architecture 196 | # - lvm: use LVM to partition the disk 197 | # - crypto: use LVM within an encrypted partition 198 | d-i partman-auto/method string regular 199 | 200 | # If one of the disks that are going to be automatically partitioned 201 | # contains an old LVM configuration, the user will normally receive a 202 | # warning. This can be preseeded away... 203 | #d-i partman-lvm/device_remove_lvm boolean true 204 | # The same applies to pre-existing software RAID array: 205 | #d-i partman-md/device_remove_md boolean true 206 | # And the same goes for the confirmation to write the lvm partitions. 207 | #d-i partman-lvm/confirm boolean true 208 | #d-i partman-lvm/confirm_nooverwrite boolean true 209 | 210 | # For LVM partitioning, you can select how much of the volume group to use 211 | # for logical volumes. 212 | #d-i partman-auto-lvm/guided_size string max 213 | #d-i partman-auto-lvm/guided_size string 10GB 214 | #d-i partman-auto-lvm/guided_size string 50% 215 | 216 | # You can choose one of the three predefined partitioning recipes: 217 | # - atomic: all files in one partition 218 | # - home: separate /home partition 219 | # - multi: separate /home, /var, and /tmp partitions 220 | d-i partman-auto/choose_recipe select atomic 221 | 222 | # Or provide a recipe of your own... 223 | # If you have a way to get a recipe file into the d-i environment, you can 224 | # just point at it. 225 | #d-i partman-auto/expert_recipe_file string /hd-media/recipe 226 | 227 | # If not, you can put an entire recipe into the preconfiguration file in one 228 | # (logical) line. This example creates a small /boot partition, suitable 229 | # swap, and uses the rest of the space for the root partition: 230 | #d-i partman-auto/expert_recipe string \ 231 | # boot-root :: \ 232 | # 40 50 100 ext3 \ 233 | # $primary{ } $bootable{ } \ 234 | # method{ format } format{ } \ 235 | # use_filesystem{ } filesystem{ ext3 } \ 236 | # mountpoint{ /boot } \ 237 | # . \ 238 | # 500 10000 1000000000 ext3 \ 239 | # method{ format } format{ } \ 240 | # use_filesystem{ } filesystem{ ext3 } \ 241 | # mountpoint{ / } \ 242 | # . \ 243 | # 64 512 300% linux-swap \ 244 | # method{ swap } format{ } \ 245 | # . 246 | 247 | # If you just want to change the default filesystem from ext3 to something 248 | # else, you can do that without providing a full recipe. 249 | #d-i partman/default_filesystem string ext4 250 | 251 | # The full recipe format is documented in the file partman-auto-recipe.txt 252 | # included in the 'debian-installer' package or available from D-I source 253 | # repository. This also documents how to specify settings such as file 254 | # system labels, volume group names and which physical devices to include 255 | # in a volume group. 256 | 257 | # This makes partman automatically partition without confirmation, provided 258 | # that you told it what to do using one of the methods above. 259 | d-i partman-partitioning/confirm_write_new_label boolean true 260 | d-i partman/choose_partition select finish 261 | d-i partman/confirm boolean true 262 | d-i partman/confirm_nooverwrite boolean true 263 | 264 | ## Partitioning using RAID 265 | # The method should be set to "raid". 266 | #d-i partman-auto/method string raid 267 | # Specify the disks to be partitioned. They will all get the same layout, 268 | # so this will only work if the disks are the same size. 269 | #d-i partman-auto/disk string /dev/sda /dev/sdb 270 | 271 | # Next you need to specify the physical partitions that will be used. 272 | #d-i partman-auto/expert_recipe string \ 273 | # multiraid :: \ 274 | # 1000 5000 4000 raid \ 275 | # $primary{ } method{ raid } \ 276 | # . \ 277 | # 64 512 300% raid \ 278 | # method{ raid } \ 279 | # . \ 280 | # 500 10000 1000000000 raid \ 281 | # method{ raid } \ 282 | # . 283 | 284 | # Last you need to specify how the previously defined partitions will be 285 | # used in the RAID setup. Remember to use the correct partition numbers 286 | # for logical partitions. RAID levels 0, 1, 5, 6 and 10 are supported; 287 | # devices are separated using "#". 288 | # Parameters are: 289 | # <raidtype> <devcount> <sparecount> <fstype> <mountpoint> \ 290 | # <devices> <sparedevices> 291 | 292 | #d-i partman-auto-raid/recipe string \ 293 | # 1 2 0 ext3 / \ 294 | # /dev/sda1#/dev/sdb1 \ 295 | # . \ 296 | # 1 2 0 swap - \ 297 | # /dev/sda5#/dev/sdb5 \ 298 | # . \ 299 | # 0 2 0 ext3 /home \ 300 | # /dev/sda6#/dev/sdb6 \ 301 | # . 302 | 303 | # For additional information see the file partman-auto-raid-recipe.txt 304 | # included in the 'debian-installer' package or available from D-I source 305 | # repository. 306 | 307 | # This makes partman automatically partition without confirmation. 308 | d-i partman-md/confirm boolean true 309 | d-i partman-partitioning/confirm_write_new_label boolean true 310 | d-i partman/choose_partition select finish 311 | d-i partman/confirm boolean true 312 | d-i partman/confirm_nooverwrite boolean true 313 | 314 | ## Controlling how partitions are mounted 315 | # The default is to mount by UUID, but you can also choose "traditional" to 316 | # use traditional device names, or "label" to try filesystem labels before 317 | # falling back to UUIDs. 318 | #d-i partman/mount_style select uuid 319 | 320 | ### Base system installation 321 | # Configure a path to the preconfigured base filesystem. This can be used to 322 | # specify a path for the installer to retrieve the filesystem image that will 323 | # be deployed to disk and used as a base system for the installation. 324 | #d-i live-installer/net-image string /install/filesystem.squashfs 325 | 326 | # Configure APT to not install recommended packages by default. Use of this 327 | # option can result in an incomplete system and should only be used by very 328 | # experienced users. 329 | #d-i base-installer/install-recommends boolean false 330 | 331 | # The kernel image (meta) package to be installed; "none" can be used if no 332 | # kernel is to be installed. 333 | #d-i base-installer/kernel/image string linux-generic 334 | 335 | ### Apt setup 336 | # You can choose to install restricted and universe software, or to install 337 | # software from the backports repository. 338 | #d-i apt-setup/restricted boolean true 339 | #d-i apt-setup/universe boolean true 340 | #d-i apt-setup/backports boolean true 341 | # Uncomment this if you don't want to use a network mirror. 342 | #d-i apt-setup/use_mirror boolean false 343 | # Select which update services to use; define the mirrors to be used. 344 | # Values shown below are the normal defaults. 345 | d-i apt-setup/services-select multiselect security, updates 346 | #d-i apt-setup/security_host string security.ubuntu.com 347 | #d-i apt-setup/security_path string /ubuntu 348 | 349 | # Additional repositories, local[0-9] available 350 | #d-i apt-setup/local0/repository string \ 351 | # http://local.server/ubuntu stretch main 352 | #d-i apt-setup/local0/comment string local server 353 | # Enable deb-src lines 354 | #d-i apt-setup/local0/source boolean true 355 | # URL to the public key of the local repository; you must provide a key or 356 | # apt will complain about the unauthenticated repository and so the 357 | # sources.list line will be left commented out 358 | #d-i apt-setup/local0/key string http://local.server/key 359 | 360 | # By default the installer requires that repositories be authenticated 361 | # using a known gpg key. This setting can be used to disable that 362 | # authentication. Warning: Insecure, not recommended. 363 | #d-i debian-installer/allow_unauthenticated boolean true 364 | 365 | # Uncomment this to add multiarch configuration for i386 366 | #d-i apt-setup/multiarch string i386 367 | 368 | 369 | ### Package selection 370 | #tasksel tasksel/first multiselect ubuntu-desktop 371 | #tasksel tasksel/first multiselect lamp-server, print-server 372 | #tasksel tasksel/first multiselect kubuntu-desktop 373 | tasksel tasksel/first multiselect ubuntu-server 374 | 375 | # Individual additional packages to install 376 | #d-i pkgsel/include string openssh-server build-essential 377 | d-i pkgsel/include string qemu-guest-agent cloud-init openssh-server 378 | # Whether to upgrade packages after debootstrap. 379 | # Allowed values: none, safe-upgrade, full-upgrade 380 | d-i pkgsel/upgrade select full-upgrade 381 | 382 | # Language pack selection 383 | #d-i pkgsel/language-packs multiselect de, en, zh 384 | 385 | # Policy for applying updates. May be "none" (no automatic updates), 386 | # "unattended-upgrades" (install security updates automatically), or 387 | # "landscape" (manage system with Landscape). 388 | #d-i pkgsel/update-policy select none 389 | 390 | # Some versions of the installer can report back on what software you have 391 | # installed, and what software you use. The default is not to report back, 392 | # but sending reports helps the project determine what software is most 393 | # popular and include it on CDs. 394 | #popularity-contest popularity-contest/participate boolean false 395 | 396 | # By default, the system's locate database will be updated after the 397 | # installer has finished installing most packages. This may take a while, so 398 | # if you don't want it, you can set this to "false" to turn it off. 399 | d-i pkgsel/updatedb boolean true 400 | 401 | ### Boot loader installation 402 | # Grub is the default boot loader (for x86). If you want lilo installed 403 | # instead, uncomment this: 404 | #d-i grub-installer/skip boolean true 405 | # To also skip installing lilo, and install no bootloader, uncomment this 406 | # too: 407 | #d-i lilo-installer/skip boolean true 408 | 409 | 410 | # This is fairly safe to set, it makes grub install automatically to the MBR 411 | # if no other operating system is detected on the machine. 412 | d-i grub-installer/only_debian boolean true 413 | 414 | # This one makes grub-installer install to the MBR if it also finds some other 415 | # OS, which is less safe as it might not be able to boot that other OS. 416 | d-i grub-installer/with_other_os boolean true 417 | 418 | # Due notably to potential USB sticks, the location of the MBR can not be 419 | # determined safely in general, so this needs to be specified: 420 | #d-i grub-installer/bootdev string /dev/sda 421 | # To install to the first device (assuming it is not a USB stick): 422 | #d-i grub-installer/bootdev string default 423 | 424 | # Alternatively, if you want to install to a location other than the mbr, 425 | # uncomment and edit these lines: 426 | #d-i grub-installer/only_debian boolean false 427 | #d-i grub-installer/with_other_os boolean false 428 | #d-i grub-installer/bootdev string (hd0,1) 429 | # To install grub to multiple disks: 430 | #d-i grub-installer/bootdev string (hd0,1) (hd1,1) (hd2,1) 431 | 432 | # Optional password for grub, either in clear text 433 | #d-i grub-installer/password password r00tme 434 | #d-i grub-installer/password-again password r00tme 435 | # or encrypted using an MD5 hash, see grub-md5-crypt(8). 436 | #d-i grub-installer/password-crypted password [MD5 hash] 437 | 438 | # Use the following option to add additional boot parameters for the 439 | # installed system (if supported by the bootloader installer). 440 | # Note: options passed to the installer will be added automatically. 441 | #d-i debian-installer/add-kernel-opts string nousb 442 | 443 | ### Finishing up the installation 444 | # During installations from serial console, the regular virtual consoles 445 | # (VT1-VT6) are normally disabled in /etc/inittab. Uncomment the next 446 | # line to prevent this. 447 | #d-i finish-install/keep-consoles boolean true 448 | 449 | # Avoid that last message about the install being complete. 450 | d-i finish-install/reboot_in_progress note 451 | 452 | # This will prevent the installer from ejecting the CD during the reboot, 453 | # which is useful in some situations. 454 | #d-i cdrom-detect/eject boolean false 455 | 456 | # This is how to make the installer shutdown when finished, but not 457 | # reboot into the installed system. 458 | #d-i debian-installer/exit/halt boolean true 459 | # This will power off the machine instead of just halting it. 460 | #d-i debian-installer/exit/poweroff boolean true 461 | 462 | ### Preseeding other packages 463 | # Depending on what software you choose to install, or if things go wrong 464 | # during the installation process, it's possible that other questions may 465 | # be asked. You can preseed those too, of course. To get a list of every 466 | # possible question that could be asked during an install, do an 467 | # installation, and then run these commands: 468 | # debconf-get-selections --installer > file 469 | # debconf-get-selections >> file 470 | 471 | 472 | #### Advanced options 473 | ### Running custom commands during the installation 474 | ## i386 Preseed Example 475 | # d-i preseeding is inherently not secure. Nothing in the installer checks 476 | # for attempts at buffer overflows or other exploits of the values of a 477 | # preconfiguration file like this one. Only use preconfiguration files from 478 | # trusted locations! To drive that home, and because it's generally useful, 479 | # here's a way to run any shell command you'd like inside the installer, 480 | # automatically. 481 | 482 | # This first command is run as early as possible, just after 483 | # preseeding is read. 484 | #d-i preseed/early_command string anna-install some-udeb 485 | # This command is run immediately before the partitioner starts. It may be 486 | # useful to apply dynamic partitioner preseeding that depends on the state 487 | # of the disks (which may not be visible when preseed/early_command runs). 488 | #d-i partman/early_command \ 489 | # string debconf-set partman-auto/disk "$(list-devices disk | head -n1)" 490 | # This command is run just before the install finishes, but when there is 491 | # still a usable /target directory. You can chroot to /target and use it 492 | # directly, or use the apt-install and in-target commands to easily install 493 | # packages and run commands in the target system. 494 | #d-i preseed/late_command string apt-install zsh; in-target chsh -s /bin/zsh 495 | d-i preseed/late_command string \ 496 | in-target apt update ;\ 497 | in-target apt upgrade -y --------------------------------------------------------------------------------