-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathopensuse-leap-15.6.pkr.hcl
58 lines (54 loc) · 1.79 KB
/
opensuse-leap-15.6.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
source "qemu" "opensuseleap156" {
iso_url = "https://download.opensuse.org/distribution/leap/15.6/iso/openSUSE-Leap-15.6-NET-x86_64-Build710.3-Media.iso"
iso_checksum = "file:https://download.opensuse.org/distribution/leap/15.6/iso/openSUSE-Leap-15.6-NET-x86_64-Build710.3-Media.iso.sha256"
vga = "virtio"
cpus = 2
memory = 4096
headless = var.headless
shutdown_command = "sudo /sbin/halt -h -p"
qmp_enable = true
disk_discard = "unmap"
http_content = {
"/opensuse.xml" = templatefile("${path.root}/opensuse.xml", { path = path, hostname = "opensuseleap156", product = "Leap" })
}
ssh_timeout = "1h"
ssh_username = "vagrant"
ssh_password = "vagrant"
boot_command = [
"c<wait10>",
"set gfxpayload=keep<enter><wait>",
"linux /boot/x86_64/loader/linux netsetup=dhcp lang=en_US textmode=1 ssh=0 sshd=0 linuxrc.log=/dev/ttyS0 <wait>",
"autoyast=http://{{ .HTTPIP }}:{{ .HTTPPort }}/opensuse.xml<enter><wait>",
"initrd /boot/x86_64/loader/initrd<enter><wait>",
"boot<enter>"
]
efi_firmware_code = "${path.root}/ovmf/OVMF_CODE.4m.fd"
efi_firmware_vars = "${path.root}/ovmf/OVMF_VARS.4m.fd"
qemuargs = [["-serial", "stdio"]]
machine_type = var.machine_type
}
build {
sources = [
"source.qemu.opensuseleap156"
]
provisioner "shell" {
inline = [
"sudo fstrim -av --quiet-unsupported",
]
}
post-processors {
post-processor "vagrant" {
vagrantfile_template = "Vagrantfile"
include = [
"${path.root}/ovmf/OVMF_CODE.4m.fd",
"${path.root}/output-${source.name}/efivars.fd",
"${path.root}/ovmf/edk2.License.txt",
"${path.root}/ovmf/OvmfPkg.License.txt",
]
}
post-processor "vagrant-registry" {
box_tag = "gnome-shell-box/opensuseleap156"
version = local.version
}
}
}