Refactored the code to make it more maintainable.

- Redid the code for the cloud to be able to specify subnets, with the default based on bridge number. It now adds a bridge every time you run it.

- The creating if the VM now prompts you for a bridge to select if there is more than one, and prompts you to select storage if there is more than 1

- The No Subcriber nag removal will now last through Proxmox updates
This commit is contained in:
jaminmc
2025-06-27 23:48:14 -04:00
parent f5bcd709ac
commit 8c72476379
6 changed files with 1021 additions and 2092 deletions

View File

@@ -1,16 +1,20 @@
#!/bin/bash
#
# Script: check-iommu-enabled.sh
# Goal: Check if IOMMU are Enabled in your system
# Goal: Check if IOMMU is enabled on your system
#
# Author: Gabriel Luchina
# https://luchina.com.br
# 20220128T1112
if [ `dmesg | grep -e DMAR -e IOMMU | wc -l` -gt 0 ]
then
# Check for IOMMU or DMAR messages in dmesg
iommu_check=$(dmesg | grep -E 'DMAR|IOMMU')
if [ -n "$iommu_check" ]; then
echo "IOMMU Enabled"
else
echo "IOMMU NOT Enabled"
echo "Check file /etc/default/grub contains 'intel_iommu=on' in 'GRUB_CMDLINE_LINUX_DEFAULT' line"
echo "Ensure 'intel_iommu=on' or 'amd_iommu=on' is present in the 'GRUB_CMDLINE_LINUX_DEFAULT' line of /etc/default/grub"
exit 1
fi

View File

@@ -7,6 +7,8 @@
# https://luchina.com.br
# 20211116T2245
set -e
clear
echo -e "\nAutomate script for create \"ISO\" file of macOS Install in Proxmox VE Environament"
@@ -14,21 +16,27 @@ echo -e "BY: https://luchina.com.br"
echo -e "SUPPORT: https://osx-proxmox.com"
echo -n -e "\nPath to temporary files (work dir): "
read TEMPDIR
read -r TEMPDIR
echo -n -e "Path to macOS Installation (.app) file: "
read APPOSX
read -r APPOSX
echo " "
## Core
cd ${TEMPDIR} > /dev/null 2> /dev/null
rm -rf macOS-install* > /dev/null 2> /dev/null
hdiutil create -o macOS-install -size 16g -layout GPTSPUD -fs HFS+J > /dev/null 2> /dev/null
hdiutil attach -noverify -mountpoint /Volumes/install_build macOS-install.dmg > /dev/null 2> /dev/null
sudo "${APPOSX}/Contents/Resources/createinstallmedia" --volume /Volumes/install_build --nointeraction
hdiutil detach -force "/Volumes/Install macOS"* > /dev/null 2> /dev/null && sleep 3s > /dev/null 2> /dev/null
hdiutil detach -force "/Volumes/Shared Support"* > /dev/null 2> /dev/null
mv macOS-install.dmg macOS-install.iso > /dev/null 2> /dev/null
if [ -d "$TEMPDIR" ]; then
cd "$TEMPDIR" || exit 1
rm -rf macOS-install* > /dev/null 2> /dev/null
hdiutil create -o macOS-install -size 16g -layout GPTSPUD -fs HFS+J > /dev/null 2> /dev/null
hdiutil attach -noverify -mountpoint /Volumes/install_build macOS-install.dmg > /dev/null 2> /dev/null
sudo "${APPOSX}/Contents/Resources/createinstallmedia" --volume /Volumes/install_build --nointeraction
hdiutil detach -force "/Volumes/Install macOS"* > /dev/null 2> /dev/null && sleep 3s > /dev/null 2> /dev/null
hdiutil detach -force "/Volumes/Shared Support"* > /dev/null 2> /dev/null
mv macOS-install.dmg macOS-install.iso > /dev/null 2> /dev/null
else
echo "The temporary directory does not exist!"
exit 1
fi
echo " "

View File

@@ -5,15 +5,15 @@
#
# Author: Gabriel Luchina
# https://luchina.com.br
# 20211118T0010
# 20250627T2331
#!/bin/bash
shopt -s nullglob
for group in `ls /sys/kernel/iommu_groups/ | sort -V`
do
echo "IOMMU Group ${group##*/}:"
for device in /sys/kernel/iommu_groups/$group/devices/*
do
echo -e "\t$(lspci -nns ${device##*/})"
for iommu_group in $(ls /sys/kernel/iommu_groups/ | sort -V); do
echo "IOMMU Group ${iommu_group}:"
for pci_device in /sys/kernel/iommu_groups/$iommu_group/devices/*; do
echo -e "\t$(lspci -nns ${pci_device##*/})"
done
done