TOBI WAS HERE! // DEM TOBI IHM SEIN BLOG

8Okt/170

VirtualBox: How to create a macOS High Sierra VM to run on a Mac host system

So I have a MacBook Pro running macOS Sierra (10.12) and I wanted to run a virtual machine (VM) of macOS High Sierra to try out the new operating system. It's always a struggle to get macOS as a guest system running on macOS as the host system, but today was my lucky day and after several failures I managed to get it running! So here is how I did it...

 

 

 

My environment

macOS Sierra 10.12.6, VirtualBox 5.1.28 with installed VirtualBox Extension Pack
You will need at least 4096 MB RAM of host memory, more is better. You also need ~20 GB disk space for the virtual machine, as well as ~18 GB free space temporarily for the creation of the install media.

 

Create a macOS install ISO file for VirtualBox

  • Download macOS High Sierra from the Mac App Store
    • Hint: if you have downloaded macOS High Sierra before the 5th of October, delete it and redownload it. Apple made some changes to the previous released version, especially to the installer, which are important to get this VM running. The version of the "Install macOS High Sierra.app" has to be 13.0.66 or above.
  • Open a Terminal window, create a "virtual USB flash drive"/disk image:
  • Mount it:
  • Put the installer files into this new disk image:
  • Unmount the disk image, so that the resource is not busy for the next step:
  • Convert the disk image into an ISO file (VirtualBox is not capable of booting from a .dmg or .sparseimage file):
  • Move it to the desktop folder and rename the extension of the file to .iso:
  • Delete the sparseimage in the tmp folder:

 

Create the VM

  • Create a new machine
    • Name: macOS (or whatever you want to call it)
    • Type: Mac OS X
    • Version: Mac OS X (64-bit) or macOS 10.13 High Sierra (64-bit)
    • Memory size: 4096 MB
    • Virtual hard disk size: ~20 GB (an empty installation of macOS High Sierra takes about 11,4 GB)
  • Edit the new machine
    • System -> Motherboard -> Boot Order: deactivate Floppy

    • System -> Processor -> change CPU to two, optional: set execution cap to 80% (this value is up to you and your host system configuration)
    • Display -> Screen -> Video Memory: increase it to 128 MB

    • Storage -> virtual hard disk -> don't activate "Solid-state Drive" (this is pretty important, because the macOS installer converts your virtual partition to APFS if it detects it as a solid state drive, unfortunately VirtualBox doesn't support APFS at this moment, so the boot process will fail while installing High Sierra. For non solid state drives, the installer is not going to convert the virtual disk to APFS and leave it untouched as a HFS+ volume)
    • Storage -> Optical Drive ("Empty") -> choose the HighSierra.iso from your desktop folder (to choose it, click on the CD icon next to "SATA Port 1")
    • Audio -> deactivate Enable Audio

    • stick with the default values of all the other options and apply the settings with the "OK" button

 

Installation of macOS High Sierra Part 1

  • Start the VM
  • wait until the language chooser appears and choose your language (optional: change the keyboard layout to your country keyboard layout in the top right corner with a click on the US flag icon)
  • Open Disk Utility
  • Click on "View" in the top left corner of the Disk Utility window and choose "Show All Devices"
  • Highlight "VBOX HARDDISK Me...", then click "Erase", choose a name for the virtual hard disk and click the "Erase" button to partition and format the virtual hard disk
  • When the erase process is done, close Disk Utility
  • Next choose "Install macOS"
  • Click Continue
  • Agree to the terms of the license agreement
  • Choose your previously created virtual hard disk and finally start the installation with a click on "Install"
  • The installer installs some files and after a while the machine will reboot automatically

 

Installation of macOS High Sierra Part 2

  • After the reboot, the VM will display an error message: "Boot Failed. Mac OS X"
  • Because of this error, after 10 seconds, the machine will then do a "fallback boot" into the "Part 1" installation process. Why? VirtualBox doesn't recognize that there is a new disk, containing a second EFI, which we need to boot into. So we have to do this manually.
  • To do this, restart the machine (CMD+R will hard reset it, or, if the "Part 1"-Installer is already running, click on the Apple logo in the menu bar and choose "Restart").
  • Now you have to be very fast: while the VM restarts, press the fn+F12 keys a few times, so that it gets into the VirtualBox boot manager. You have to be very quick! If the machine is already displaying "Boot Failed. Mac OS X", hit CMD+R to reset it and try again.
  • If you were fast enough, choose "Boot Maintenance Manager" and hit the Enter key.
  • Go to "Boot from File" and hit Enter again.
  • Choose the entry with ...HD(2,GPT)...
  • Choose <macOS Install Data>

  • Choose <Locked Files>

  • Choose <Boot Files>

  • Choose boot.efi, this will boot the machine into the "Part 2" installation process of macOS
  • macOS High Sierra will then continue to install itself.
  • Click through the steps of the "first run wizard"
  • ...and you are done! 🙂
  • Finally shutdown the virtual machine, remove the ISO from the virtual optical disk and create a snapshot of the VM, just in case... it's always nice to have a backup 😉

 

