apiVersion: v1
kind: ConfigMap
metadata:
name: {{ template "docker-osx.fullname" . }}-boot-components
data:
config.plist: |-
ACPIAddCommentadd DTGP methodEnabledPathSSDT-DTGP.amlCommentFake EC and USBX PowerEnĂ¥abledPathSSDT-EC.amlCommentUSB 2.0 InjectionEnabledPathSSDT-EHCI.amlCommentCPU AGPM Plugin=1EnabledPathSSDT-PLUG.amlDeleteAllCommentDelete CpuPmEnabledOemTableId
Q3B1UG0AAAA=
TableLength0TableSignature
U1NEVA==
AllCommentDelete Cpu0IstEnabledOemTableId
Q3B1MElzdAA=
TableLength0TableSignature
U1NEVA==
PatchComment_Q11 to XQ11Count1EnabledFind
X1ExMQ==
Limit0MaskOemTableIdReplace
WFExMQ==
ReplaceMaskSkip0TableLength0TableSignatureComment_Q12 to XQ12Count1EnabledFind
X1ExMg==
Limit0MaskOemTableIdReplace
WFExMg==
ReplaceMaskSkip0TableLength0TableSignatureQuirksFadtEnableResetNormalizeHeadersRebaseRegionsResetHwSigResetLogoStatusBooterMmioWhitelistQuirksAvoidRuntimeDefragDevirtualiseMmioDisableSingleUserDisableVariableWriteDiscardHibernateMapEnableSafeModeSlideEnableWriteUnprotectorForceExitBootServicesProtectMemoryRegionsProtectSecureBootProtectUefiServicesProvideCustomSlideProvideMaxSlide0RebuildAppleMemoryMapSetupVirtualMapSignalAppleOSSyncRuntimePermissionsDevicePropertiesAddPciRoot(0x1)/Pci(0x1F,0x0)compatiblepci8086,2916device-id
FikA
namepci8086,2916DeletePciRoot(0x0)/Pci(0x1b,0x0)MaximumBootBeepVolumeKernelAddArchx86_64BundlePathVoodooHDA.kextCommentPatch engineEnabledExecutablePathContents/MacOS/VoodooHDAMaxKernelMinKernel12.0.0PlistPathContents/Info.plistArchx86_64BundlePathLilu.kextCommentPatch engineEnabledExecutablePathContents/MacOS/LiluMaxKernelMinKernel12.0.0PlistPathContents/Info.plistArchx86_64BundlePathVirtualSMC.kextCommentSMC emulatorEnabledExecutablePathContents/MacOS/VirtualSMCMaxKernelMinKernel12.0.0PlistPathContents/Info.plistArchx86_64BundlePathWhateverGreen.kextCommentVideo patchesEnabledExecutablePathContents/MacOS/WhateverGreenMaxKernelMinKernel12.0.0PlistPathContents/Info.plistArchx86_64BundlePathAppleALC.kextCommentAudio patchesEnabledExecutablePathContents/MacOS/AppleALCMaxKernelMinKernel12.0.0PlistPathContents/Info.plistBundlePathAGPMInjector.kextCommentEnabledExecutablePathMaxKernelMinKernelPlistPathContents/Info.plistBundlePathUSBPorts.kextCommentEnabledExecutablePathMaxKernelMinKernelPlistPathContents/Info.plistArchx86_64BundlePathMCEReporterDisabler.kextCommentAppleMCEReporter disablerEnabledExecutablePathMaxKernelMinKernel19.0.0PlistPathContents/Info.plistBlockArchAnyCommentEnabledIdentifiercom.apple.driver.AppleTyMCEDriverMaxKernelMinKernelEmulateCpuid1Data
VAYFAAAAAAAAAAAAAAAAAA==
Cpuid1Mask
////AAAAAAAAAAAAAAAAAA==
ForceArchAnyBundlePathSystem/Library/Extensions/IONetworkingFamily.kextCommentPatch engineEnabledIdentifiercom.apple.iokit.IONetworkingFamilyExecutablePathContents/MacOS/IONetworkingFamilyMaxKernel13.99.99MinKernelPlistPathContents/Info.plistPatchBase_cpu_topology_sortCommentalgrey - cpu_topology_sort -disable _x86_validate_topologyCount1EnabledFind
6AAA//8=
IdentifierkernelLimit0Mask
/wAA//8=
MaxKernel20.99.99MinKernel17.0.0Replace
Dx9EAAA=
ReplaceMaskSkip0BaseCommentalgrey - cpuid_set_cpufamily - force CPUFAMILY_INTEL_PENRYNCount1EnabledFind
MduAPQAAAAAGdQA=
IdentifierkernelLimit0Mask
/////wAAAP///wA=
MaxKernel20.99.99MinKernel17.0.0Replace
u7xP6njpXQAAAJA=
ReplaceMaskSkip0QuirksAppleCpuPmCfgLockAppleXcpmCfgLockAppleXcpmExtraMsrsAppleXcpmForceBoostCustomSMBIOSGuidDisableIoMapperDisableLinkeditJettisonDisableRtcChecksumDummyPowerManagementExternalDiskIconsIncreasePciBarSizeLapicKernelPanicPanicNoKextDumpPowerTimeoutKernelPanicThirdPartyDrivesXhciPortLimitSchemeFuzzyMatchKernelArchx86_64KernelCacheAutoMiscBlessOverrideBootConsoleAttributes0HibernateModeAutoHideAuxiliaryPickerAttributes1PickerAudioAssistPickerModeExternalPollAppleHotKeysShowPickerTakeoffDelay0Timeout0DebugAppleDebugApplePanicDisableWatchDogDisplayDelay0DisplayLevel2147483650SerialInitSysReportTarget3EntriesSecurityAllowNvramResetAllowSetDefaultApECID0AuthRestartBootProtectNoneDmgLoadingSignedEnablePasswordExposeSensitiveData6HaltLevel2147483648PasswordHashPasswordSaltScanPolicy0SecureBootModelDisabledVaultOptionalToolsArgumentsAuxiliaryCommentNot signed for security reasonsEnabledNameUEFI ShellPathOpenShell.efiArgumentsShutdownAuxiliaryCommentPerform shutdownEnabledNameShutdownPathResetSystem.efiNVRAMAdd4D1EDE05-38C7-4A6A-9CC6-4BCCA8B38C14DefaultBackgroundColor
AAAAAA==
UIScale
AQ==
4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102rtc-blacklist7C436110-AB2A-4BBB-A880-FE41995C9F82SystemAudioVolume
Rg==
boot-args-v keepsyms=1 tlbto_us=0 vti=9run-efi-updaterNocsr-active-config
ZwAAAA==
prev-lang:kbd
ZW4tVVM6MA==
Delete4D1EDE05-38C7-4A6A-9CC6-4BCCA8B38C14UIScaleDefaultBackgroundColor4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102rtc-blacklist7C436110-AB2A-4BBB-A880-FE41995C9F82boot-argsLegacyEnableLegacyOverwriteLegacySchema7C436110-AB2A-4BBB-A880-FE41995C9F82EFILoginHiDPIEFIBluetoothDelayLocationServicesEnabledSystemAudioVolumeSystemAudioVolumeDBSystemAudioVolumeSavedbluetoothActiveControllerInfobluetoothInternalControllerInfoflagstatefmm-computer-namenvda_drvprev-lang:kbd8BE4DF61-93CA-11D2-AA0D-00E098032B8CBoot0080Boot0081Boot0082BootNextBootOrderWriteFlashPlatformInfoAutomaticGenericAdviseWindowsMLB{{ .Values.configPlist.MLB }}ROM
m7zhIYfl
SpoofVendorSystemProductName{{ .Values.configPlist.SystemProductName }}SystemSerialNumber{{ .Values.configPlist.SystemSerialNumber }}SystemUUID{{ .Values.configPlist.SystemUUID }}UpdateDataHubUpdateNVRAMUpdateSMBIOSUpdateSMBIOSModeCreateUEFIAPFSEnableJumpstartGlobalConnectHideVerboseJumpstartHotPlugMinDate-1MinVersion-1AudioAudioCodec0AudioDevicePciRoot(0x1)/Pci(0x1,0x0)/Pci(0x0,0x1)AudioOut0AudioSupportMinimumVolume20PlayChimeVolumeAmplifier0ConnectDriversDriversVBoxHfs.efiOpenRuntime.efiOpenCanopy.efi#AudioDxe.efi#OpenUsbKbDxe.efi#UsbMouseDxe.efi#Ps2KeyboardDxe.efi#Ps2MouseDxe.efi#HiiDatabase.efi#NvmExpressDxe.efi#XhciDxe.efi#ExFatDxe.efi#PartitionDxe.efi#CrScreenshotDxe.efiInputKeyFilteringKeyForgetThreshold5KeyMergeThreshold2KeySupportKeySupportModeAutoKeySwapPointerSupportPointerSupportModeASUSTimerResolution50000OutputClearScreenOnModeSwitchConsoleModeDirectGopRenderingIgnoreTextInGraphicsProvideConsoleGopReconnectOnResChangeReplaceTabWithSpaceResolution1920x1080@32SanitiseClearScreenTextRendererBuiltinGraphicsUgaPassThroughProtocolOverridesAppleAudioAppleBootPolicyAppleDebugLogAppleEventAppleFramebufferInfoAppleImageConversionAppleImg4VerificationAppleKeyMapAppleRtcRamAppleSecureBootAppleSmcIoAppleUserInterfaceThemeDataHubDevicePropertiesFirmwareVolumeHashServicesOSInfoUnicodeCollationQuirksDeduplicateBootOrderExitBootServicesDelay0IgnoreInvalidFlexRatioReleaseUsbOwnershipRequestBootVarRoutingTscSyncTimeout0UnblockFsConnect
macOS-libvirt-Catalina.xml: |-
macOS2aca0dd6-cec9-4717-9ab2-0b7b13d111c3macOS{{ .Values.resources.requests.memory | trimSuffix "Mi" }}{{ .Values.resources.requests.memory | trimSuffix "Mi" }}{{ .Values.resources.requests.cpu }}hvm/home/CHANGEME/OSX-KVM/OVMF_CODE.fd/home/CHANGEME/OSX-KVM/OVMF_VARS-1024x768.fddestroyrestartrestart/usr/bin/qemu-system-x86_64
Launch_custom.sh: |-
#/bin/sh
if ! [ -d "/system_image/installers" ]; then
mkdir -p /system_image/installers
fi
if ! [ -d "/system_image/{{ .Values.serverName }}" ]; then
mkdir -p "/system_image/{{ .Values.serverName }}"
fi
# Download and build installer image if no system drive found..
if ! [ -f "/system_image/installers/BaseSystem{{ .Values.qemu.systemInstaller.version }}.img" ]; then
echo "Downloading {{ .Values.qemu.systemInstaller.version }} base image.."
python fetch-macOS.py --version {{ .Values.qemu.systemInstaller.version }}
echo 'Converting downloaded BaseSystem.dmg into BaseSystem.img'
qemu-img convert BaseSystem.dmg -O qcow2 -p -c /system_image/installers/BaseSystem{{ .Values.qemu.systemInstaller.version }}.img
rm -f BaseSystem.dmg
else
echo 'Base Image downloaded and converted into img already..'
fi
if ! [ -f "/system_image/{{ .Values.serverName }}/mac_hdd_ng.img" ]; then
echo "Creating a {{ .Values.qemu.diskSize }} /system_image/{{ .Values.serverName }}/mac_hdd_ng.img for system partition.."
qemu-img create -f qcow2 /system_image/{{ .Values.serverName }}/mac_hdd_ng.img "{{ .Values.qemu.diskSize }}"
echo 'Finished creating system partition!'
else
echo 'Image already created. Skipping creation..'
fi
# Start VNC..
sudo rm -f /tmp/.X99-lock
export DISPLAY=:99
vncpasswd -f < vncpasswd_file > ${HOME}/.vnc/passwd
/usr/bin/Xvnc -geometry 1920x1080 -rfbauth "${HOME}/.vnc/passwd" :99 &\
{{- if .Values.qemu.gpu.enabled }}
ulimit -l $(( 8*1048576+100000 ))
user hard memlock $(( 8*1048576+100000 ))
user soft memlock $(( 8*1048576+100000 ))
{{- end }}
# Start QEMU..
set -eu
sudo chown $(id -u):$(id -g) /dev/kvm 2>/dev/null || true
sudo chown -R $(id -u):$(id -g) /dev/snd 2>/dev/null || true
exec qemu-system-x86_64 -m {{ .Values.resources.requests.memory | trimSuffix "i" }} \
-cpu {{ .Values.qemu.cpu }} \
-machine q35,accel=kvm:tcg \
{{- if .Values.qemu.gpu.enabled }}
-vga none \
-device pcie-root-port,bus=pcie.0,multifunction=on,port=1,chassis=1,id=port.1 \
-device vfio-pci,host={{ .Values.qemu.gpu.hardwareId }}.0,multifunction=on,x-vga=on,rombar=1 \
-device vfio-pci,host={{ .Values.qemu.gpu.hardwareId }}.1,bus=port.1 \
-display none \
{{- else -}}
-vga {{ .Values.qemu.softwareGpu }} \
{{- end }}
-smp {{ .Values.resources.requests.cpu }},cores={{ .Values.resources.requests.cpu }} \
-usb -device usb-kbd -device usb-tablet \
-device isa-applesmc,osk=ourhardworkbythesewordsguardedpleasedontsteal\(c\)AppleComputerInc \
-drive if=pflash,format=raw,readonly,file=/home/arch/OSX-KVM/OVMF_CODE.fd \
-drive if=pflash,format=raw,file=/home/arch/OSX-KVM/OVMF_VARS-1024x768.fd \
-smbios type=2 \
{{- if .Values.qemu.audio.enabled }}
-audiodev {{ .Values.qemu.audo.driver }},id=hda -device ich9-intel-hda -device hda-duplex,audiodev=hda \ \
{{- end }}
-device ich9-ahci,id=sata \
-drive id=OpenCoreBoot,if=none,snapshot=on,format=qcow2,file=/home/arch/OSX-KVM/OpenCore-Catalina/OpenCore.qcow2 \
-device ide-hd,bus=sata.2,drive=OpenCoreBoot \
-device ide-hd,bus=sata.3,drive=InstallMedia \
-drive id=InstallMedia,if=none,file=/system_image/installers/BaseSystem{{ .Values.qemu.systemInstaller.version }}.img,format=qcow2 \
-drive id=MacHDD,if=none,file=/system_image/{{ .Values.serverName }}/mac_hdd_ng.img,format=qcow2 \
-device ide-hd,bus=sata.4,drive=MacHDD \
-netdev user,id=net0,hostfwd=tcp::${INTERNAL_SSH_PORT:-10022}-:22,hostfwd=tcp::${SCREEN_SHARE_PORT:-5900}-:5900,{{ .Values.qemu.netdev.extraArgs }} -device e1000-82545em,netdev=net0,id=net0,mac=52:54:00:09:49:17 \
-monitor stdio \
${EXTRA:-}
vncpasswd_file: |-
{{ .Values.vnc.password }}
limits.conf: |-
#This file sets the resource limits for the users logged in via PAM.
#It does not affect resource limits of the system services.
#
#Also note that configuration files in /etc/security/limits.d directory,
#which are read in alphabetical order, override the settings in this
#file in case the domain is the same or more specific.
#That means, for example, that setting a limit for wildcard domain here
#can be overriden with a wildcard setting in a config file in the
#subdirectory, but a user specific setting here can be overriden only
#with a user specific setting in the subdirectory.
#
#Each line describes a limit for a user in the form:
#
#
#
#Where:
# can be:
# - a user name
# - a group name, with @group syntax
# - the wildcard *, for default entry
# - the wildcard %, can be also used with %group syntax,
# for maxlogin limit
#
# can have the two values:
# - "soft" for enforcing the soft limits
# - "hard" for enforcing hard limits
#
# can be one of the following:
# - core - limits the core file size (KB)
# - data - max data size (KB)
# - fsize - maximum filesize (KB)
# - memlock - max locked-in-memory address space (KB)
# - nofile - max number of open file descriptors
# - rss - max resident set size (KB)
# - stack - max stack size (KB)
# - cpu - max CPU time (MIN)
# - nproc - max number of processes
# - as - address space limit (KB)
# - maxlogins - max number of logins for this user
# - maxsyslogins - max number of logins on the system
# - priority - the priority to run user process with
# - locks - max number of file locks the user can hold
# - sigpending - max number of pending signals
# - msgqueue - max memory used by POSIX message queues (bytes)
# - nice - max nice priority allowed to raise to values: [-20, 19]
# - rtprio - max realtime priority
#
#
#
#* soft core 0
#* hard rss 10000
#@student hard nproc 20
#@faculty soft nproc 20
#@faculty hard nproc 50
#ftp hard nproc 0
#@student - maxlogins 4
@arch soft memlock unlimited
@arch hard memlock unlimited
# End of file