Files
MyMasters/data/QuickAndDirty/test.pkr.hcl
2022-01-17 01:49:55 +01:00

52 lines
1.5 KiB
HCL

packer {
}
source "proxmox" "ubuntu" {
image = "ubuntu:focal"
proxmox_url = "http:/192.168.111.34:8006/api2/json"
commit = true
username = "proxmox_user"
password = "tvowyfv9gh23sdfAERtLWav2674"
proxmox_url = "https://192.168.111.34:8006/api2/json"
node = "grosnoeud"
iso_file = "local:ISOS/ubuntu-20.04.3-live-server-amd64.iso"
iso_checksum = "f8e3086f3cea0fb3fefb29937ab5ed9d19e767079633960ccb50e76153effc98"
insecure_skip_tls_verify = true
pool = "FAST"
vm_name = "VM-UBU_PackerTest"
vm_id = 654
memory = 1024
core = 1
sockets = 2
os = "l26"
boot_command = [
"<esc><wait>",
"<esc><wait>",
"<enter><wait>",
"/install/vmlinuz",
" auto=true",
" url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg",
" locale=en_US<wait>",
" console-setup/ask_detect=false<wait>",
" console-setup/layoutcode=us<wait>",
" console-setup/modelcode=pc105<wait>",
" debconf/frontend=noninteractive<wait>",
" debian-installer=en_US<wait>",
" fb=false<wait>",
" initrd=/install/initrd.gz<wait>",
" kbd-chooser/method=us<wait>",
" keyboard-configuration/layout=USA<wait>",
" keyboard-configuration/variant=USA<wait>",
" netcfg/get_domain=vm<wait>",
" netcfg/get_hostname=packer<wait>",
" grub-installer/bootdev=/dev/sda<wait>",
" noapic<wait>",
" -- <wait>",
"<enter><wait>"
]
}
build {
name = "packer-ubuntu"
sources = [ "source.proxmox.ubuntu" ]
}