Last active
January 2, 2025 10:07
-
-
Save janeczku/864b863975db2b48fad7ae76f1912681 to your computer and use it in GitHub Desktop.
Preparing a SLE 15 SP7 template for use with Rancher and vSphere
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo "** installing required packages" | |
SUSEConnect -p sle-module-public-cloud/15.7/x86_64 | |
sudo zypper install cloud-init cloud-init-config-suse open-vm-tools open-iscsi | |
echo "** enabling services" | |
systemctl enable cloud-init-local.service | |
systemctl enable cloud-init.service | |
systemctl enable cloud-config.service | |
systemctl enable cloud-final.service | |
systemctl disable firewalld | |
systemctl daemon-reload | |
echo "** disabling swap" | |
swapoff -a | |
sed -i '/ swap / s/^\(.*\)$/#\1/g' /etc/fstab | |
echo "** reset machine settings" | |
sudo truncate -s 0 /etc/machine-id | |
sudo rm /var/lib/dbus/machine-id | |
sudo ln -s /etc/machine-id /var/lib/dbus/machine-id | |
sudo rm /var/lib/wicked/*.xml | |
cloud-init clean -s -l |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment