-
Notifications
You must be signed in to change notification settings - Fork 93
/
hyperv-ubuntu-16.04.json
69 lines (69 loc) · 2.25 KB
/
hyperv-ubuntu-16.04.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
{
"variables": {
"vm_name": "ubuntu-xenial",
"cpu": "2",
"ram_size": "2048",
"disk_size": "21440",
"iso_url": "http://releases.ubuntu.com/16.04/ubuntu-16.04.5-server-amd64.iso",
"iso_checksum_type": "sha1",
"iso_checksum": "ee32c555567dd5407c58a1cfc7e668ab37a99d99",
"hyperv_switchname": "{{env `hyperv_switchname`}}",
"username" : "vagrant",
"password" : "vagrant"
},
"builders": [
{
"vm_name":"{{user `vm_name`}}",
"type": "hyperv-iso",
"disk_size": "{{user `disk_size`}}",
"guest_additions_mode":"disable",
"iso_url": "{{user `iso_url`}}",
"iso_checksum_type": "{{user `iso_checksum_type`}}",
"iso_checksum": "{{user `iso_checksum`}}",
"communicator":"ssh",
"ssh_username": "{{user `username`}}",
"ssh_password": "{{user `password`}}",
"ssh_timeout" : "4h",
"http_directory": "./linux/ubuntu/http/",
"boot_wait": "5s",
"boot_command": [
"<esc><wait10><esc><esc><enter><wait>",
"set gfxpayload=1024x768<enter>",
"linux /install/vmlinuz ",
"preseed/url=http://{{.HTTPIP}}:{{.HTTPPort}}/16.04/preseed.cfg ",
"debian-installer=en_US auto locale=en_US kbd-chooser/method=us ",
"hostname={{.Name}} ",
"fb=false debconf/frontend=noninteractive ",
"keyboard-configuration/modelcode=SKIP keyboard-configuration/layout=USA ",
"keyboard-configuration/variant=USA console-setup/ask_detect=false <enter>",
"initrd /install/initrd.gz<enter>",
"boot<enter>"
],
"shutdown_command": "echo 'vagrant' | sudo -S -E shutdown -P now",
"ram_size": "{{user `ram_size`}}",
"cpu": "{{user `cpu`}}",
"generation": 2,
"switch_name":"{{user `hyperv_switchname`}}",
"enable_secure_boot":false
}],
"provisioners": [{
"type": "shell",
"execute_command": "echo 'vagrant' | sudo -S -E sh {{.Path}}",
"scripts": [
"./linux/ubuntu/update.sh",
"./linux/ubuntu/hyperv-gen2.sh",
"./linux/ubuntu/network.sh",
"./linux/common/vagrant.sh",
"./linux/common/chef.sh",
"./linux/common/motd.sh",
"./linux/ubuntu/cleanup.sh"
]
}],
"post-processors": [
{
"type": "vagrant",
"keep_input_artifact": true,
"output": "{{.Provider}}_ubuntu-16.04_chef.box"
}
]
}