forked from jmassara/packer-rhel7-vms
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rhel-7.3-vmware.json
57 lines (54 loc) · 1.56 KB
/
rhel-7.3-vmware.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
{
"variables": {
"vm_name": "rhel-7.3-vmware",
"iso_url": "{{env `ISO_URL`}}",
"iso_sha256": "120acbca7b3d55465eb9f8ef53ad7365f2997d42d4f83d7cc285bf5c71e1131f"
},
"builders": [{
"headless": true,
"type": "vmware-iso",
"vm_name": "{{user `vm_name`}}",
"guest_os_type": "rhel7-64",
"vmdk_name": "rhel7",
"disk_size": "8192",
"vmx_data": {
"numvcpus": 2,
"cpuid.coresPerSocket": 1,
"memsize": 2048,
"ethernet0.virtualDev": "vmxnet3",
"virtualHW.version": "11"
},
"iso_checksum_type": "sha256",
"iso_url": "{{user `iso_url`}}",
"iso_checksum": "{{user `iso_sha256`}}",
"tools_upload_flavor": "linux",
"tools_upload_path": "/tmp/vmware_tools_{{.Flavor}}.iso",
"http_directory": "http",
"ssh_wait_timeout": "20m",
"ssh_username": "vagrant",
"ssh_password": "vagrant",
"shutdown_command": "echo 'vagrant' | sudo -S /sbin/halt -h -p",
"boot_wait": "5s",
"boot_command": [
"<esc><wait>",
"vmlinuz initrd=initrd.img inst.geoloc=0 rd.driver.blacklist=dm-multipath net.ifnames=0 biosdevname=0 ",
"ks=http://{{.HTTPIP}}:{{.HTTPPort}}/vmware-ks.cfg",
"<enter>"
]
}],
"provisioners": [{
"type": "shell",
"execute_command": "echo 'vagrant' | {{.Vars}} sudo -S -E bash '{{.Path}}'",
"scripts": [
"scripts/vagrant.sh",
"scripts/vmware.sh",
"scripts/sshd.sh",
"scripts/cleanup.sh"
]
}],
"post-processors": [{
"type": "vagrant",
"output": "{{user `vm_name`}}.box",
"keep_input_artifact": false
}]
}