-
Notifications
You must be signed in to change notification settings - Fork 1
/
oVirt-TinyCore-Linux.pkr.hcl
68 lines (64 loc) · 1.67 KB
/
oVirt-TinyCore-Linux.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
variable "version" {
type = string
}
source "qemu" "qemu" {
iso_url = "builddir/oVirtTinyCore64-${var.version}.iso"
iso_checksum = "none"
output_directory = "qcowbuilddir"
disk_size = "50M"
format = "qcow2"
accelerator = "none"
vm_name = "oVirtTinyCore"
net_device = "virtio-net"
disk_interface = "virtio"
boot_wait = "500ms"
headless = true
communicator = "none"
boot_command = [
# Boot prompt
"console=ttyS1,9600 console=tty0<enter>",
"<wait60>",
# Install installer
"tce-load -wi tc-install<enter>",
"<wait20>",
# Start installer
"sudo tc-install.sh<enter>",
"<wait10>",
# Install from CD
"c<wait2><enter><wait2>",
# Frugal
"f<wait2><enter><wait2>",
# Whole disk
"1<wait2><enter><wait2>",
# VDA
"2<wait2><enter><wait2>",
# Bootloader
"y<wait2><enter><wait2>",
# Extensions
"/mnt/sr0/cdeCLI<wait2><enter>",
# ext4
"3<wait2><enter><wait2>",
# Boot options
"console=ttyS0,115200 console=tty0<wait2><enter><wait2>",
# Confirm
"y<wait2><enter>",
# Wait for installation
"<wait60>",
# Finish installation
"<enter>",
# Power off
"sudo poweroff<enter>",
]
boot_key_interval = "50ms"
boot_keygroup_interval = "2s"
}
build {
name = "oVirtTinyCore"
sources = ["source.qemu.qemu"]
post-processor "shell-local" {
inline = [
"cd qcowbuilddir",
"qemu-img convert -c -O qcow2 oVirtTinyCore oVirtTinyCore64-${var.version}.qcow2"
]
}
}