From 65faa3aab3631466e93de579fb65186f38f9514b Mon Sep 17 00:00:00 2001 From: Rui Lopes Date: Wed, 8 Dec 2021 10:59:37 +0000 Subject: [PATCH] upgrade to ubuntu 22.04 (jammy jellyfish) --- Makefile | 2 +- README.md | 6 +++--- example/Vagrantfile | 4 ++-- provision-local-hyperv.ps1 | 4 ++-- provision.sh | 12 ++++++------ ubuntu.pkr.hcl | 4 ++-- 6 files changed, 16 insertions(+), 16 deletions(-) diff --git a/Makefile b/Makefile index 1ea131d..00ad238 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ SHELL=bash .SHELLFLAGS=-euo pipefail -c -VERSION=21.10 +VERSION=22.04 help: @echo type make build-libvirt, make build-uefi-libvirt, make build-virtualbox, make build-hyperv or make build-vsphere diff --git a/README.md b/README.md index d5c1a72..edfc732 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ This builds an up-to-date Vagrant Ubuntu Base Box as described at the [From Iso To Vagrant Box](http://blog.ruilopes.com/from-iso-to-vagrant-box.html) article. -Currently this targets [Ubuntu 21.10 (Impish Indri)](https://wiki.ubuntu.com/ImpishIndri/ReleaseNotes). +Currently this targets [Ubuntu 22.04 (Jammy Jellyfish)](https://wiki.ubuntu.com/JammyJellyfish/ReleaseNotes). Other Ubuntu versions might be available in a [separate branch](https://github.com/rgl/ubuntu-vagrant/branches). @@ -175,10 +175,10 @@ export GOVC_PASSWORD='password' export GOVC_DATACENTER='Datacenter' export GOVC_CLUSTER='Cluster' export GOVC_DATASTORE='Datastore' -export VSPHERE_OS_ISO="[$GOVC_DATASTORE] iso/ubuntu-21.10-live-server-amd64.iso" +export VSPHERE_OS_ISO="[$GOVC_DATASTORE] iso/ubuntu-22.04-live-server-amd64.iso" export VSPHERE_ESXI_HOST='esxi.local' export VSPHERE_TEMPLATE_FOLDER='test/templates' -export VSPHERE_TEMPLATE_NAME="$VSPHERE_TEMPLATE_FOLDER/ubuntu-21.10-amd64-vsphere" +export VSPHERE_TEMPLATE_NAME="$VSPHERE_TEMPLATE_FOLDER/ubuntu-22.04-amd64-vsphere" export VSPHERE_VM_FOLDER='test' export VSPHERE_VM_NAME='ubuntu-vagrant-example' export VSPHERE_VLAN='packer' diff --git a/example/Vagrantfile b/example/Vagrantfile index b0723ae..d8b5540 100644 --- a/example/Vagrantfile +++ b/example/Vagrantfile @@ -88,8 +88,8 @@ cloud_init_user_data = { } Vagrant.configure(2) do |config| - config.vm.box = 'ubuntu-21.10-amd64' - #config.vm.box = 'ubuntu-21.10-uefi-amd64' + config.vm.box = 'ubuntu-22.04-amd64' + #config.vm.box = 'ubuntu-22.04-uefi-amd64' config.vm.hostname = 'example.test' diff --git a/provision-local-hyperv.ps1 b/provision-local-hyperv.ps1 index a9894a8..0d1745d 100644 --- a/provision-local-hyperv.ps1 +++ b/provision-local-hyperv.ps1 @@ -2,8 +2,8 @@ # also shows example values): # # PACKER_VERSION 1.6.0 -# PACKER_VM_NAME packer-ubuntu-21.10-amd64-hyperv -# PACKER_BUILD_NAME ubuntu-21.10-amd64-hyperv +# PACKER_VM_NAME packer-ubuntu-22.04-amd64-hyperv +# PACKER_BUILD_NAME ubuntu-22.04-amd64-hyperv # PACKER_BUILDER_TYPE hyperv-iso # PACKER_HTTP_ADDR 10.0.0.123:1 # PACKER_HTTP_IP 10.0.0.123 diff --git a/provision.sh b/provision.sh index b635116..4e3cbf5 100644 --- a/provision.sh +++ b/provision.sh @@ -81,12 +81,12 @@ rm -f /var/lib/dbus/machine-id # reset the random-seed. # NB systemd-random-seed re-generates it on every boot and shutdown. # NB you can prove that random-seed file does not exist on the image with: -# sudo virt-filesystems -a ~/.vagrant.d/boxes/ubuntu-21.10-amd64/0/libvirt/box.img -# sudo mkdir /mnt/ubuntu-21.10-amd64 -# sudo guestmount -a ~/.vagrant.d/boxes/ubuntu-21.10-amd64/0/libvirt/box.img -m /dev/sda1 --pid-file guestmount.pid --ro /mnt/ubuntu-21.10-amd64 -# sudo bash -c 'unmkinitramfs /mnt/ubuntu-21.10-amd64/boot/initrd.img /tmp/ubuntu-21.10-amd64-initrd' # NB prefer unmkinitramfs over cpio. -# sudo ls -laF /mnt/var/lib/systemd -# sudo guestunmount /mnt/ubuntu-21.10-amd64 +# sudo virt-filesystems -a ~/.vagrant.d/boxes/ubuntu-22.04-amd64/0/libvirt/box.img +# sudo mkdir /mnt/ubuntu-22.04-amd64 +# sudo guestmount -a ~/.vagrant.d/boxes/ubuntu-22.04-amd64/0/libvirt/box.img -m /dev/sda1 --pid-file guestmount.pid --ro /mnt/ubuntu-22.04-amd64 +# sudo bash -c 'unmkinitramfs /mnt/ubuntu-22.04-amd64/boot/initrd.img /tmp/ubuntu-22.04-amd64-initrd' # NB prefer unmkinitramfs over cpio. +# sudo ls -laF /mnt/ubuntu-22.04-amd64/var/lib/systemd +# sudo guestunmount /mnt/ubuntu-22.04-amd64 # sudo bash -c 'while kill -0 $(cat guestmount.pid) 2>/dev/null; do sleep .1; done; rm guestmount.pid' # wait for guestmount to finish. # see https://www.freedesktop.org/software/systemd/man/systemd-random-seed.service.html # see https://manpages.ubuntu.com/manpages/bionic/man4/random.4.html diff --git a/ubuntu.pkr.hcl b/ubuntu.pkr.hcl index 8eb6c65..9f0a485 100644 --- a/ubuntu.pkr.hcl +++ b/ubuntu.pkr.hcl @@ -5,12 +5,12 @@ variable "disk_size" { variable "iso_url" { type = string - default = "https://releases.ubuntu.com/21.10/ubuntu-21.10-live-server-amd64.iso" + default = "https://releases.ubuntu.com/22.04/ubuntu-22.04-live-server-amd64.iso" } variable "iso_checksum" { type = string - default = "sha256:e84f546dfc6743f24e8b1e15db9cc2d2c698ec57d9adfb852971772d1ce692d4" + default = "sha256:84aeaf7823c8c61baa0ae862d0a06b03409394800000b3235854a6b38eb4856f" } variable "hyperv_switch_name" {