From 5469db383ab40c3eb6338c3e5e5f3e1533f021a4 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 12 Dec 2019 15:22:50 +0000 Subject: [PATCH] builder: templates: Build RHEL 8.1 image internally. --- builder/templates/make-template.ml | 1 + builder/templates/rhel-8.1.ks | 29 +++++++++++++++++++++ builder/templates/rhel-8.1.virt-install-cmd | 20 ++++++++++++++ 3 files changed, 50 insertions(+) create mode 100644 builder/templates/rhel-8.1.ks create mode 100644 builder/templates/rhel-8.1.virt-install-cmd diff --git a/builder/templates/make-template.ml b/builder/templates/make-template.ml index 4096ca790..c719ce052 100755 --- a/builder/templates/make-template.ml +++ b/builder/templates/make-template.ml @@ -1155,6 +1155,7 @@ and os_variant_of_os ?(for_fedora = false) os arch = | RHEL (7, minor), _ when minor <= 4 -> sprintf "rhel7.%d" minor | RHEL (7, _), _ -> "rhel7.5" (* max version known in Fedora 29 *) + | RHEL (8, _), _ -> "rhel8.0" (* temporary until osinfo updated *) | RHEL (major, minor), _ -> sprintf "rhel%d.%d" major minor diff --git a/builder/templates/rhel-8.1.ks b/builder/templates/rhel-8.1.ks new file mode 100644 index 000000000..e51f2cc85 --- /dev/null +++ b/builder/templates/rhel-8.1.ks @@ -0,0 +1,29 @@ +# Kickstart file for rhel-8.1 +# Generated by libguestfs.git/builder/templates/make-template.ml + +install +text +reboot +lang en_US.UTF-8 +keyboard us +network --bootproto dhcp +rootpw builder +firewall --enabled --ssh +timezone --utc America/New_York +selinux --enforcing + +bootloader --location=mbr --append="console=tty0 console=ttyS0,115200 rd_NO_PLYMOUTH" + + +zerombr +clearpart --all --initlabel --disklabel=gpt +autopart --type=plain + +# Halt the system once configuration has finished. +poweroff + +%packages +@core +%end + +# EOF diff --git a/builder/templates/rhel-8.1.virt-install-cmd b/builder/templates/rhel-8.1.virt-install-cmd new file mode 100644 index 000000000..0423bd702 --- /dev/null +++ b/builder/templates/rhel-8.1.virt-install-cmd @@ -0,0 +1,20 @@ +# This is the virt-install command which was used to create +# the virt-builder template 'rhel-8.1' +# NB: This file is generated for documentation purposes ONLY! +# This script was never run, and is not intended to be run. + +'virt-install' \ + '--transient' \ + '--name=tmp-c58utbt5' \ + '--ram=4096' \ + '--arch=x86_64' \ + '--cpu=host' \ + '--vcpus=4' \ + '--os-variant=rhel8.0' \ + '--initrd-inject=rhel-8.1.ks' \ + '--extra-args=ks=file:/rhel-8.1.ks console=tty0 console=ttyS0,115200 rd_NO_PLYMOUTH' \ + '--disk=/home/rjones/d/libguestfs/builder/templates/tmp-c58utbt5.img,size=6,format=raw' \ + '--location=http://download.eng.bos.redhat.com/released/RHEL-8/8.1.0/BaseOS/x86_64/os' \ + '--serial=pty' \ + '--nographics' +