Fix PVE/OC image

This commit is contained in:
Gabriel Luchina 2024-10-25 10:37:39 -03:00
parent 2438ded161
commit d14a6ca5c6
3 changed files with 5 additions and 5 deletions

Binary file not shown.

8
setup
View File

@ -48,7 +48,7 @@ SCRIPT_DIR=/root/OSX-PROXMOX
LOGDIR=${SCRIPT_DIR}/logs LOGDIR=${SCRIPT_DIR}/logs
TMPDIR=${SCRIPT_DIR}/tmp TMPDIR=${SCRIPT_DIR}/tmp
ISODIR=/var/lib/vz/template/iso/ ISODIR=/var/lib/vz/template/iso/
HACKPXVERSION="20240313T1034" HACKPXVERSION="20241025T1034"
OCVERSION="1.0.2" OCVERSION="1.0.2"
DEFAULT_VM_PREFIX="HACK-" DEFAULT_VM_PREFIX="HACK-"
DEFAULT_RAM_SIZE=4096 DEFAULT_RAM_SIZE=4096
@ -1603,7 +1603,7 @@ do
if [ ! -e ${ISODIR}/recovery-sequoia.iso ] if [ ! -e ${ISODIR}/recovery-sequoia.iso ]
then then
fallocate -l 920M ${TMPDIR}/recovery-sequoia.iso > ${LOGFILE} 2>> ${LOGFILE} fallocate -l 1450M ${TMPDIR}/recovery-sequoia.iso > ${LOGFILE} 2>> ${LOGFILE}
mkfs.msdos -F 32 ${TMPDIR}/recovery-sequoia.iso -n SEQUOIA >> ${LOGFILE} 2>> ${LOGFILE} mkfs.msdos -F 32 ${TMPDIR}/recovery-sequoia.iso -n SEQUOIA >> ${LOGFILE} 2>> ${LOGFILE}
LOOPDEV=`losetup -f --show ${TMPDIR}/recovery-sequoia.iso 2>> ${LOGFILE}` LOOPDEV=`losetup -f --show ${TMPDIR}/recovery-sequoia.iso 2>> ${LOGFILE}`
mkdir -p /mnt/APPLE >> ${LOGFILE} 2>> ${LOGFILE} mkdir -p /mnt/APPLE >> ${LOGFILE} 2>> ${LOGFILE}
@ -1664,7 +1664,7 @@ do
--scsihw virtio-scsi-pci \ --scsihw virtio-scsi-pci \
--virtio0 ${STORAGECRTVM}:${SIZEDISK},cache=none,discard=on \ --virtio0 ${STORAGECRTVM}:${SIZEDISK},cache=none,discard=on \
--ide0 local:iso/opencore-osx-proxmox-vm.iso,cache=unsafe,size=80M \ --ide0 local:iso/opencore-osx-proxmox-vm.iso,cache=unsafe,size=80M \
--ide2 local:iso/recovery-sequoia.iso,cache=unsafe,size=800M > ${LOGFILE} 2>> ${LOGFILE} --ide2 local:iso/recovery-sequoia.iso,cache=unsafe,size=1450M > ${LOGFILE} 2>> ${LOGFILE}
## Fix for QEMU 6.1 for PCI Passthrough ## Fix for QEMU 6.1 for PCI Passthrough
if [ `qemu-system-x86_64 --version | grep -e "6.1" -e "6.2" -e "7.1" -e "7.2" -e "8.0" -e "8.1" -e "9.0.2" | wc -l` -eq 1 ] if [ `qemu-system-x86_64 --version | grep -e "6.1" -e "6.2" -e "7.1" -e "7.2" -e "8.0" -e "8.1" -e "9.0.2" | wc -l` -eq 1 ]
@ -1704,7 +1704,7 @@ do
--scsihw virtio-scsi-pci \ --scsihw virtio-scsi-pci \
--virtio0 ${STORAGECRTVM}:${SIZEDISK},cache=none,discard=on \ --virtio0 ${STORAGECRTVM}:${SIZEDISK},cache=none,discard=on \
--ide0 local:iso/opencore-osx-proxmox-vm.iso,cache=unsafe,size=80M \ --ide0 local:iso/opencore-osx-proxmox-vm.iso,cache=unsafe,size=80M \
--ide2 local:iso/recovery-seqquoia.iso,cache=unsafe,size=800M > ${LOGFILE} 2>> ${LOGFILE} --ide2 local:iso/recovery-seqquoia.iso,cache=unsafe,size=1450M > ${LOGFILE} 2>> ${LOGFILE}
## Fix for QEMU 6.1 for PCI Passthrough ## Fix for QEMU 6.1 for PCI Passthrough
if [ `qemu-system-x86_64 --version | grep -e "6.1" -e "6.2" -e "7.1" -e "7.2" -e "8.0" -e "8.1" -e "9.0.2" | wc -l` -eq 1 ] if [ `qemu-system-x86_64 --version | grep -e "6.1" -e "6.2" -e "7.1" -e "7.2" -e "8.0" -e "8.1" -e "9.0.2" | wc -l` -eq 1 ]

View File

@ -24,7 +24,7 @@ echo " "
## Core ## Core
cd ${TEMPDIR} > /dev/null 2> /dev/null cd ${TEMPDIR} > /dev/null 2> /dev/null
rm -rf macOS-install* > /dev/null 2> /dev/null rm -rf macOS-install* > /dev/null 2> /dev/null
hdiutil create -o macOS-install -size 15.2g -layout GPTSPUD -fs HFS+J > /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 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 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/Install macOS"* > /dev/null 2> /dev/null && sleep 3s > /dev/null 2> /dev/null