Debian: Generate images by packer, update to versions 12.2 and 11.8

This commit is contained in:
Bernhard Ehlers 2023-10-13 22:03:48 +02:00
parent 31bcfd2784
commit b76538862b
13 changed files with 47 additions and 56 deletions

View File

@ -29,7 +29,7 @@
"md5sum": "435218a2e90cba921cc7fde1d64a9419",
"filesize": 287965184,
"download_url": "https://sourceforge.net/projects/gns-3/files/Qemu%20Appliances/",
"direct_download_url": "http://downloads.sourceforge.net/project/gns-3/Qemu%20Appliances/bird2-debian-2.0.12.qcow2"
"direct_download_url": "https://downloads.sourceforge.net/project/gns-3/Qemu%20Appliances/bird2-debian-2.0.12.qcow2"
}
],
"versions": [

View File

@ -10,7 +10,7 @@
"status": "experimental",
"maintainer": "Bernhard Ehlers",
"maintainer_email": "dev-ehlers@mailbox.org",
"usage": "Username:\tdebian\nPassword:\tdebian\nTo become root, use \"sudo -s\".\n\nNetwork configuration:\n- In \"/etc/network/interfaces\" comment out \"source-directory /run/network/interfaces.d\"\n- Remove \"/etc/network/interfaces.d/50-cloud-init\"\n- Create \"/etc/network/interfaces.d/10-ens4\", for example:\n\nauto ens4\n#iface ens4 inet dhcp\niface ens4 inet static\n address 10.1.1.100/24\n gateway 10.1.1.1\n dns-nameservers 10.1.1.1\n",
"usage": "Username:\tdebian\nPassword:\tdebian\nTo become root, use \"sudo -s\".\n",
"symbol": "linux_guest.svg",
"port_name_format": "ens{port4}",
"qemu": {
@ -24,58 +24,33 @@
},
"images": [
{
"filename": "debian-12-genericcloud-amd64-20230723-1450.qcow2",
"version": "12.1",
"md5sum": "6d1efcaa206de01eeeb590d773421c5c",
"filesize": 280166400,
"download_url": "https://cloud.debian.org/images/cloud/bookworm/",
"direct_download_url": "https://cloud.debian.org/images/cloud/bookworm/20230723-1450/debian-12-genericcloud-amd64-20230723-1450.qcow2"
"filename": "debian-12.2.qcow2",
"version": "12.2",
"md5sum": "adf7716ec4a4e4e9e5ccfc7a1d7bd103",
"filesize": 286654464,
"download_url": "https://sourceforge.net/projects/gns-3/files/Qemu%20Appliances/",
"direct_download_url": "https://downloads.sourceforge.net/project/gns-3/Qemu%20Appliances/debian-12.2.qcow2"
},
{
"filename": "debian-11-genericcloud-amd64-20230601-1398.qcow2",
"version": "11.7",
"md5sum": "1b24a841dc5ca9bcf40b94ad4b4775d4",
"filesize": 259063808,
"download_url": "https://cloud.debian.org/images/cloud/bullseye/",
"direct_download_url": "https://cloud.debian.org/images/cloud/bullseye/20230601-1398/debian-11-genericcloud-amd64-20230601-1398.qcow2"
},
{
"filename": "debian-10-genericcloud-amd64-20230601-1398.qcow2",
"version": "10.13",
"md5sum": "ca799fb4011712f4686c422c1a9731cf",
"filesize": 228130816,
"download_url": "https://cloud.debian.org/images/cloud/buster/",
"direct_download_url": "https://cloud.debian.org/images/cloud/buster/20230601-1398/debian-10-genericcloud-amd64-20230601-1398.qcow2"
},
{
"filename": "debian-cloud-init-data.iso",
"version": "1.0",
"md5sum": "43f6bf70c178a9d3c270b5c24971e578",
"filesize": 374784,
"download_url": "https://github.com/GNS3/gns3-registry/tree/master/cloud-init/Debian",
"direct_download_url": "https://github.com/GNS3/gns3-registry/raw/master/cloud-init/Debian/debian-cloud-init-data.iso"
"filename": "debian-11.8.qcow2",
"version": "11.8",
"md5sum": "95bf44716c7fa1a1da290fd3c98591f2",
"filesize": 264933376,
"download_url": "https://sourceforge.net/projects/gns-3/files/Qemu%20Appliances/",
"direct_download_url": "https://downloads.sourceforge.net/project/gns-3/Qemu%20Appliances/debian-11.8.qcow2"
}
],
"versions": [
{
"name": "12.1",
"name": "12.2",
"images": {
"hda_disk_image": "debian-12-genericcloud-amd64-20230723-1450.qcow2",
"cdrom_image": "debian-cloud-init-data.iso"
"hda_disk_image": "debian-12.2.qcow2"
}
},
{
"name": "11.7",
"name": "11.8",
"images": {
"hda_disk_image": "debian-11-genericcloud-amd64-20230601-1398.qcow2",
"cdrom_image": "debian-cloud-init-data.iso"
}
},
{
"name": "10.13",
"images": {
"hda_disk_image": "debian-10-genericcloud-amd64-20230601-1398.qcow2",
"cdrom_image": "debian-cloud-init-data.iso"
"hda_disk_image": "debian-11.8.qcow2"
}
}
]

View File

@ -1,9 +0,0 @@
# Debian cloud-init-data image for GNS3 virtual appliance
Generated using the following commands:
```
printf "#cloud-config\n\npassword: debian\nchpasswd: { expire: False }\nssh_pwauth: True\n" > user-data
printf "instance-id: debian\nlocal-hostname: debian\n" > meta-data
mkisofs -output debian-cloud-init-data.iso -volid cidata -joliet -rock user-data meta-data
```

1
packer/debian/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
debian-cloud-init-data.iso

View File

@ -8,12 +8,28 @@ To use these newer versions, you must delete the line
containing `iso_checksum_type` from debian.json.
## Debian CLI installation
## Generate debian-cloud-init-data image
debian-cloud-init-data can be generated with the following commands:
```
printf "#cloud-config\n\npassword: debian\nchpasswd: { expire: False }\nssh_pwauth: True\n" > user-data
printf "instance-id: debian\nlocal-hostname: debian\n" > meta-data
mkisofs -output debian-cloud-init-data.iso -volid cidata -joliet -rock user-data meta-data
```
## Debian CLI
```
packer build debian.json
```
## Debian-11 CLI
```
packer build -var-file=debian-11.json debian.json
```
## BIRDv2
A build of Debian with BIRD Internet Routing Daemon v2 preinstalled.

View File

@ -0,0 +1,5 @@
{
"iso_url": "https://cloud.debian.org/images/cloud/bullseye/20231013-1532/debian-11-genericcloud-amd64-20231013-1532.qcow2",
"iso_checksum": "b3b2f6b3411ea6e2f097a91b579ad2838611d5cdf8fbd1089435c55f9c6bb398",
"vm_name": "debian-11.qcow2"
}

View File

@ -1 +0,0 @@
../../cloud-init/Debian/debian-cloud-init-data.iso

View File

@ -1,7 +1,7 @@
{
"variables": {
"iso_url": "https://cloud.debian.org/images/cloud/bookworm/20230612-1409/debian-12-genericcloud-amd64-20230612-1409.qcow2",
"iso_checksum": "9a18ee4954800113ee130b66ef24c0e27124aaf90cff1eb339f744a52354f788",
"iso_url": "https://cloud.debian.org/images/cloud/bookworm/20231013-1532/debian-12-genericcloud-amd64-20231013-1532.qcow2",
"iso_checksum": "3a5fd3f38f055ceb1a2f84c6184ca4de3566e29e519b405865719cc43426afdf",
"disk_size": "2G",
"vm_name": "debian.qcow2",
"setup_script": "debian.sh"

View File

@ -1,5 +1,8 @@
#!/bin/sh
set -ex
# reset terminal attributes on login
sed -i "1s/^/$(export TERM=vt220; tput sgr0; tput smam)/" /etc/issue
# create GNS3 user
printf 'gns3\ngns3\n' | adduser --gecos 'GNS3' gns3

View File

@ -12,6 +12,7 @@ fi
cp /etc/resolv.conf /etc/resolv.conf.orig
export DEBIAN_FRONTEND=noninteractive
apt-get update
apt-get upgrade
apt-get -y install --purge ifupdown resolvconf
cat /etc/resolv.conf.orig > /etc/resolv.conf
rm -f /etc/resolv.conf.orig