Kako instalirati macOS High Sierra u VirtualBox na Windows 10

Bez obzira želite li povremeno testirati web mjesto u Safariju ili isprobati malo softvera u Mac okruženju, korisno je imati pristup najnovijoj verziji macOS-a u virtualnom stroju. Nažalost, to zapravo ne biste trebali raditi - pa je pokretanje macOS-a u VirtualBoxu, u najmanju ruku, nezgodno.

Ažuriranje: Upute ovdje odnose se na starije verzije macOS-a. Ako želite instalirati noviju verziju macOS-a u VirtualBox, pogledajte ovu skriptu na GitHubu. Obećava vam da će vas provesti kroz postupak instaliranja i postavljanja macOS virtualnog stroja. Nismo ga još testirali, ali čuli smo dobrih stvari.

Međutim, to nije nemoguće. Neki od ljudi na forumima InsanelyMac smislili su postupak koji djeluje. Jedino što  ne radi je zvuk koji je iz nekog razloga jako iskrivljen ili ga uopće nema. No osim toga, ovo je macOS High Sierra, koji glatko radi u VirtualBoxu.

Kako bismo ljudima malo olakšali stvari, kombinirali smo metode iz nekoliko različitih tema foruma u jedan korak-po-korak vodič, zajedno sa snimkama zaslona. Uronimo.

POVEZANO: Početnik Geek: Kako stvoriti i koristiti virtualne strojeve

NAPOMENA: Da bi ovo funkcioniralo, trebat će vam pristup stvarnom Macu kako biste preuzeli High Sierru. Pretpostavljamo da biste mogli dobiti High Sierra ISO drugim sredstvima, ali ga ne preporučujemo. Posudite Mac prijatelja na sat vremena ako ga nemate i trebali biste biti u redu - sve što se nalazi iznad prvog koraka ovog vodiča može se obaviti na Windows računalu.

Ako ste na Macu i želite macOS virtualni stroj za upotrebu na tom Macu, preporučujemo da umjesto toga provjerite Parallels Desktop Lite, jer može besplatno stvoriti macOS virtualne strojeve i s njim je puno lakše raditi.

Spremni za početak? Uskočimo!

Prvi korak: Stvorite macOS ISO datoteku High Sierra

Za početak trebamo stvoriti ISO datoteku instalacijskog programa macOS High Sierre, kako bismo je mogli učitati u VirtualBox na našem Windows računalu. Uzmite svoj posuđeni Mac, idite u Mac App Store, potražite Sierru i kliknite "Preuzmi".

Kad je postupak gotov, pokrenut će se instalacijski program - to je u redu, samo ga zatvorite Command + Q. Ne želimo nadograditi Mac vašeg prijatelja; samo trebamo preuzete datoteke.

Da bismo te datoteke pretvorili u ISO, trebat ćemo upotrijebiti terminal koji možete pronaći u Applications> Utilities.

Prvo pokrenite sljedeću naredbu da biste stvorili praznu sliku diska:

hdiutil stvaranje -o /tmp/HighSierra.cdr -veličina 7316m -izgled SPUD -fs HFS + J  

Zatim montirajte svoju praznu sliku:

hdiutil priložiti /tmp/HighSierra.cdr.dmg -noverify -nobrowse -mountpoint / Volumes / install_build

Sada ćete vratiti BaseSystem.dmg iz instalacijskog programa na novo montiranu sliku:

asr restore -source / Applications / Install \ macOS \ High \ Sierra.app/Contents/SharedSupport/BaseSystem.dmg -target / Volumes / install_build -noprompt -noverify -erase

Imajte na umu da se, nakon što je to učinio, naziv naše odredišne ​​točke montiranja promijenio u „OS X osnovni sustav / sustav“. Skoro si gotov! Demontirajte sliku:

hdiutil detach / Volumes / OS \ X \ Base \ System

I na kraju, pretvorite sliku koju ste stvorili u ISO datoteku:

hdiutil pretvori /tmp/HighSierra.cdr.dmg -format UDTO -o /tmp/HighSierra.iso

Premjestite ISO na radnu površinu:

mv /tmp/HighSierra.iso.cdr ~ / Desktop / HighSierra.iso

I imate pokretačku ISO datoteku High Sierra ISO!

Kopirajte ga na svoj Windows uređaj pomoću velikog bljeskalice, vanjskog tvrdog diska ili putem lokalne mreže.

Drugi korak: Stvorite svoj virtualni stroj u VirtualBoxu

Dalje, idite na svoj Windows sustav i instalirajte VirtualBox ako to već niste učinili, pazeći da imate najnoviju verziju (ozbiljnije, starije verzije možda neće raditi.)

