-
Notifications
You must be signed in to change notification settings - Fork 2
/
oc-devel.vbox.pkr.hcl
68 lines (64 loc) · 3.11 KB
/
oc-devel.vbox.pkr.hcl
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
source "virtualbox-iso" "oc_devel" {
boot_command = ["<tab><tab><tab><tab><tab><tab><tab><tab><tab><tab><wait>",
"<tab><tab><tab><tab><tab><tab><tab><tab><tab><tab><wait>",
"<tab><tab><tab><tab><tab><tab><tab><tab><tab><tab><wait>",
"<tab><tab><tab><tab><tab><tab><tab><tab><tab><tab><wait>",
"<tab><tab><tab><tab><tab><tab><tab><tab><tab><tab><wait>",
"<tab><tab><tab><tab><tab><tab><tab><tab><tab><tab><wait>",
"<tab><tab><tab><tab><tab><tab><tab><tab><tab><tab><wait>",
"<tab><tab><tab><tab><tab><tab><tab><tab><tab><tab><wait>",
"<tab><tab><tab><tab><tab><tab><tab><tab><tab><tab><wait>",
"<tab><tab><tab><tab><tab><tab><tab><tab><tab><tab><wait>",
"c<wait>",
"set gfxpayload=keep<enter><wait>",
"linux /casper/vmlinuz <wait>",
"autoinstall quiet fsck.mode=skip <wait>",
"net.ifnames=0 biosdevname=0 systemd.unified_cgroup_hierarchy=0 <wait>",
"ds=\"nocloud-net;s=http://{{ .HTTPIP }}:{{ .HTTPPort }}/\" <wait>",
"---<enter><wait>",
"initrd /casper/initrd<enter><wait>",
"boot<enter>"]
boot_wait = "1s"
cpus = 4
disk_size = 51200
guest_os_type = "Ubuntu_64"
headless = false
http_directory = "./autoinstall/http"
iso_checksum = "5e38b55d57d94ff029719342357325ed3bda38fa80054f9330dc789cd2d43931"
iso_url = "http://releases.ubuntu.com/22.04.2/ubuntu-22.04.2-live-server-amd64.iso"
memory = 4096
shutdown_command = "sudo shutdown -h now"
ssh_password = "ubuntu"
ssh_port = 22
ssh_read_write_timeout = "600s"
ssh_timeout = "30m"
ssh_username = "user"
vm_name = "oc_devel"
vboxmanage = [
["modifyvm", "{{ .Name }}", "--cpu-profile", "host"],
["modifyvm", "{{ .Name }}", "--nat-localhostreachable1", "on"]
]
}
build {
sources = ["source.virtualbox-iso.oc_devel"]
provisioner "ansible-local" {
inventory_file = "./deployer/inventory/local.inventory"
playbook_dir = "./deployer"
playbook_file = "./deployer/oc.yml"
}
post-processors {
post-processor "artifice" {
files = ["output-oc_devel/oc_devel-disk001.vmdk"]
}
post-processor "shell-local" {
inline = ["VBoxManage clonehd output-oc_devel/oc_devel-disk001.vmdk output-oc_devel/oc-devel-disk.vhd --format vhd"]
}
post-processor "artifice" {
files = ["output-oc_devel/oc-devel-disk.vhd"]
}
post-processor "compress" {
output = "oc-devel.vhd.tar.gz"
compression_level = 9
}
}
}