|
|
a8c580 |
From 0c86369274c23e6e5145bad7a5986d159ae99a27 Mon Sep 17 00:00:00 2001
|
|
|
a8c580 |
From: Matus Marhefka <mmarhefk@redhat.com>
|
|
|
a8c580 |
Date: Wed, 12 May 2021 08:45:07 +0200
|
|
|
a8c580 |
Subject: [PATCH 1/3] install_vm.py: add possibility to install GUI system
|
|
|
a8c580 |
|
|
|
a8c580 |
---
|
|
|
a8c580 |
tests/install_vm.py | 18 +++++++++++++++++-
|
|
|
a8c580 |
tests/kickstarts/test_suite.cfg | 18 ++++++++----------
|
|
|
a8c580 |
2 files changed, 25 insertions(+), 11 deletions(-)
|
|
|
a8c580 |
|
|
|
a8c580 |
diff --git a/tests/install_vm.py b/tests/install_vm.py
|
|
|
a8c580 |
index 3aea5fc4b69..22a1814dfd8 100755
|
|
|
a8c580 |
--- a/tests/install_vm.py
|
|
|
a8c580 |
+++ b/tests/install_vm.py
|
|
|
a8c580 |
@@ -94,6 +94,12 @@ def parse_args():
|
|
|
a8c580 |
choices=['secureboot', 'normal'],
|
|
|
a8c580 |
help="Perform UEFI based installation, optionally with secure boot support."
|
|
|
a8c580 |
)
|
|
|
a8c580 |
+ parser.add_argument(
|
|
|
a8c580 |
+ "--install-gui",
|
|
|
a8c580 |
+ dest="install_gui",
|
|
|
a8c580 |
+ action='store_true',
|
|
|
a8c580 |
+ help="Perform a GUI installation (default is installation without GUI)."
|
|
|
a8c580 |
+ )
|
|
|
a8c580 |
|
|
|
a8c580 |
return parser.parse_args()
|
|
|
a8c580 |
|
|
|
a8c580 |
@@ -156,6 +162,16 @@ def main():
|
|
|
a8c580 |
"part /boot --fstype=xfs --size=512",
|
|
|
a8c580 |
"part /boot --fstype=xfs --size=312\npart /boot/efi --fstype=efi --size=200"
|
|
|
a8c580 |
)
|
|
|
a8c580 |
+ if data.install_gui:
|
|
|
a8c580 |
+ gui_group="\n%packages\n@^graphical-server-environment\n"
|
|
|
a8c580 |
+ if data.distro == "fedora":
|
|
|
a8c580 |
+ gui_group="\n%packages\n@^Fedora Workstation\n"
|
|
|
a8c580 |
+ content = content.replace("\n%packages\n", gui_group)
|
|
|
a8c580 |
+ data.graphics_opt = "vnc"
|
|
|
a8c580 |
+ data.inst_opt = "inst.graphical"
|
|
|
a8c580 |
+ else:
|
|
|
a8c580 |
+ data.graphics_opt = "none"
|
|
|
a8c580 |
+ data.inst_opt = "inst.cmdline"
|
|
|
a8c580 |
outfile.write(content)
|
|
|
a8c580 |
data.kickstart = tmp_kickstart
|
|
|
a8c580 |
print("Using kickstart file: {0}".format(data.kickstart))
|
|
|
a8c580 |
@@ -169,7 +185,7 @@ def main():
|
|
|
a8c580 |
# The kernel option 'net.ifnames=0' is used to disable predictable network
|
|
|
a8c580 |
# interface names, for more details see:
|
|
|
a8c580 |
# https://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/
|
|
|
a8c580 |
- command = 'virt-install --connect={libvirt} --name={domain} --memory={ram} --vcpus={cpu} --network {network} --disk {disk_spec} --initrd-inject={kickstart} --extra-args="inst.ks=file:/{ks_basename} ksdevice=eth0 net.ifnames=0 console=ttyS0,115200" --serial pty --graphics=none --noautoconsole --rng /dev/random --wait=-1 --location={url}'.format(**data.__dict__)
|
|
|
a8c580 |
+ command = 'virt-install --connect={libvirt} --name={domain} --memory={ram} --vcpus={cpu} --network {network} --disk {disk_spec} --initrd-inject={kickstart} --extra-args="inst.ks=file:/{ks_basename} {inst_opt} ksdevice=eth0 net.ifnames=0 console=ttyS0,115200" --serial pty --graphics={graphics_opt} --noautoconsole --rng /dev/random --wait=-1 --location={url}'.format(**data.__dict__)
|
|
|
a8c580 |
if data.uefi == "normal":
|
|
|
a8c580 |
command = command+" --boot uefi"
|
|
|
a8c580 |
if data.uefi == "secureboot":
|
|
|
a8c580 |
diff --git a/tests/kickstarts/test_suite.cfg b/tests/kickstarts/test_suite.cfg
|
|
|
a8c580 |
index 2ee59cee073..d8a2344633b 100644
|
|
|
a8c580 |
--- a/tests/kickstarts/test_suite.cfg
|
|
|
a8c580 |
+++ b/tests/kickstarts/test_suite.cfg
|
|
|
a8c580 |
@@ -12,8 +12,6 @@
|
|
|
a8c580 |
|
|
|
a8c580 |
# Install a fresh new system (optional)
|
|
|
a8c580 |
install
|
|
|
a8c580 |
-skipx
|
|
|
a8c580 |
-text
|
|
|
a8c580 |
|
|
|
a8c580 |
# To enable custom repositories for the machine after installation use:
|
|
|
a8c580 |
#repo --name=myrepo --baseurl=http://...
|
|
|
a8c580 |
@@ -86,21 +84,21 @@ part pv.01 --grow --size=1
|
|
|
a8c580 |
volgroup VolGroup --pesize=4096 pv.01
|
|
|
a8c580 |
|
|
|
a8c580 |
# Create particular logical volumes (optional)
|
|
|
a8c580 |
-logvol / --fstype=xfs --name=root --vgname=VolGroup --size=8192 --grow
|
|
|
a8c580 |
+logvol / --fstype=xfs --name=LogVol06 --vgname=VolGroup --size=3192 --grow
|
|
|
a8c580 |
+# Ensure /usr Located On Separate Partition
|
|
|
a8c580 |
+logvol /usr --fstype=xfs --name=LogVol08 --vgname=VolGroup --size=5000 --fsoptions="nodev"
|
|
|
a8c580 |
+# Ensure /opt Located On Separate Partition
|
|
|
a8c580 |
+logvol /opt --fstype=xfs --name=LogVol09 --vgname=VolGroup --size=1024 --fsoptions="nodev,nosuid"
|
|
|
a8c580 |
+# Ensure /srv Located On Separate Partition
|
|
|
a8c580 |
+logvol /srv --fstype=xfs --name=LogVol10 --vgname=VolGroup --size=1024 --fsoptions="nodev,nosuid"
|
|
|
a8c580 |
# Ensure /home Located On Separate Partition
|
|
|
a8c580 |
logvol /home --fstype=xfs --name=home --vgname=VolGroup --size=1024 --fsoptions="nodev"
|
|
|
a8c580 |
-# Ensure /usr Located On Separate Partition
|
|
|
a8c580 |
-logvol /usr --fstype=xfs --name=usr --vgname=VolGroup --size=2048 --fsoptions="nodev"
|
|
|
a8c580 |
# Ensure /tmp Located On Separate Partition
|
|
|
a8c580 |
logvol /tmp --fstype=xfs --name=tmp --vgname=VolGroup --size=1024 --fsoptions="nodev,nosuid,noexec"
|
|
|
a8c580 |
-# Ensure /opt Located On Separate Partition
|
|
|
a8c580 |
-logvol /opt --fstype=xfs --name=opt --vgname=VolGroup --size=512 --fsoptions="nodev,nosuid"
|
|
|
a8c580 |
-# Ensure /srv Located On Separate Partition
|
|
|
a8c580 |
-logvol /srv --fstype=xfs --name=srv --vgname=VolGroup --size=512 --fsoptions="nodev,nosuid"
|
|
|
a8c580 |
# Ensure /var/tmp Located On Separate Partition
|
|
|
a8c580 |
logvol /var/tmp --fstype=xfs --name=vartmp --vgname=VolGroup --size=1024 --fsoptions="nodev,nosuid,noexec"
|
|
|
a8c580 |
# Ensure /var Located On Separate Partition
|
|
|
a8c580 |
-logvol /var --fstype=xfs --name=var --vgname=VolGroup --size=2048 --fsoptions="nodev"
|
|
|
a8c580 |
+logvol /var --fstype=xfs --name=var --vgname=VolGroup --size=3072 --fsoptions="nodev"
|
|
|
a8c580 |
# Ensure /var/log Located On Separate Partition
|
|
|
a8c580 |
logvol /var/log --fstype=xfs --name=log --vgname=VolGroup --size=1024 --fsoptions="nodev,nosuid,noexec"
|
|
|
a8c580 |
# Ensure /var/log/audit Located On Separate Partition
|
|
|
a8c580 |
|
|
|
a8c580 |
From cb825b2a47ad83ca556389e48d3f30b3cb6ed086 Mon Sep 17 00:00:00 2001
|
|
|
a8c580 |
From: Matus Marhefka <mmarhefk@redhat.com>
|
|
|
a8c580 |
Date: Wed, 12 May 2021 09:49:38 +0200
|
|
|
a8c580 |
Subject: [PATCH 2/3] install_vm.py: switch to Fedora 34 by default
|
|
|
a8c580 |
|
|
|
a8c580 |
Also updated kickstart file as `install` command
|
|
|
a8c580 |
has been deprecated in Fedora 34:
|
|
|
a8c580 |
https://docs.fedoraproject.org/my/fedora/f34/release-notes/sysadmin/Installation/#sect-kickstart-deprecated-removed
|
|
|
a8c580 |
---
|
|
|
a8c580 |
tests/install_vm.py | 2 +-
|
|
|
a8c580 |
tests/kickstarts/test_suite.cfg | 3 ---
|
|
|
a8c580 |
2 files changed, 1 insertion(+), 4 deletions(-)
|
|
|
a8c580 |
|
|
|
a8c580 |
diff --git a/tests/install_vm.py b/tests/install_vm.py
|
|
|
a8c580 |
index 22a1814dfd8..ac15260b862 100755
|
|
|
a8c580 |
--- a/tests/install_vm.py
|
|
|
a8c580 |
+++ b/tests/install_vm.py
|
|
|
a8c580 |
@@ -115,7 +115,7 @@ def main():
|
|
|
a8c580 |
|
|
|
a8c580 |
if not data.url:
|
|
|
a8c580 |
if data.distro == "fedora":
|
|
|
a8c580 |
- data.url = "https://download.fedoraproject.org/pub/fedora/linux/releases/31/Everything/x86_64/os"
|
|
|
a8c580 |
+ data.url = "https://download.fedoraproject.org/pub/fedora/linux/releases/34/Everything/x86_64/os"
|
|
|
a8c580 |
elif data.distro == "centos7":
|
|
|
a8c580 |
data.url = "http://mirror.centos.org/centos/7/os/x86_64"
|
|
|
a8c580 |
if not data.url:
|
|
|
a8c580 |
diff --git a/tests/kickstarts/test_suite.cfg b/tests/kickstarts/test_suite.cfg
|
|
|
a8c580 |
index d8a2344633b..13b2f629ed6 100644
|
|
|
a8c580 |
--- a/tests/kickstarts/test_suite.cfg
|
|
|
a8c580 |
+++ b/tests/kickstarts/test_suite.cfg
|
|
|
a8c580 |
@@ -10,9 +10,6 @@
|
|
|
a8c580 |
# https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Installation_Guide/sect-kickstart-syntax.html
|
|
|
a8c580 |
# http://usgcb.nist.gov/usgcb/content/configuration/workstation-ks.cfg
|
|
|
a8c580 |
|
|
|
a8c580 |
-# Install a fresh new system (optional)
|
|
|
a8c580 |
-install
|
|
|
a8c580 |
-
|
|
|
a8c580 |
# To enable custom repositories for the machine after installation use:
|
|
|
a8c580 |
#repo --name=myrepo --baseurl=http://...
|
|
|
a8c580 |
&&YUM_EXTRA_REPO&&
|
|
|
a8c580 |
|
|
|
a8c580 |
From 8e85dd8c2c7cbcd36a68c8f1d0c4fe2eee43b541 Mon Sep 17 00:00:00 2001
|
|
|
a8c580 |
From: Matus Marhefka <mmarhefk@redhat.com>
|
|
|
a8c580 |
Date: Wed, 12 May 2021 11:09:29 +0200
|
|
|
a8c580 |
Subject: [PATCH 3/3] Increase /usr size in SSGTS kickstart to be able to
|
|
|
a8c580 |
install F34 with GUI
|
|
|
a8c580 |
|
|
|
a8c580 |
---
|
|
|
a8c580 |
tests/kickstarts/test_suite.cfg | 4 ++--
|
|
|
a8c580 |
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
a8c580 |
|
|
|
a8c580 |
diff --git a/tests/kickstarts/test_suite.cfg b/tests/kickstarts/test_suite.cfg
|
|
|
a8c580 |
index 13b2f629ed6..3c3300ef46d 100644
|
|
|
a8c580 |
--- a/tests/kickstarts/test_suite.cfg
|
|
|
a8c580 |
+++ b/tests/kickstarts/test_suite.cfg
|
|
|
a8c580 |
@@ -83,11 +83,11 @@ volgroup VolGroup --pesize=4096 pv.01
|
|
|
a8c580 |
# Create particular logical volumes (optional)
|
|
|
a8c580 |
logvol / --fstype=xfs --name=LogVol06 --vgname=VolGroup --size=3192 --grow
|
|
|
a8c580 |
# Ensure /usr Located On Separate Partition
|
|
|
a8c580 |
-logvol /usr --fstype=xfs --name=LogVol08 --vgname=VolGroup --size=5000 --fsoptions="nodev"
|
|
|
a8c580 |
+logvol /usr --fstype=xfs --name=LogVol08 --vgname=VolGroup --size=5512 --fsoptions="nodev"
|
|
|
a8c580 |
# Ensure /opt Located On Separate Partition
|
|
|
a8c580 |
logvol /opt --fstype=xfs --name=LogVol09 --vgname=VolGroup --size=1024 --fsoptions="nodev,nosuid"
|
|
|
a8c580 |
# Ensure /srv Located On Separate Partition
|
|
|
a8c580 |
-logvol /srv --fstype=xfs --name=LogVol10 --vgname=VolGroup --size=1024 --fsoptions="nodev,nosuid"
|
|
|
a8c580 |
+logvol /srv --fstype=xfs --name=LogVol10 --vgname=VolGroup --size=512 --fsoptions="nodev,nosuid"
|
|
|
a8c580 |
# Ensure /home Located On Separate Partition
|
|
|
a8c580 |
logvol /home --fstype=xfs --name=home --vgname=VolGroup --size=1024 --fsoptions="nodev"
|
|
|
a8c580 |
# Ensure /tmp Located On Separate Partition
|