Install Debian 11/12 on a VM with at least 2GB RAM. Then run the following to prepare the environment.
apt-get install git curl unzip gnupg2 software-properties-common ansible -y
apt-get install --no-install-recommends qemu-system qemu-utils -y
git clone https://bitbucket.org/virtfusion-public/packer.git
cd packer
wget https://releases.hashicorp.com/packer/1.10.0/packer_1.10.0_linux_amd64.zip
unzip packer_1.10.0_linux_amd64.zip
./packer plugins install github.com/hashicorp/qemu
./packer plugins install github.com/hashicorp/ansible
mkdir sourceOnce all the requirements are installed you may build a template.
./packer build -only=qemu.base-9-x86_64 alma.pkr.hcl
./packer build -only=qemu.gnome-9-x86_64 alma.pkr.hcl./packer build -only=qemu.base-9-x86_64 rocky.pkr.hcl
./packer build -only=qemu.gnome-9-x86_64 rocky.pkr.hcl./packer build -only=qemu.base-10-x86_64 debian.pkr.hcl./packer build -only=qemu.base-11-x86_64 debian.pkr.hcl
./packer build -only=qemu.xfce-11-x86_64 debian.pkr.hcl./packer build -only=qemu.base-12-x86_64 debian.pkr.hcl./packer build -only=qemu.base-9-x86_64 oracle.pkr.hcl
./packer build -only=qemu.base-uek-9-x86_64 oracle.pkr.hcl./packer build -only=qemu.base-9-x86_64 centos.pkr.hcl./packer build -only=qemu.base-3-19-x86_64 alpine.pkr.hclA script is supplied to download the evaluation versions of Windows Server and the VirtIO drivers. This will allow you to build the evaluation versions.
sh windows-sources.shIf you would like to build from retail media, you will need to supply the ISO images.
./packer build -only=qemu.server-2019-standard windows-server.pkr.hcl
./packer build -only=qemu.server-2019-standard-eval windows-server.pkr.hcl./packer build -only=qemu.server-2022-standard windows-server.pkr.hcl
./packer build -only=qemu.server-2022-standard-eval windows-server.pkr.hclreg delete HKEY_LOCAL_MACHINE\\Software\\Policies\\Microsoft\\Windows\\WindowsUpdate /fsecedit /export /cfg securityconfig.cfg
(Get-Content securityconfig.cfg).replace("AllowAdministratorLockout = 1", "AllowAdministratorLockout = 0") | Set-Content securityconfig.cfg
secedit /configure /db C:\Windows\security\local.sdb /cfg securityconfig.cfg /areas SECURITYPOLICY
Remove-Item securityconfig.cfg