VirtualBox

Ticket #16879: centos-vbox.json

File centos-vbox.json, 1.3 KB (added by pstrzelczak, 8 years ago)

packer template

Line 
1{
2 "variables": {
3 "guest_memory_mb": "2048",
4 "guest_cpu_num": "1",
5 "vm_name": null,
6 "no_gui": "false",
7 "centos_mirror": "http://mirror.hh.se/centos",
8 "output_dir": "/tmp"
9 },
10 "builders": [
11 {
12 "type": "virtualbox-iso",
13 "boot_command": [
14 "<tab> append<wait>",
15 " initrd=initrd.img<wait>",
16 " inst.text<wait>",
17 " inst.ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/ks.cfg<enter><wait>"
18 ],
19 "boot_wait": "10s",
20 "disk_size": 100000,
21 "guest_os_type": "RedHat_64",
22 "http_directory": "http",
23 "iso_checksum": "27bd866242ee058b7a5754e83d8ee8403e216b93d130d800852a96f41c34d86a",
24 "iso_checksum_type": "sha256",
25 "iso_urls": [
26 "iso/CentOS-7-x86_64-Minimal-1611.iso",
27 "{{user `centos_mirror`}}/7.3.1611/isos/x86_64/CentOS-7-x86_64-Minimal-1611.iso"
28 ],
29 "ssh_username": "packer",
30 "ssh_password": "packer",
31 "ssh_port": 22,
32 "ssh_wait_timeout": "30m",
33 "headless": "{{user `no_gui`}}",
34 "output_directory": "{{user `output_dir`}}/{{user `vm_name`}}",
35 "format": "ova",
36 "vm_name": "{{user `vm_name`}}",
37 "shutdown_command": "sudo -S shutdown -P now",
38 "vboxmanage": [
39 [ "modifyvm", "{{.Name}}", "--memory", "{{user `guest_memory_mb`}}" ],
40 [ "modifyvm", "{{.Name}}", "--cpus", "{{user `guest_cpu_num`}}" ],
41 [ "modifyvm", "{{.Name}}", "--audio", "none" ]
42 ],
43 "vrdp_bind_address": "0.0.0.0"
44 }
45 ]
46
47}

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette