blob: 6df1ee9933996b1eb85ed17be2da7611cc5187a9 [file] [log] [blame]
Vasyl Saienko9740a4f2023-09-22 14:48:29 +00001{
2 "variables": {
3 "user": "root",
4 "password": "r00tme",
5 "disk_size": "2500M",
6 "images_cache": "{{ env `PACKER_IMAGES_CACHE` }}",
7 "image_base_url": "{{ env `IMAGE_BASE_URL` }}",
8 "image_md5_url": "{{ env `IMAGE_MD5_URL` }}",
9 "vm_name": "{{ env `VM_NAME` }}"
10 },
11 "provisioners": [
12 {
13 "type": "shell",
14 "scripts": [
15 "scripts/apt.sh",
16 "scripts/cleanup.sh"
17 ]
18 }
19 ],
20 "builders": [
21 {
22 "type": "qemu",
23 "qemuargs": [
24 [
25 "-m",
26 "8096M"
27 ],
28 [
29 "-smp",
30 "4"
31 ],
32 [
33 "-cdrom",
34 "config-drive/cloudata.iso"
35 ],
36 ["-device", "virtio-net,netdev=user.0"],
37 ["-object","rng-random,id=objrng0,filename=/dev/urandom"],
38 ["-device", "virtio-rng-pci,rng=objrng0,id=rng0,bus=pci.0,addr=0x10" ]
39 ],
40 "vm_name": "{{user `vm_name`}}",
41 "output_directory": "images",
42 "disk_compression": true,
43 "disk_size": "{{ user `disk_size`}}",
44 "format": "qcow2",
45 "iso_url": "{{ user `image_base_url`}}",
46 "iso_checksum": "file:{{ user `image_md5_url`}}",
47 "iso_target_path": "{{ user `images_cache`}}",
48 "disk_image": true,
49 "accelerator": "kvm",
50 "headless": true,
51 "ssh_username": "{{user `user`}}",
52 "ssh_password": "{{user `password`}}",
53 "ssh_host_port_min": 7000,
54 "ssh_host_port_max": 7050,
55 "vnc_port_max": "5956",
56 "vnc_port_min": "5956",
57 "shutdown_command": "shutdown -P now",
58 "boot_wait": "10s",
59 "ssh_wait_timeout": "360s"
60 }
61 ]
62}