Skip to content

Commit ca8007f

Browse files
authored
Merge pull request #830 from Max13/alpine-virt
Update Alpine Linux (Virt) to 3.18.4
2 parents bd7456c + 4548499 commit ca8007f

File tree

3 files changed

+37
-7
lines changed

3 files changed

+37
-7
lines changed

appliances/alpine-linux-virt.gns3a

+14
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,14 @@
2525
"kvm": "allow"
2626
},
2727
"images": [
28+
{
29+
"filename": "alpine-virt-3.18.4.qcow2",
30+
"version": "3.18.4",
31+
"md5sum": "99d393c16c870e12c4215aadd82ca998",
32+
"filesize": 51066880,
33+
"download_url": "https://sourceforge.net/projects/gns-3/files/Qemu%20Appliances/",
34+
"direct_download_url": "https://sourceforge.net/projects/gns-3/files/Qemu%20Appliances/alpine-virt-3.18.4.qcow2/download"
35+
},
2836
{
2937
"filename": "alpine-virt-3.16.img",
3038
"version": "3.16",
@@ -35,6 +43,12 @@
3543
}
3644
],
3745
"versions": [
46+
{
47+
"name": "3.18.4",
48+
"images": {
49+
"hda_disk_image": "alpine-virt-3.18.4.qcow2"
50+
}
51+
},
3852
{
3953
"name": "3.16",
4054
"images": {

packer/alpine-linux-virt/README.md

+8-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Packer for Alpine (Virt) GNS3 appliance
22

3-
This is the bare version of `Alpine Linux` installed from iso, no extra package added.
3+
This is the bare version of `Alpine Linux` installed from iso, no extra package added. From `v3.18.4`, the image file goes from 100MB to 200MB, and is using `qcow2` format to allow compression.
44

5-
Build in 1m12s on `macOS Monterey`.
5+
Build in 1m14s on `macOS Monterey`.
66

77
### Linux (tested)
88

@@ -20,3 +20,9 @@ packer build -var-file macos.json alpine.json
2020
```
2121

2222
> :information_source: Uses `hvf` QEMU accelerator. `Packer` will fail on `macOS` without `hvf` (timing issue).
23+
24+
See:
25+
- https://wiki.alpinelinux.org/wiki/Alpine_setup_scripts#setup-disk
26+
- https://wiki.alpinelinux.org/wiki/Enable_Serial_Console_on_Boot#Example_.2Fboot.2Fextlinux.conf
27+
- https://wiki.alpinelinux.org/wiki/Install_to_disk
28+
- https://www.packer.io/plugins/builders/qemu

packer/alpine-linux-virt/alpine.json

+15-5
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
11
{
22
"variables": {
3-
"accelerator": "kvm"
3+
"accelerator": "kvm",
4+
"img_name": "alpine-virt-3.18.4"
45
},
56
"builders": [
67
{
78
"communicator": "none",
89
"type": "qemu",
910
"accelerator": "{{ user `accelerator` }}",
1011
"use_default_display": true,
11-
"iso_url": "https://dl-cdn.alpinelinux.org/alpine/v3.16/releases/x86_64/alpine-virt-3.16.2-x86_64.iso",
12-
"iso_checksum": "6c7cb998ec2c8925d5a1239410a4d224b771203f916a18f8015f31169dd767a2",
12+
"iso_url": "https://dl-cdn.alpinelinux.org/alpine/v3.18/releases/x86_64/alpine-virt-3.18.4-x86_64.iso",
13+
"iso_checksum": "24d79bc148c05a864c2914dfa41a6ffbf808973e44de88c7700d30b4517965b2",
1314
"http_directory": "./files",
14-
"vm_name": "alpine-virt-3.16.img",
15-
"disk_size": "92M",
15+
"vm_name": "{{ user `img_name` }}.img",
16+
"disk_size": "200M",
1617
"format": "raw",
1718
"qemu_img_args": {
1819
"create": ["-o", "preallocation=off"]
@@ -31,5 +32,14 @@
3132
"poweroff<enter>"
3233
]
3334
}
35+
],
36+
"post-processors": [
37+
{
38+
"type": "shell-local",
39+
"inline": [
40+
"qemu-img convert -c -O qcow2 output-qemu/{{ user `img_name` }}.img output-qemu/{{ user `img_name` }}.qcow2",
41+
"rm output-qemu/{{ user `img_name` }}.img"
42+
]
43+
}
3444
]
3545
}

0 commit comments

Comments
 (0)