Have fun with your newly created virtual machine running macOS High Sierra 10.13!

//Update (2018-02-10): A huge thanks to all of you, who appreciated this article and were thankful for it in the comments. I'm overwhelmed by all the feedback in the comments! Thank you.

12Mrz/170

macOS: welche Dateien legt ein pkg-Installer an?

Im Grunde gibt es zwei Arten von Installationen eines Programms unter macOS.

  1. Man lädt ein Disk Image (.dmg) herunter, welches per Doppelklick ins System eingebunden wird, anschließend zieht man das Programm (xyz.app) in den Programme-Ordner.
  2. Die Anwendung kommt mit einem Installer. Hier gibt es jetzt noch mal zwei Unterscheidungen: ein eigener entwickelter Installer (das ist z.B. beim Adobe Flash Player der Fall) oder ein Installer im pkg-Format, der den macOS internen Installer nutzt (ähnlich MSI unter Windows). Dieser Kurztipp bezieht sich auf den macOS internen Installer.

Möchte man bspw. für eine Deinstallation wissen, welche Dateien bzw. wo der Installationsprozess Dateien ab- und angelegt hat, geht das wie folgt:

  1. Man startet den Installer ganz gewohnt per Doppelklick.
  2. Man wählt über die macOS Menüleiste Ablage > Zeige Dateien (geht auch alternativ per Tastenkombination: cmd+I)

Und schon öffnet sich ein neues Fenster mit einer Übersicht aller Dateien, die angelegt werden (hier am Beispiel der TeamViewer Installation):

TeamViewer Installer Dateien

Was manchmal bei Fehlern auch ganz hilfreich sein kann: Über die Menüleiste lässt sich ein Logfenster zur aktuellen Installation anzeigen => Fenster > Installer Log (cmd+L)

25Feb/170

macOS: nicht automatisch zu (Audio-) Bluetooth Geräten verbinden

Ich habe bei meinem MacBook Pro immer Bluetooth an, damit es sich bspw. automatisch per Apple Watch entsperrt und diverse iCloud Funktionen, wie die allgemeine Zwischenablage oder Handoff, nutzbar sind.
Ab und zu möchte ich vom MacBook Musik über meinen AV-Receiver ausgeben. Da dieser leider noch keine WLAN- oder Bluetooth-Konnektivität besitzt, habe ich ihn mit einem Audio Bluetooth Receiver (Philips AEA2700, empfehlenswertes Produkt!) nachgerüstet. Einziger Nachteil: Einmal gekoppelt, verbindet sich das MacBook gerne mal automatisch und ohne Nachfrage mit dem Bluetooth Receiver und gibt die Musik über diesen wieder. Das wollte ich unterbinden, da es ziemlich nervig sein kann und ich selber manuell bestimmen möchte, über welchen Ausgang mein MacBook die Musik ausgibt.

Man kann diese Funktionalität, zumindest für Audio Empfänger, unter macOS abstellen.

Dazu öffnet man einfach das Terminal und gibt folgenden Befehl ein:

Da der Befehl per sudo mit Systemrechten ausgeführt wird, ist noch die Eingabe eines Administrator Passwortes notwendig. Die Einstellung wird anschließend sofort übernommen und ist aktiv, ein Neustart o.ä. ist nicht von Nöten.

Damit verbindet sich macOS zu gekoppelten Audio Bluetooth Empfängern ab sofort nicht mehr automatisch.

Möchte man die Einstellung wieder rückgängig machen, ersetzt man einfach am Ende der Befehlszeile die "1" durch eine "0".

11Okt/150

Spotlightfenster unter El Capitan zentrieren

Ab OS X 10.11 El Capitan gibt es die Möglichkeit das Spotlightfenster per Maus an eine andere Stelle auf dem Bildschirm zu verschieben. Wenn man es wieder zentriert auf dem Bildschirm haben möchte, klickt man einfach auf das Lupensymbol in der Menüleiste und hält die Maustaste so lange gedrückt, bis das Fenster wieder zentriert ist (ca. 1 Sekunde).

12Jan/150

DisplayLink Log-Spam abschalten

Ich verwende eine USB Grafikkarte von DisplayLink. Der Treiber bzw. OS X erzeugt pro Sekunde mehrere Logeinträge im folgenden Format:

Das erzeugt unnötige CPU Last, Batterieverbrauch (beim MacBook) und permanenten Schreibzugriff auf die SSD (ganz ungesund!).

Man kann dem Logdämon syslogd allerdings beibringen beliebige Logmeldungen herauszufiltern und diese somit nicht mehr mit zu loggen.

Wie das geht?

1. Datei beliebigen Namens unter /etc/asl/ erzeugen:

2. Definieren, was gefiltert werden soll (Erläuterung)

3. per STRG+X nano beenden und die Datei speichern

4. den syslogd Dämon neu starten

 

Quellen:
http://www.displaylink.org/forum/showthread.php?t=62987
http://blog.jamesball.co.uk/2014/11/removing-displaylink-driver.html