From 900362071733a3641e7ed09fcb524365d597c942 Mon Sep 17 00:00:00 2001 From: Brian Fjeldstad Date: Mon, 26 Oct 2026 16:06:02 +0000 Subject: [PATCH] tests: add shared VM assets and GRUB scenarios Introduce shared VM image assets and the GRUB base/update scenarios. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 6501a6e2-9ece-44f9-a91a-4d8e0c0e6d07 --- tests/tailor-images/README.md | 1 + tests/tailor-images/tailor.yaml | 1 + .../trident-vm-testimage/README.md | 31 ++++++++++ .../trident-vm-testimage/base/.gitignore | 1 + .../base/files/.gitignore | 3 + .../base/files/99-dhcp-eth0.network | 6 ++ .../base/files/etc-mount-mic.service | 15 +++++ .../base/files/etc-mount.service | 17 ++++++ .../base/files/etc-mount.sh | 24 ++++++++ .../base/files/sshd-keygen.service | 14 +++++ .../base/scripts/create-rw-overlay-dirs.sh | 2 + .../base/scripts/create-ssh-dirs.sh | 3 + .../base/scripts/duid-type-to-link-layer.sh | 1 + .../base/scripts/lsblk.sh | 1 + .../base/scripts/post-install.sh | 2 + .../prepare-update-config-usrverity.sh | 9 +++ .../scripts/prepare-update-config-verity.sh | 36 ++++++++++++ .../base/scripts/prepare-update-config.sh | 9 +++ .../base/scripts/ssh-move-host-keys.sh | 9 +++ .../base/scripts/update-host-status.sh | 1 + .../base/scripts/update-os-release.sh | 2 + .../trident-vm-testimage/by-arch/arm64.yaml | 6 ++ .../by-scenario/grub-base.yaml | 56 ++++++++++++++++++ .../by-scenario/grub.yaml | 57 +++++++++++++++++++ .../trident-vm-testimage/image.yaml | 25 ++++++++ .../include/grub-base-scripts.yaml | 6 ++ .../include/grub-scripts.yaml | 4 ++ .../include/storage-grub-update.yaml | 19 +++++++ .../include/storage-grub.yaml | 31 ++++++++++ 29 files changed, 392 insertions(+) create mode 100644 tests/tailor-images/trident-vm-testimage/README.md create mode 100644 tests/tailor-images/trident-vm-testimage/base/.gitignore create mode 100644 tests/tailor-images/trident-vm-testimage/base/files/.gitignore create mode 100644 tests/tailor-images/trident-vm-testimage/base/files/99-dhcp-eth0.network create mode 100644 tests/tailor-images/trident-vm-testimage/base/files/etc-mount-mic.service create mode 100644 tests/tailor-images/trident-vm-testimage/base/files/etc-mount.service create mode 100755 tests/tailor-images/trident-vm-testimage/base/files/etc-mount.sh create mode 100644 tests/tailor-images/trident-vm-testimage/base/files/sshd-keygen.service create mode 100755 tests/tailor-images/trident-vm-testimage/base/scripts/create-rw-overlay-dirs.sh create mode 100755 tests/tailor-images/trident-vm-testimage/base/scripts/create-ssh-dirs.sh create mode 100755 tests/tailor-images/trident-vm-testimage/base/scripts/duid-type-to-link-layer.sh create mode 100644 tests/tailor-images/trident-vm-testimage/base/scripts/lsblk.sh create mode 100755 tests/tailor-images/trident-vm-testimage/base/scripts/post-install.sh create mode 100755 tests/tailor-images/trident-vm-testimage/base/scripts/prepare-update-config-usrverity.sh create mode 100755 tests/tailor-images/trident-vm-testimage/base/scripts/prepare-update-config-verity.sh create mode 100755 tests/tailor-images/trident-vm-testimage/base/scripts/prepare-update-config.sh create mode 100755 tests/tailor-images/trident-vm-testimage/base/scripts/ssh-move-host-keys.sh create mode 100755 tests/tailor-images/trident-vm-testimage/base/scripts/update-host-status.sh create mode 100755 tests/tailor-images/trident-vm-testimage/base/scripts/update-os-release.sh create mode 100644 tests/tailor-images/trident-vm-testimage/by-arch/arm64.yaml create mode 100644 tests/tailor-images/trident-vm-testimage/by-scenario/grub-base.yaml create mode 100644 tests/tailor-images/trident-vm-testimage/by-scenario/grub.yaml create mode 100644 tests/tailor-images/trident-vm-testimage/image.yaml create mode 100644 tests/tailor-images/trident-vm-testimage/include/grub-base-scripts.yaml create mode 100644 tests/tailor-images/trident-vm-testimage/include/grub-scripts.yaml create mode 100644 tests/tailor-images/trident-vm-testimage/include/storage-grub-update.yaml create mode 100644 tests/tailor-images/trident-vm-testimage/include/storage-grub.yaml diff --git a/tests/tailor-images/README.md b/tests/tailor-images/README.md index 38c1008a0d..41fdd0473b 100644 --- a/tests/tailor-images/README.md +++ b/tests/tailor-images/README.md @@ -60,3 +60,4 @@ The current families are: - `trident-installer` - `trident-testimage` - `trident-verity-testimage` +- `trident-vm-testimage` diff --git a/tests/tailor-images/tailor.yaml b/tests/tailor-images/tailor.yaml index 3b7178d946..2d7b1d5a75 100644 --- a/tests/tailor-images/tailor.yaml +++ b/tests/tailor-images/tailor.yaml @@ -73,3 +73,4 @@ images: - trident-installer - trident-testimage - trident-verity-testimage + - trident-vm-testimage diff --git a/tests/tailor-images/trident-vm-testimage/README.md b/tests/tailor-images/trident-vm-testimage/README.md new file mode 100644 index 0000000000..87586b80d3 --- /dev/null +++ b/tests/tailor-images/trident-vm-testimage/README.md @@ -0,0 +1,31 @@ +# Trident VM Test Image + +This image is used for testing Trident adopting an already produced image (e.g. +generated by MIC). It is based on the baremetal +image and adds Trident as well as its dependencies. It also adds openssh-server +to allow for remote access. Finally, it contains duplicate set of partitions to +setup the disk layout for A/B update. + +Available images: + +- regular + +## Additional Prerequisites + +- Artifacts + - **Trident RPMs**: expected in `bin/RPMS/**/*.rpm`. Can be created with + `make bin/trident-rpms.tar.gz` + +## Building + +To build the base image, run: + +| Image type | Make command | Output path | +| ---------- | ------------ | ----------- | +| Regular | `make artifacts/trident-vm-grub-testimage.qcow2` | `artifacts/trident-vm-grub-testimage.qcow2` | + +To build the update images, run: + +| Image type | Make command | Output path | +| ---------- | ------------ | ----------- | +| Regular | `make artifacts/trident-vm-grub-testimage.cosi` | `artifacts/trident-vm-grub-testimage.cosi` | diff --git a/tests/tailor-images/trident-vm-testimage/base/.gitignore b/tests/tailor-images/trident-vm-testimage/base/.gitignore new file mode 100644 index 0000000000..6c07ccac55 --- /dev/null +++ b/tests/tailor-images/trident-vm-testimage/base/.gitignore @@ -0,0 +1 @@ +mic-config.yaml \ No newline at end of file diff --git a/tests/tailor-images/trident-vm-testimage/base/files/.gitignore b/tests/tailor-images/trident-vm-testimage/base/files/.gitignore new file mode 100644 index 0000000000..7ed8773999 --- /dev/null +++ b/tests/tailor-images/trident-vm-testimage/base/files/.gitignore @@ -0,0 +1,3 @@ +host_status.yaml +config.yaml +id_rsa.pub \ No newline at end of file diff --git a/tests/tailor-images/trident-vm-testimage/base/files/99-dhcp-eth0.network b/tests/tailor-images/trident-vm-testimage/base/files/99-dhcp-eth0.network new file mode 100644 index 0000000000..5cef9e24f8 --- /dev/null +++ b/tests/tailor-images/trident-vm-testimage/base/files/99-dhcp-eth0.network @@ -0,0 +1,6 @@ +[Match] +Name=eth0 + +[Network] +DHCP=yes +IPv6AcceptRA=no \ No newline at end of file diff --git a/tests/tailor-images/trident-vm-testimage/base/files/etc-mount-mic.service b/tests/tailor-images/trident-vm-testimage/base/files/etc-mount-mic.service new file mode 100644 index 0000000000..48f05860e4 --- /dev/null +++ b/tests/tailor-images/trident-vm-testimage/base/files/etc-mount-mic.service @@ -0,0 +1,15 @@ +[Unit] +Description=/etc Mount Service +DefaultDependencies=no +Conflicts=umount.target +Before=local-fs.target umount.target +Requires=var-lib-trident\x2doverlay.mount +After=var-lib-trident\x2doverlay.mount + +[Service] +Type=oneshot +RemainAfterExit=yes +ExecStart=etc-mount.sh commit-machine-id + +[Install] +WantedBy=local-fs.target \ No newline at end of file diff --git a/tests/tailor-images/trident-vm-testimage/base/files/etc-mount.service b/tests/tailor-images/trident-vm-testimage/base/files/etc-mount.service new file mode 100644 index 0000000000..a90c052deb --- /dev/null +++ b/tests/tailor-images/trident-vm-testimage/base/files/etc-mount.service @@ -0,0 +1,17 @@ +[Unit] +Description=/etc Mount Service +DefaultDependencies=no +Conflicts=umount.target +Before=local-fs.target umount.target systemd-networkd.service +Requires=etc.mount +After=etc.mount +Requires=var-lib-trident\x2doverlay.mount +After=var-lib-trident\x2doverlay.mount + +[Service] +Type=oneshot +RemainAfterExit=yes +ExecStart=etc-mount.sh + +[Install] +WantedBy=local-fs.target \ No newline at end of file diff --git a/tests/tailor-images/trident-vm-testimage/base/files/etc-mount.sh b/tests/tailor-images/trident-vm-testimage/base/files/etc-mount.sh new file mode 100755 index 0000000000..b187511aca --- /dev/null +++ b/tests/tailor-images/trident-vm-testimage/base/files/etc-mount.sh @@ -0,0 +1,24 @@ +#!/bin/bash + +set -ex + +# TODO: figure out why we are missing systemd-machine-id-commit service, which should automate this +if [ "$1" == "commit-machine-id" ]; then + MACHINEID=`cat /etc/machine-id` + echo $MACHINEID + # if machine-id has a mount point, unmount it + if grep -q /etc/machine-id /proc/mounts; then + umount /etc/machine-id + fi +fi + +mount -t overlay overlay -o lowerdir=/etc,upperdir=/var/lib/trident-overlay/etc-rw/upper,workdir=/var/lib/trident-overlay/etc-rw/work /etc +# Workaround for dracut overlayfs module mounting /etc overlay as 755 on clean install and +# 750 on abupdate +chmod o+rx /etc + +if [ "$1" == "commit-machine-id" ]; then + echo Committing machine-id + echo $MACHINEID > /etc/machine-id + cat /etc/machine-id +fi \ No newline at end of file diff --git a/tests/tailor-images/trident-vm-testimage/base/files/sshd-keygen.service b/tests/tailor-images/trident-vm-testimage/base/files/sshd-keygen.service new file mode 100644 index 0000000000..ab8532cd74 --- /dev/null +++ b/tests/tailor-images/trident-vm-testimage/base/files/sshd-keygen.service @@ -0,0 +1,14 @@ +[Unit] +Description=Generate sshd host keys +ConditionPathExists=|!/srv/etc/ssh/ssh_host_rsa_key +ConditionPathExists=|!/srv/etc/ssh/ssh_host_ecdsa_key +ConditionPathExists=|!/srv/etc/ssh/ssh_host_ed25519_key +Before=sshd.service + +[Service] +Type=oneshot +RemainAfterExit=yes +ExecStart=/usr/bin/ssh-keygen -A -f /srv + +[Install] +WantedBy=multi-user.target diff --git a/tests/tailor-images/trident-vm-testimage/base/scripts/create-rw-overlay-dirs.sh b/tests/tailor-images/trident-vm-testimage/base/scripts/create-rw-overlay-dirs.sh new file mode 100755 index 0000000000..56f74ceb13 --- /dev/null +++ b/tests/tailor-images/trident-vm-testimage/base/scripts/create-rw-overlay-dirs.sh @@ -0,0 +1,2 @@ +mkdir -p /var/lib/trident-overlay/etc-rw/upper +mkdir -p /var/lib/trident-overlay/etc-rw/work \ No newline at end of file diff --git a/tests/tailor-images/trident-vm-testimage/base/scripts/create-ssh-dirs.sh b/tests/tailor-images/trident-vm-testimage/base/scripts/create-ssh-dirs.sh new file mode 100755 index 0000000000..6454a7a0e3 --- /dev/null +++ b/tests/tailor-images/trident-vm-testimage/base/scripts/create-ssh-dirs.sh @@ -0,0 +1,3 @@ +# Move the SSH host keys off the read-only /etc directory, so that sshd can run. +SSH_VAR_DIR="/srv/etc/ssh/" +mkdir -p "$SSH_VAR_DIR" diff --git a/tests/tailor-images/trident-vm-testimage/base/scripts/duid-type-to-link-layer.sh b/tests/tailor-images/trident-vm-testimage/base/scripts/duid-type-to-link-layer.sh new file mode 100755 index 0000000000..5c35e32cf2 --- /dev/null +++ b/tests/tailor-images/trident-vm-testimage/base/scripts/duid-type-to-link-layer.sh @@ -0,0 +1 @@ +sed -i 's/#DUIDType=vendor/DUIDType=link-layer/' /etc/systemd/networkd.conf \ No newline at end of file diff --git a/tests/tailor-images/trident-vm-testimage/base/scripts/lsblk.sh b/tests/tailor-images/trident-vm-testimage/base/scripts/lsblk.sh new file mode 100644 index 0000000000..39b5518e72 --- /dev/null +++ b/tests/tailor-images/trident-vm-testimage/base/scripts/lsblk.sh @@ -0,0 +1 @@ +lsblk --json --output-all --bytes \ No newline at end of file diff --git a/tests/tailor-images/trident-vm-testimage/base/scripts/post-install.sh b/tests/tailor-images/trident-vm-testimage/base/scripts/post-install.sh new file mode 100755 index 0000000000..b960507cd1 --- /dev/null +++ b/tests/tailor-images/trident-vm-testimage/base/scripts/post-install.sh @@ -0,0 +1,2 @@ +# Add the necessary directories for the audit logs so that auditd can start +mkdir -p /var/log/audit \ No newline at end of file diff --git a/tests/tailor-images/trident-vm-testimage/base/scripts/prepare-update-config-usrverity.sh b/tests/tailor-images/trident-vm-testimage/base/scripts/prepare-update-config-usrverity.sh new file mode 100755 index 0000000000..82663a13d3 --- /dev/null +++ b/tests/tailor-images/trident-vm-testimage/base/scripts/prepare-update-config-usrverity.sh @@ -0,0 +1,9 @@ +CONFIG_PATH=/var/lib/trident/update-config.yaml +DOWNLOAD_URL_PREFIX="http://192.168.122.1:8000" + +cp /etc/trident/config.yaml $CONFIG_PATH +cat <> $CONFIG_PATH +image: + url: $DOWNLOAD_URL_PREFIX/usrverity.cosi + sha384: ignored +EOF \ No newline at end of file diff --git a/tests/tailor-images/trident-vm-testimage/base/scripts/prepare-update-config-verity.sh b/tests/tailor-images/trident-vm-testimage/base/scripts/prepare-update-config-verity.sh new file mode 100755 index 0000000000..600151fdd8 --- /dev/null +++ b/tests/tailor-images/trident-vm-testimage/base/scripts/prepare-update-config-verity.sh @@ -0,0 +1,36 @@ +CONFIG_PATH=/var/lib/trident/update-config.yaml +DOWNLOAD_URL_PREFIX="http://192.168.122.1:8000" + +cat < $CONFIG_PATH +image: + url: $DOWNLOAD_URL_PREFIX/verity.cosi + sha384: ignored +EOF + +INTERFACE_MASK='enp*' +if [ "$1" == "eth0" ]; then + INTERFACE_MASK="$1" +fi + +if [ "$1" != "uki" ]; then + cat <> $CONFIG_PATH +scripts: + postConfigure: + - name: rw-overlay + runOn: [all] + content: | + mkdir -p /var/lib/trident-overlay/etc-rw/upper && mkdir -p /var/lib/trident-overlay/etc-rw/work +EOF +fi + +cat <> $CONFIG_PATH +internalParams: + allowUnusedFilesystems: true +EOF + +if [ "$1" == "uki" ]; then + cat <> $CONFIG_PATH + uki: true + disableGrubNoprefixCheck: true +EOF +fi diff --git a/tests/tailor-images/trident-vm-testimage/base/scripts/prepare-update-config.sh b/tests/tailor-images/trident-vm-testimage/base/scripts/prepare-update-config.sh new file mode 100755 index 0000000000..df4ddb8143 --- /dev/null +++ b/tests/tailor-images/trident-vm-testimage/base/scripts/prepare-update-config.sh @@ -0,0 +1,9 @@ +CONFIG_PATH=/var/lib/trident/update-config.yaml +DOWNLOAD_URL_PREFIX="http://192.168.122.1:8000" + +cp /etc/trident/config.yaml $CONFIG_PATH +cat <> $CONFIG_PATH +image: + url: $DOWNLOAD_URL_PREFIX/regular.cosi + sha384: ignored +EOF \ No newline at end of file diff --git a/tests/tailor-images/trident-vm-testimage/base/scripts/ssh-move-host-keys.sh b/tests/tailor-images/trident-vm-testimage/base/scripts/ssh-move-host-keys.sh new file mode 100755 index 0000000000..7891a607ac --- /dev/null +++ b/tests/tailor-images/trident-vm-testimage/base/scripts/ssh-move-host-keys.sh @@ -0,0 +1,9 @@ +# Move the SSH host keys off the read-only /etc directory, so that sshd can run. +SSH_VAR_DIR="/srv/etc/ssh/" + +cat << EOF >> /etc/ssh/sshd_config + +HostKey $SSH_VAR_DIR/ssh_host_rsa_key +HostKey $SSH_VAR_DIR/ssh_host_ecdsa_key +HostKey $SSH_VAR_DIR/ssh_host_ed25519_key +EOF diff --git a/tests/tailor-images/trident-vm-testimage/base/scripts/update-host-status.sh b/tests/tailor-images/trident-vm-testimage/base/scripts/update-host-status.sh new file mode 100755 index 0000000000..4a69a02213 --- /dev/null +++ b/tests/tailor-images/trident-vm-testimage/base/scripts/update-host-status.sh @@ -0,0 +1 @@ +trident offline-initialize diff --git a/tests/tailor-images/trident-vm-testimage/base/scripts/update-os-release.sh b/tests/tailor-images/trident-vm-testimage/base/scripts/update-os-release.sh new file mode 100755 index 0000000000..d28e1c109d --- /dev/null +++ b/tests/tailor-images/trident-vm-testimage/base/scripts/update-os-release.sh @@ -0,0 +1,2 @@ +printf -v DATE '%(%Y%m%d)T' -1 +sed -i "s/VERSION=\".*\"/VERSION=\"$DATE\"/" /etc/os-release \ No newline at end of file diff --git a/tests/tailor-images/trident-vm-testimage/by-arch/arm64.yaml b/tests/tailor-images/trident-vm-testimage/by-arch/arm64.yaml new file mode 100644 index 0000000000..95935de4b2 --- /dev/null +++ b/tests/tailor-images/trident-vm-testimage/by-arch/arm64.yaml @@ -0,0 +1,6 @@ +base: + $include: ../common/matrix/base-core-arm64.yaml + +outputs: + $replace: + - format: cosi diff --git a/tests/tailor-images/trident-vm-testimage/by-scenario/grub-base.yaml b/tests/tailor-images/trident-vm-testimage/by-scenario/grub-base.yaml new file mode 100644 index 0000000000..4362d99abf --- /dev/null +++ b/tests/tailor-images/trident-vm-testimage/by-scenario/grub-base.yaml @@ -0,0 +1,56 @@ +# Base (qcow2) counterpart to grub.yaml, matching the pre-migration +# baseimg-grub.yaml / updateimg-grub.yaml split: the base image is a +# dual-slot A/B layout (storage-grub.yaml, unchanged), while the cosi +# update target uses a single slot (storage-grub-update.yaml). +outputs: + $replace: + - format: qcow2 +config: + storage: + $include: ./include/storage-grub.yaml + os: + bootloader: + resetType: hard-reset + hostname: trident-vm-testimg + selinux: + mode: disabled + kernelCommandLine: + extraCommandLine: + - console=tty0 + - console=tty1 + - console=ttyS0 + - rd.debug + - loglevel=6 + - log_buf_len=1M + - systemd.journald.forward_to_console=1 + packages: + install: + - dnf + - efibootmgr + - grub2-efi-binary + - iproute + - iptables + - jq + - openssh-server + - trident-service + - vim + - netplan + services: + enable: + - tridentd.socket + users: + - name: testuser + sshPublicKeyPaths: + - base/files/id_rsa.pub + secondaryGroups: + - wheel + additionalFiles: + - source: base/files/sshd-keygen.service + destination: /usr/lib/systemd/system/sshd-keygen.service + - source: base/files/99-dhcp-eth0.network + destination: /etc/systemd/network/99-dhcp-eth0.network + - source: ../common/files/sudoers-wheel + destination: /etc/sudoers.d/wheel + scripts: + postCustomization: + - $include: ./include/grub-base-scripts.yaml diff --git a/tests/tailor-images/trident-vm-testimage/by-scenario/grub.yaml b/tests/tailor-images/trident-vm-testimage/by-scenario/grub.yaml new file mode 100644 index 0000000000..0024e36cef --- /dev/null +++ b/tests/tailor-images/trident-vm-testimage/by-scenario/grub.yaml @@ -0,0 +1,57 @@ +config: + storage: + $include: ./include/storage-grub-update.yaml + os: + bootloader: + resetType: hard-reset + hostname: trident-vm-testimg + selinux: + mode: disabled + kernelCommandLine: + extraCommandLine: + - console=tty0 + - console=tty1 + - console=ttyS0 + - rd.debug + - loglevel=6 + - log_buf_len=1M + - systemd.journald.forward_to_console=1 + packages: + install: + - curl + - dnf + - efibootmgr + - grub2-efi-binary-noprefix + - iproute + - iptables + - jq + - lsof + - netplan + - openssh-server + - trident-service + - vim + - netplan + remove: + - grub2-efi-binary + services: + enable: + - trident + - tridentd.socket + users: + - name: testuser + sshPublicKeyPaths: + - base/files/id_rsa.pub + secondaryGroups: + - wheel + additionalFiles: + - source: base/files/sshd-keygen.service + destination: /usr/lib/systemd/system/sshd-keygen.service + - source: base/files/99-dhcp-eth0.network + destination: /etc/systemd/network/99-dhcp-eth0.network + - source: ../common/files/sudoers-wheel + destination: /etc/sudoers.d/wheel + - source: ../common/files/use-grpc-client-commit.conf + destination: /etc/systemd/system/trident.service.d/override.conf + scripts: + postCustomization: + - $include: ./include/grub-scripts.yaml diff --git a/tests/tailor-images/trident-vm-testimage/image.yaml b/tests/tailor-images/trident-vm-testimage/image.yaml new file mode 100644 index 0000000000..c04f38ec5e --- /dev/null +++ b/tests/tailor-images/trident-vm-testimage/image.yaml @@ -0,0 +1,25 @@ +name: trident-vm-testimage + +matrix: + arch: [amd64, arm64] + scenario: [grub, grub-base] + +selectors: + exclude: + - { arch: arm64, scenario: [grub-base] } + +base: + ref: qemu_guest + +outputs: + - format: cosi + +rpmSources: + - ../../../bin/RPMS + - ../../../artifacts/rpm-overrides + +extraDependencies: + - ./base + - ../common + +config: {} diff --git a/tests/tailor-images/trident-vm-testimage/include/grub-base-scripts.yaml b/tests/tailor-images/trident-vm-testimage/include/grub-base-scripts.yaml new file mode 100644 index 0000000000..b5dfd7894f --- /dev/null +++ b/tests/tailor-images/trident-vm-testimage/include/grub-base-scripts.yaml @@ -0,0 +1,6 @@ +- path: base/scripts/post-install.sh +- path: base/scripts/update-host-status.sh +- path: base/scripts/prepare-update-config.sh +- path: base/scripts/ssh-move-host-keys.sh +- path: base/scripts/create-ssh-dirs.sh +- path: base/scripts/duid-type-to-link-layer.sh diff --git a/tests/tailor-images/trident-vm-testimage/include/grub-scripts.yaml b/tests/tailor-images/trident-vm-testimage/include/grub-scripts.yaml new file mode 100644 index 0000000000..cefd80ff51 --- /dev/null +++ b/tests/tailor-images/trident-vm-testimage/include/grub-scripts.yaml @@ -0,0 +1,4 @@ +- path: base/scripts/post-install.sh +- path: base/scripts/ssh-move-host-keys.sh +- path: base/scripts/duid-type-to-link-layer.sh +- path: base/scripts/update-os-release.sh diff --git a/tests/tailor-images/trident-vm-testimage/include/storage-grub-update.yaml b/tests/tailor-images/trident-vm-testimage/include/storage-grub-update.yaml new file mode 100644 index 0000000000..affd3e7254 --- /dev/null +++ b/tests/tailor-images/trident-vm-testimage/include/storage-grub-update.yaml @@ -0,0 +1,19 @@ +bootType: efi +disks: + - partitionTableType: gpt + maxSize: 5G + partitions: + - id: esp + type: esp + size: 8M + - id: root + size: 4G +filesystems: + - deviceId: esp + type: fat32 + mountPoint: + path: /boot/efi + options: umask=0077 + - deviceId: root + type: ext4 + mountPoint: / diff --git a/tests/tailor-images/trident-vm-testimage/include/storage-grub.yaml b/tests/tailor-images/trident-vm-testimage/include/storage-grub.yaml new file mode 100644 index 0000000000..f36e7979e8 --- /dev/null +++ b/tests/tailor-images/trident-vm-testimage/include/storage-grub.yaml @@ -0,0 +1,31 @@ +bootType: efi +disks: + - partitionTableType: gpt + maxSize: 10G + partitions: + - id: esp + type: esp + size: 16M + - id: root-a + size: 4G + - id: root-b + size: 4G + - id: trident + size: 1G + - id: srv + size: grow +filesystems: + - deviceId: esp + type: fat32 + mountPoint: + path: /boot/efi + options: umask=0077 + - deviceId: root-a + type: ext4 + mountPoint: / + - deviceId: trident + type: ext4 + mountPoint: /var/lib/trident + - deviceId: srv + type: ext4 + mountPoint: /srv