Otvorite ga i kliknite gumb "Novo". Nazovite svoj virtualni stroj „High Sierra“ i odaberite „Mac OS X“ za operativni sustav i „Mac OS X (64-bit)“ za verziju (od ovog članka „macOS High Sierra“ nije u ponudi, ali to je u redu.)

Nastavite kroz postupak. Za memoriju preporučujemo upotrebu najmanje 4096 MB, no možete se odlučiti i za više ako imate dovoljno RAM-a na računalu sa sustavom Windows.

Zatim ćete biti upitani o tvrdom disku. Odaberite "Stvori virtualni tvrdi disk odmah" i kliknite Stvori.

Odaberite VDI za vrstu tvrdog diska i kliknite Dalje. Upitat će vas želite li pogon s dinamičkom veličinom ili fiksni. Preporučujemo Fiksnu veličinu jer je nešto brža, iako će zauzeti malo više prostora na tvrdom disku na vašem Windows računalu.

Kliknite Dalje. Pitat će vas koliko velik pogon želite; preporučujemo najmanje 25 GB, što je dovoljno za OS i nekoliko aplikacija. Ovisno o vašoj situaciji pohrane, mogli biste ponuditi više, ali mislimo da doista ne možete koristiti puno manje od toga.

Kliknite kroz upute i stvorili ste unos za svoj virtualni stroj! Sada je vrijeme da napravimo malu konfiguraciju.

Treći korak: Konfigurirajte svoj virtualni stroj u VirtualBoxu

Trebali biste vidjeti svoj virtualni stroj u glavnom prozoru VirtualBox-a.

Select it, then click the big yellow “Settings” button. First, head to “System” in the left sidebar. On the Motherboard tab, make sure that “Floppy” is unchecked.

Next head to the “Processor” tab, and make sure you have at least two CPUs allocated to the virtual machine.

Next, click “Display” in the left sidebar, and make sure Video Memory is set to at least 128MB.

Next, click “Storage” in the left sidebar, then click the “Empty” CD drive. Click the CD icon at the top right, then browse to the High Sierra ISO file you created earlier.

Be sure to click “OK” to finalize all the changes you’ve made, then close VirtualBox. No, seriously: close VirtualBox now, or the next steps won’t work.

Step Four: Configure Your Virtual Machine From The Command Prompt

We’ve made a few tweaks, but we need to make a few more more in order to convince the operating system it’s running on a real Mac. Sadly, there are no options for this from VirtualBox’s interface, so you’ll need to open the Command Prompt.

Open the Start Menu, search for “Command Prompt,” then right-click it and select “Run as administrator.”

You need to run a number commands, in order. Paste the following commands, pressing Enter after each one and waiting for it to complete:

cd "C:Program FilesOracleVirtualBox"
VBoxManage.exe modifyvm "High Sierra" --cpuidset 00000001 000306a9 04100800 7fbae3ff bfebfbff
VBoxManage setextradata "High Sierra" "VBoxInternal/Devices/efi/0/Config/DmiSystemProduct" "MacBookPro11,3"
VBoxManage setextradata "High Sierra" "VBoxInternal/Devices/efi/0/Config/DmiSystemVersion" "1.0"
VBoxManage setextradata "High Sierra" "VBoxInternal/Devices/efi/0/Config/DmiBoardProduct" "Mac-2BD1B31983FE1663"
VBoxManage setextradata "High Sierra" "VBoxInternal/Devices/smc/0/Config/DeviceKey" "ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc"
VBoxManage setextradata "High Sierra" "VBoxInternal/Devices/smc/0/Config/GetKeyFromRealSMC" 1

That’s it! If everything worked, you shouldn’t see any feedback; the commands will simply run. If the command did not work, make sure your virtual machine is named “High Sierra” exactly; if it isn’t, edit the commands above putting your machine’s name in the quotes. Go ahead and close the Command Prompt. We’re heading back to VirtualBox now.

Step Five: Boot and Run The Installer

Re-open VirtualBox, click your Sierra machine, then click “Start.” Your machine will start to boot. You will see a lot of superfluous information as this happens—and I mean a lot—but don’t worry about it. It’s normal, even some of the things that look like errors.

You should only worry if a specific error hangs for five minutes or more. Just walk away and let it run for a bit. If you’ve done everything right, it’ll boot.

Eventually, you’ll see the installer asking you to pick a language:

Pick “English,” or whatever language you prefer, then click “Next.” Before you do anything else, however, click “Disk Utility” then “Continue.”

