This repository has been archived by the owner on Jul 10, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvirtualbox.json
74 lines (74 loc) · 2.62 KB
/
virtualbox.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
{
"builders": [{
"boot_wait": "30s",
"type": "virtualbox-ovf",
"vm_name": "{{user `vm_name`}}",
"source_path": "{{user `source_path`}}",
"guest_additions_mode": "upload",
"guest_additions_path": "VBoxGuestAdditions.iso",
"headless": "{{user `headless`}}",
"ssh_pty": "true",
"ssh_username": "{{user `username`}}",
"ssh_password": "{{user `password`}}",
"ssh_wait_timeout": "30s",
"ssh_private_key_file": "keys/vagrant",
"shutdown_command": "echo 'packer' | sudo -S shutdown -P now",
"vboxmanage":[
["modifyvm","{{.Name}}","--memory","{{user `memory`}}"],
["modifyvm","{{.Name}}","--cpus","{{user `cpus`}}"],
["modifyvm","{{.Name}}","--nictype1","virtio"],
["modifyvm","{{.Name}}","--audio","none"],
["modifyvm","{{.Name}}","--usb","off"],
["modifyvm","{{.Name}}","--chipset","ich9"],
["modifyvm","{{.Name}}","--rtcuseutc","on"],
["modifyvm","{{.Name}}","--vram", "12"],
["modifyvm","{{.Name}}","--vrde", "off"],
["modifyvm","{{.Name}}","--hpet", "on"],
["modifyvm","{{.Name}}","--hwvirtex", "on"],
["modifyvm","{{.Name}}","--vtxvpid", "on"],
["modifyvm","{{.Name}}","--spec-ctrl", "on"],
["modifyvm","{{.Name}}","--largepages", "on"]
]
}],
"provisioners": [{
"destination": "/tmp",
"source": "scripts",
"type": "file"
},
{
"type": "shell",
"script": "provision.sh",
"environment_vars": [
"SCRIPTS=/tmp",
"MAKEOPTS=-j{{user `cpus`}}",
"BUILD_RUN=true",
"BUILD_BOX_NAME={{user `vm_name`}}",
"BUILD_BOX_DESCRIPTION={{user `box_description`}}",
"BUILD_GCC_VERSION={{user `gcc_version`}}",
"BUILD_BOX_VERSION={{user `box_version`}}",
"BUILD_REBUILD_SYSTEM={{user `rebuild_system`}}"
],
"expect_disconnect": false
}],
"description": "{{user `box_description`}}",
"post-processors": [{
"type": "vagrant",
"keep_input_artifact": false,
"output": "{{user `output_file`}}"
}],
"variables": {
"source_path": "{{env `BUILD_PARENT_OVF`}}",
"output_file": "{{env `BUILD_OUTPUT_FILE_TEMP`}}",
"box_description": "{{env `BUILD_BOX_DESCRIPTION`}}",
"guest_os_type": "{{env `BUILD_GUEST_TYPE`}}",
"vm_name": "{{env `BUILD_BOX_NAME`}}",
"memory": "{{env `BUILD_GUEST_MEMORY`}}",
"cpus": "{{env `BUILD_GUEST_CPUS`}}",
"gcc_version": "{{env `BUILD_GCC_VERSION`}}",
"box_version": "{{env `BUILD_BOX_VERSION`}}",
"rebuild_system": "{{env `BUILD_REBUILD_SYSTEM`}}",
"headless": "true",
"username": "vagrant",
"password": "vagrant"
}
}