-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvirtualbox.json
103 lines (103 loc) · 4.37 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
{
"min_packer_version": "1.6.3",
"builders": [{
"boot_wait": "30s",
"type": "virtualbox-ovf",
"vm_name": "{{user `vm_name`}}",
"source_path": "{{user `source_path`}}",
"guest_additions_mode": "disable",
"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}}","--nictype2","virtio"],
["modifyvm","{{.Name}}","--audio","pulse"],
["modifyvm","{{.Name}}","--audiocontroller","hda"],
["modifyvm","{{.Name}}","--audioin","on"],
["modifyvm","{{.Name}}","--audioout","on"],
["modifyvm","{{.Name}}","--usb","on"],
["modifyvm","{{.Name}}","--usbehci","on"],
["modifyvm","{{.Name}}","--usbxhci","on"],
["modifyvm","{{.Name}}","--chipset","ich9"],
["modifyvm","{{.Name}}","--rtcuseutc","on"],
["modifyvm","{{.Name}}","--vram","64"],
["modifyvm","{{.Name}}","--vrde","off"],
["modifyvm","{{.Name}}","--hpet","on"],
["modifyvm","{{.Name}}","--hwvirtex","on"],
["modifyvm","{{.Name}}","--vtxvpid","on"],
["modifyvm","{{.Name}}","--nested-hw-virt","on"],
["modifyvm","{{.Name}}","--largepages","on"],
["modifyvm","{{.Name}}","--spec-ctrl","off"],
["modifyvm","{{.Name}}","--graphicscontroller","vmsvga"],
["modifyvm","{{.Name}}","--accelerate3d","on"],
["modifyvm","{{.Name}}","--clipboard-mode", "bidirectional"],
["sharedfolder","add","{{.Name}}","--name=/vagrant","--hostpath=.","--automount"]
]
}],
"provisioners": [{
"destination": "/tmp",
"source": "scripts",
"type": "file"
},{
"type": "shell",
"script": "provision.sh",
"environment_vars": [
"SCRIPTS=/tmp",
"BUILD_RUN=true",
"BUILD_BOX_NAME={{user `vm_name`}}",
"BUILD_BOX_USERNAME={{user `vm_username`}}",
"BUILD_BOX_DESCRIPTION={{user `box_description`}}",
"BUILD_BOX_VERSION={{user `box_version`}}",
"BUILD_GIT_COMMIT_ID={{user `git_commit_id`}}",
"BUILD_MAKEOPTS={{user `makeopts`}}",
"BUILD_TIMESTAMP={{user `timestamp`}}",
"BUILD_KERNEL={{user `kernel`}}",
"BUILD_INCLUDE_ANSIBLE={{user `include_ansible`}}",
"BUILD_INCLUDE_DOCKER={{user `include_docker`}}",
"BUILD_CUSTOM_OVERLAY={{user `custom_overlay`}}",
"BUILD_CUSTOM_OVERLAY_NAME={{user `custom_overlay_name`}}",
"BUILD_CUSTOM_OVERLAY_URL={{user `custom_overlay_url`}}",
"BUILD_CUSTOM_OVERLAY_BRANCH={{user `custom_overlay_branch`}}",
"BUILD_MYSQL_ROOT_PASSWORD={{user `mysql_root_password`}}"
],
"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`}}",
"vm_username": "{{env `BUILD_BOX_USERNAME`}}",
"cpus": "{{env `BUILD_CPUS`}}",
"memory": "{{env `BUILD_MEMORY`}}",
"box_version": "{{env `BUILD_BOX_VERSION`}}",
"git_commit_id": "{{env `BUILD_GIT_COMMIT_ID`}}",
"makeopts": "{{env `BUILD_MAKEOPTS`}}",
"timestamp": "{{env `BUILD_TIMESTAMP`}}",
"kernel": "{{env `BUILD_KERNEL`}}",
"include_ansible": "{{env `BUILD_INCLUDE_ANSIBLE`}}",
"include_docker": "{{env `BUILD_INCLUDE_DOCKER`}}",
"custom_overlay": "{{env `BUILD_CUSTOM_OVERLAY`}}",
"custom_overlay_name": "{{env `BUILD_CUSTOM_OVERLAY_NAME`}}",
"custom_overlay_url": "{{env `BUILD_CUSTOM_OVERLAY_URL`}}",
"custom_overlay_branch": "{{env `BUILD_CUSTOM_OVERLAY_BRANCH`}}",
"mysql_root_password": "{{env `BUILD_MYSQL_ROOT_PASSWORD`}}",
"headless": "{{env `BUILD_HEADLESS`}}",
"username": "vagrant",
"password": "vagrant"
}
}