You won’t see the drive: don’t panic, High Sierra hides blank drives by default. In the menu bar, click “View” followed by “Show All Devices.”

You should now see your empty virtual drive in the sidebar. Click it, then click the “Erase” option.

Name the drive “Macintosh HD,” and leave the other two settings as-is: “Mac OS Extended Journaled” and “GUID Partition Map”. Do not create an AFS partition, because it will not work and you’ll have to start over with a new virtual hard drive. Click “Erase,” then close Disk Utility when the process is complete. You’ll be brought back to the main window.

Select “Reinstall macOS” then click “Continue.” You’ll be asked to agree with the terms.

Agree and you’ll eventually be asked to choose a hard drive; select the partition you just made.

The installation will begin! This might take a while, so be patient. Eventually your virtual machine will restart and take you…back to the installer. Don’t panic: this is to be expected.

Step Six: Boot Installer Stage Two From the Virtual Hard Drive

At this point the installer has copied files onto the virtual hard drive, and expects to boot from there. For whatever reason this does not work on the virtual machine, which is why you’re seeing the installer again.

Turn off your virtual machine and open its settings. Head to Storage, click “HighSierra.iso” in the “Storage Tree” panel, then click the CD icon at top-right and click “Remove Disk from Virtual Drive.” This will completely disconnect our installation ISO.

Now start up the virtual machine and you’ll see this lovely screen.

This is the EFI Internal Shell, and as long as you see “FS1” listed in yellow, you can use it to launch the rest of the installer. Click the virtual machine and allow it to capture you mouse and keyboard, then type fs1: and hit Enter. This will switch directories to FS1, where the rest of the installer is located.

Next we’re going to run a few commands in order to switch to the directory we need:

cd "macOS Install Data" cd "Locked Files" cd "Boot Files"

Now we can run the installer itself with the following command:

boot.efi

The installer will pick up where it left off. First you’ll see a series of text, like before, but eventually you’ll see the GUI installer come back. (Don’t worry, you only have to go through this process once.)

We’re getting there, just need a little bit more patience.

Step Eight: Log Into macOS High Sierra

Eventually the virtual machine will reboot again, this time into macOS High Sierra. If that doesn’t happen, try ejecting the ISO from the Virtual Machine. When High Sierra does boot, you’ll need to go through choosing your country, setting up a user, and the rest of the initial setup process.

Eventually, you’ll make it to the Mac desktop. Yay!

You can now try out any Mac software, though some functions, like FaceTime and Messages, won’t work because Apple won’t recognize your computer as a real Mac. But a lot of the basic stuff should work. Have fun!

Step Eight (Optional): Change Your Resolution

By default, your virtual machine will have a resolution of 1024×768, which is not a lot of room to work with. If you try to change the resolution from within macOS, however, you will see no option to do so. Instead, you need to enter a few commands.

Shut down your Virtual Machine by shutting down macOS: click the Apple in the menu bar, then click “Shut Down.” Next, close VirtualBox entirely (seriously, this step will not work if VirtualBox is still open!) and head back to Windows’ Command Prompt as an admin. You need to run the following two commands:

cd "C:Program FilesOracleVirtualBox"
VBoxManage setextradata "High Sierra" "VBoxInternal2/EfiGopMode" N

In the second command, you need to replace the N with a number from one to five, depending on what resolution you want:

  • 1 gives you a resolution of 800×600
  • 2 gives you a resolution of 1024×768
  • 3 gives you a resolution of 1280×1024
  • 4 gives you a resolution of 1440×900
  • 5 gives you a resolution of 1920×1200

Start up VirtualBox, load up your virtual machine, and it should boot to your preferred resolution!

RELATED:10 VirtualBox Tricks and Advanced Features You Should Know About

Od sada VirtualBox možete otvoriti za svako testiranje povezano s Macom koje želite obaviti. Ponovno ćete vidjeti puno pogrešaka koje se pojavljuju tijekom pokretanja, ali one su u redu; ignoriraj ih. Također, imajte na umu da zvuk neće raditi, kao ni stvari poput FaceTimea ili iMessagea, za koje je potreban pravi Mac. Ovo neće biti savršeno, što se i očekuje od potpuno nepodržane postavke. Ali to je macOS, u virtualnom stroju, i to nije loše! Svakako pogledajte naš vodič za napredne značajke VirtualBox-a kako biste i vaš stroj iskoristili na najbolji način.

Još nešto: ogromna vika Chadu S. Samuelsu, bez kojeg ne bih mogao ažurirati ovaj vodič za High Sierru. Puno ti hvala!