Skip to content

Commit e90ee0c

Browse files
authored
Merge pull request #200 from AmedeeBulle/ol9.6-10.0
Updates for OL9.6 and 10.0
2 parents 4c2a3a9 + e8e35b7 commit e90ee0c

31 files changed

+1481
-143
lines changed

oracle-linux-image-tools/CHANGELOG.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,27 @@
11
# Release Notes
22

3+
## August 2025
4+
5+
### New Features
6+
7+
- Update for OL9U6, support for UEK8
8+
- Update for OL10U0
9+
- Vagrant VirtualBox: if `VAGRANT_GUEST_ADDITIONS_KERNEL` is set to `yes`, do not install the VirtualBox Guest Additions
10+
if the kernel already support these (UEK kernel). Default is `no` for backwards compatibility
11+
12+
### Changes
13+
14+
- `CPU_NUM` now accepts topology information using the `virt-install` syntax: `VCPUS[,maxvcpus=MAX][,sockets=#][,cores=#][,threads=#]`
15+
- Vagrant VirtualBox: set display controller to `VMSVGA` (`VBoxVGA` being deprecated)
16+
- Vagrant: remove/cleanup old dependencies
17+
18+
### Bug fixes
19+
20+
- Fixed issue when `ISO_URL` is referring to a file (#196, contributed by @retekdk)
21+
- Vagrant: correctly set target kernel in motd, refactor installation of the
22+
VirtualBox guest additions
23+
- use `uname -m` instead of `uname -i` which is deprecated
24+
325
## March 2025
426

527
Note: OL7 Premier Support ended on 31 December 2024, scripts will only be maintained for the OL8 and newer images.

oracle-linux-image-tools/bin/build-image.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,8 @@ load_env() {
159159
local distr_name
160160
# Note: OL7 media have space in the label which needs to be escaped
161161
# shellcheck disable=SC2001
162-
distr_name=$(sed -e 's/^.*OracleLinux-R\([[:digit:]]\)-U\([[:digit:]]\+\)\(-Server\)\?-\([^-]\+\)\(-dvd\)\?\(-[[:digit:]]\+\)\?\.iso$/OL\1U\2_\4/' <<< "${ISO_URL}")
163-
if [[ $distr_name =~ ^OL[6789]U ]]; then
162+
distr_name=$(sed -e 's/^.*OracleLinux-R\([[:digit:]]\+\)-U\([[:digit:]]\+\)\(-Server\)\?-\([^-]\+\)\(-dvd\)\?\(-[[:digit:]]\+\)\?\.iso$/OL\1U\2_\4/' <<< "${ISO_URL}")
163+
if [[ $distr_name =~ ^OL(6|7|8|9|(10))U ]]; then
164164
DISTR_NAME="${distr_name}"
165165
fi
166166

@@ -357,7 +357,7 @@ stage_kickstart() {
357357
# OL installed based on the generated kickstart file.
358358
# Globals:
359359
# BOOT_COMMAND, BOOT_COMMAND_SERIAL_CONSOLE, BOOT_LOCATION, BOOT_MODE
360-
# CPU_NUM, DISK_SIZE_MB, ISO_CHECKSUM, ISO_PATH, KS_FILE
360+
# CPU_NUM, DISK_SIZE_MB, ISO_CHECKSUM, ISO_LABEL, ISO_PATH, KS_FILE
361361
# MEM_SIZE, SERIAL_CONSOLE, VM_NAME, WORKSPACE
362362
# Arguments:
363363
# None
@@ -393,15 +393,15 @@ image_create() {
393393
fi
394394

395395
# shellcheck disable=SC2294
396-
virt-install --os-type linux --os-variant "${OS_VARIANT}" --name "${VM_NAME}" \
397-
--cpus "${CPU_NUM}" --memory "${MEM_SIZE}" \
396+
virt-install --os-type linux --os-variant "${OS_VARIANT}" --name "${VM_NAME}" \
397+
--vcpus "${CPU_NUM}" --memory "${MEM_SIZE}" \
398398
--controller "scsi,model=virtio-scsi" \
399399
--disk "path=${WORKSPACE}/${VM_NAME}/${VM_NAME}.qcow2,size=${DISK_SIZE_GB},bus=scsi,cache=unsafe" \
400400
--network default \
401401
--graphics none \
402402
--location "${iso_path}${location}" \
403-
--initrd-inject="${WORKSPACE}/${VM_NAME}/${KS_FILE}" \
404-
--extra-args="$(eval echo "${BOOT_COMMAND[@]}")" \
403+
--initrd-inject "${WORKSPACE}/${VM_NAME}/${KS_FILE}" \
404+
--extra-args "$(eval echo "${BOOT_COMMAND[@]}")" \
405405
--transient \
406406
"${virt_install_args[@]}"
407407
}

oracle-linux-image-tools/bin/provision-common.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ common::ks_log() {
4444
cat /root/ks-post.log
4545
rm /root/ks-post.log
4646
common::echo_message "Kickstart post log - End"
47+
else
48+
common::echo_message "No Kickstart post log found"
4749
fi
4850
}
4951

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ol10-slim
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ol9-slim

oracle-linux-image-tools/cloud/oci/provision.sh

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#
33
# Provisioning script for OCI
44
#
5-
# Copyright (c) 2020, 2024 Oracle and/or its affiliates.
5+
# Copyright (c) 2020, 2025 Oracle and/or its affiliates.
66
# Licensed under the Universal Permissive License v 1.0 as shown at
77
# https://oss.oracle.com/licenses/upl
88
#
@@ -26,18 +26,20 @@
2626
cloud::config()
2727
{
2828
common::echo_message "Setup network"
29-
# simple eth0 configuration
30-
cat > /etc/sysconfig/network-scripts/ifcfg-eth0 <<-EOF
31-
DEVICE="eth0"
32-
BOOTPROTO="dhcp"
33-
ONBOOT="yes"
34-
TYPE="Ethernet"
35-
USERCTL="yes"
36-
PEERDNS="yes"
37-
IPV6INIT="no"
38-
PERSISTENT_DHCLIENT="1"
39-
EOF
40-
29+
if [[ -d /etc/sysconfig/network-scripts ]]; then
30+
# simple eth0 configuration
31+
cat > /etc/sysconfig/network-scripts/ifcfg-eth0 <<-EOF
32+
DEVICE="eth0"
33+
BOOTPROTO="dhcp"
34+
ONBOOT="yes"
35+
TYPE="Ethernet"
36+
USERCTL="yes"
37+
PEERDNS="yes"
38+
IPV6INIT="no"
39+
PERSISTENT_DHCLIENT="1"
40+
EOF
41+
fi
42+
4143
if [[ "${OCI_REPO_MAPPER,,}" =~ "yes" ]]; then
4244
common::echo_message "Install repo mapper scripts"
4345
yum install -y "${YUM_VERBOSE}" jq

oracle-linux-image-tools/cloud/olvm/image-scripts.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ cloud::image_package() {
6969
-v "${BUILD_NUMBER}" \
7070
-s "${DISK_SIZE_GB}" \
7171
-i "${VM_NAME}.qcow2" \
72-
-c "${CPU_NUM}" \
72+
-c "${CPU_NUM%%,*}" \
7373
-m "${MEM_SIZE}" \
7474
>"${package_filename}.ovf"
7575

oracle-linux-image-tools/cloud/olvm/mk-envelope.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"""
44
Generate OLVM compatible OVF file.
55
6-
Copyright (c) 2020, 2022 Oracle and/or its affiliates.
6+
Copyright (c) 2020, 2025 Oracle and/or its affiliates.
77
Licensed under the Universal Permissive License v 1.0 as shown at
88
https://oss.oracle.com/licenses/upl
99
@@ -27,6 +27,7 @@
2727
'OL7': 5003,
2828
'OL8': 5006,
2929
'OL9': 5007,
30+
'OL10': 5007,
3031
}
3132

3233

oracle-linux-image-tools/cloud/olvm/provision.sh

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,18 @@ cloud::config()
2727
{
2828
common::echo_message "Setup network"
2929
# simple eth0 configuration
30-
cat > /etc/sysconfig/network-scripts/ifcfg-eth0 <<-EOF
31-
DEVICE="eth0"
32-
BOOTPROTO="dhcp"
33-
ONBOOT="yes"
34-
TYPE="Ethernet"
35-
USERCTL="yes"
36-
PEERDNS="yes"
37-
IPV6INIT="no"
38-
PERSISTENT_DHCLIENT="1"
39-
EOF
30+
if [[ -d /etc/sysconfig/network-scripts ]]; then
31+
cat > /etc/sysconfig/network-scripts/ifcfg-eth0 <<-EOF
32+
DEVICE="eth0"
33+
BOOTPROTO="dhcp"
34+
ONBOOT="yes"
35+
TYPE="Ethernet"
36+
USERCTL="yes"
37+
PEERDNS="yes"
38+
IPV6INIT="no"
39+
PERSISTENT_DHCLIENT="1"
40+
EOF
41+
fi
4042
}
4143

4244
#######################################

oracle-linux-image-tools/cloud/vagrant-libvirt/image-scripts.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ cloud::sysprep_args() {
6060
# None
6161
#######################################
6262
cloud::image_package() {
63-
local cpus="${VAGRANT_LIBVIRT_CPU_NUM:-$CPU_NUM}"
63+
local cpus="${VAGRANT_LIBVIRT_CPU_NUM:-${CPU_NUM%%,*}}"
6464
local memory="${VAGRANT_LIBVIRT_MEM_SIZE:-$MEM_SIZE}"
6565

6666
pushd "${WORKSPACE}/${VM_NAME}" || common::error "can't cd to image directory"

0 commit comments

Comments
 (0)