lunch this .bat :"
@echo off
setlocal enabledelayedexpansion
:: === CONFIG ===
set VBOX_PATH="C:\Program Files\Oracle\VirtualBox"
cd /d %VBOX_PATH%
set BACKUP_DIR=vbox_backup
:: === HEADER ===
echo.
echo ================================================
echo PATCH ULTIME MACOS (Sonoma / Sequoia)
echo ================================================
echo.
:: === LISTE DES VMs EXISTANTES ===
echo [*] Machines virtuelles détectées :
echo ----------------------------------
VBoxManage list vms
echo ----------------------------------
echo.
set /p VM_NAME="👉 Entrez le nom EXACT de votre VM : "
if "%VM_NAME%"=="" (
echo [x] Nom de VM vide. Annulation.
pause
exit /b
)
:: === CHOIX ACTION ===
echo.
choice /C PRX /M "Souhaitez-vous Patcher (P), Restaurer (R), ou Quitter (X) ?"
if errorlevel 3 exit /b
if errorlevel 2 goto :RESTORE
if errorlevel 1 goto :OS_SELECT
:: === CHOIX DE L'OS ===
:OS_SELECT
echo.
choice /C 12 /M "Quel OS voulez-vous configurer ? (1 = Sonoma / 2 = Sequoia)"
if errorlevel 2 set OS_MODE=Sequoia
if errorlevel 1 set OS_MODE=Sonoma
:: === SAUVEGARDE ===
echo.
echo [+] Sauvegarde de la configuration actuelle...
if not exist "%BACKUP_DIR%" mkdir "%BACKUP_DIR%"
VBoxManage showvminfo "%VM_NAME%" > "%BACKUP_DIR%\%VM_NAME%_backup.txt"
echo [✓] Sauvegarde effectuée : %BACKUP_DIR%\%VM_NAME%_backup.txt
echo.
:: === PATCH GLOBAL ===
echo [+] Application du patch pour macOS %OS_MODE%...
echo ----------------------------------
:: CPU / CPUID
VBoxManage modifyvm "%VM_NAME%" --cpuidset 00000001 000106e5 00100800 0098e3fd bfebfbff
VBoxManage modifyvm "%VM_NAME%" --cpu-profile "Intel Core i7-6700K"
VBoxManage modifyvm "%VM_NAME%" --cpus 1
:: DMI / SMBIOS
VBoxManage setextradata "%VM_NAME%" "VBoxInternal/Devices/efi/0/Config/DmiSystemProduct" "iMac19,3"
VBoxManage setextradata "%VM_NAME%" "VBoxInternal/Devices/efi/0/Config/DmiSystemVersion" "1.0"
VBoxManage setextradata "%VM_NAME%" "VBoxInternal/Devices/efi/0/Config/DmiBoardProduct" "Iloveapple"
VBoxManage setextradata "%VM_NAME%" "VBoxInternal/Devices/efi/0/Config/DmiSystemFamily" "iMac"
VBoxManage setextradata "%VM_NAME%" "VBoxInternal/Devices/efi/0/Config/DmiBIOSVersion" "IM191.88Z.0058.B00.1906141132"
:: SMC
VBoxManage setextradata "%VM_NAME%" "VBoxInternal/Devices/smc/0/Config/DeviceKey" "ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc"
VBoxManage setextradata "%VM_NAME%" "VBoxInternal/Devices/smc/0/Config/GetKeyFromRealSMC" 0
:: Graphique & résolution
VBoxManage setextradata "%VM_NAME%" "VBoxInternal2/EfiGraphicsResolution" "1920x1080"
VBoxManage setextradata "%VM_NAME%" "VBoxInternal/Devices/efi/0/Config/GraphicsResolution" "1920x1080"
VBoxManage setextradata "%VM_NAME%" "VBoxInternal/Devices/efi/0/Config/CustomVideoMode1"
:: Horloge, TSC, fixes recommandés
VBoxManage setextradata "%VM_NAME%" "VBoxInternal/TM/TSCMode" "RealTSCOffset"
VBoxManage setextradata "%VM_NAME%" "VBoxInternal/TM/VirtualSync" "false"
:: Nettoyage de clés obsolètes
VBoxManage setextradata "%VM_NAME%" "VBoxInternal/TM/UseAPICTimer"
VBoxManage setextradata "%VM_NAME%" "VBoxInternal/TM/VirtualSync"
:: Désactivation partielle de l’accélération pour stabilité
VBoxManage modifyvm "%VM_NAME%" --hwvirtex off
VBoxManage modifyvm "%VM_NAME%" --nestedpaging off
VBoxManage modifyvm "%VM_NAME%" --vtxvpid off
:: Empêcher certains plantages au reboot
VBoxManage setextradata "%VM_NAME%" "VBoxInternal/PDM/HaltOnReset" 1
echo.
echo [✓] Patch macOS %OS_MODE% appliqué à la VM "%VM_NAME%" avec succès.
goto :END
:: === RESTAURATION MANUELLE ===
:RESTORE
echo.
if exist "%BACKUP_DIR%\%VM_NAME%_backup.txt" (
echo [!] Configuration précédente sauvegardée ici :
echo %BACKUP_DIR%\%VM_NAME%_backup.txt
echo.
echo [⚠] VBoxManage ne permet pas une restauration automatique ligne par ligne.
echo Tu peux la reconfigurer manuellement depuis cette sauvegarde.
) else (
echo [x] Aucune sauvegarde trouvée pour "%VM_NAME%"
)
pause
goto :END
:END
echo.
pause
exit /b
" and enjoy 🙂 - VboxVGA