Hackintosh on x86 platform – Part II Install macOS

A MacBook Pro photo

I introduced the Hackintosh hardware tips in the first article. However, some software is required to configure, install, and run macOS on the Hackintosh. I used OpenCore. The other option is Clever.

The high-level configure procedure

  1. Prepare macOS image.
  2. Create bootable USB disk with macOS image.
  3. Edit EFI configuration on the USB disk.
  4. Install macOS on the hardware.
  5. Tuning.

However, you need to follow OpenCore official guidelines to prepare and install macOS. I only share my experience on Dell Inspiron 15-7569.

Helper Machine for the Hackintosh

OpenCore guidelines provide the tools on Windows, Linux, and macOS. I think the tools under macOS are most straightforward. So I suggest you have another computer to prepare the macOS image. Suppose you don’t have an Apple computer. You can create a macOS virtual machine on Windows 10. Following is what I used:

  1. Prepare a Windows 10 computer.
  2. Install VMware Workstation or VMware Player. The evaluation version is enough.
  3. Run unlocker 3.0.3 to enable macOS support on the VMware products above.
  4. Create a macOS VM.
  5. Download macOS image and install on the VM. (This article offers some images that can be used directly on VMware Workstation. I didn’t test it. But the guide is also helpful.)

I recommend downloading the Catalina or older macOS version for the virtual machine since it is more stable. And another trick is you need to install VMware Tools on the virtual machine twice after install macOS.

Tools

Once the virtual machine is ready, you need to download and upload the following tools to it:

  • MountEFI. It’s a tool to mount the EFI partition.
  • OpenCore. It’s the core part to boot up macOS on non-Apple platform. It simulates the Apple hardware environment.
  • ProperTree. It’s used to edit the configure.plist file.
  • GenSMBIOS. It generates fake Apple serial number, board id…etc.
  • IORegistryExplorer. It’s useful to list graphic card on macOS for troubleshooting purpose.
  • installmacos.py. It downloads the official images to macOS.

Configuration

Now you have enough tools to start the actual works. I would suggest you follow the OpenCore official guidelines. Since it contains the detailed steps, I mentioned below. Following is the high-level procedure I used:

You should complete the following steps on the helper macOS virtual machine.

  1. Download macOS image. I used to see some newer versions of Big Sur that could not complete the installation progress. If it’s the case, please choose a lower version.
  2. Format a USB disk to the Mac OS Extended (Journaled) format.
  3. Create the USB bootable installer with the downloaded image.
  4. Mount EFI partition of the USB disk.
  5. Create a folder called EFI in the empty EFI partition you mounted.
  6. Copy OperCore files over to the EFI folder.
  7. Add, remove, and modify the files in the EFI folder according to the OpenCore official guidelines.
  8. Edit the “config.plist” file in the EFI folder according to the OpenCore official guide.

Installation

Now you should be able to install macOS on the Hackintosh with the USB disk.

Please make sure the partition is APFS when you format the local disk. Otherwise, macOS installation may be in problem.

Please leave some space to install Windows 10 if you can. It will be beneficial for macOS issues in the future.

You may want to use an external keyboard and mic if it’s a laptop. The reason is the laptop keyboard and touchpad may require additional tuning. You can do that later after installed the macOS.

If everything goes smoothly, you should be able to see the login screen after several reboots.

Post Installation Tuning

The installation is not the end of the Hackintosh game. You still need to tune the macOS as much as possible to works as an actual Mac. Even it’s a Hackintosh. 🙂 Following is my experience:

Apple’s unique features

  1. Play DRM content. Such as Apply TV+, High quality lossless music in Apply Music, Netflix or Amazon in Safari…etc. It doesn’t work if your computer only has embedded GPU (iGPU). And it only works well on AMD Dedicate GPU (dGPU, the secondary GPU on your computer). You may need to follow the commands I mentioned in the part I to enable it.
  2. AirDrops, SideCar, and Apple Bluetooth features (Such as AirPod Pro). You need a compatible wireless card to enable these features. The card with different part number (PN) may not work on some computers. For example, my laptop is Dell Inspiron 15-7569. I bought an DW1820A. The bluetooth worked but wireless never worked. According to the community, the only work version is DW1820A with PN: CN-08PKF4. Then I returned the first card and bought another one with the correct PN, it worked just fine. People says that driver is not required for compatible wireless card. This is inaccurate. You actually need to follow OpeCore guidelines to install 3rd party driver.

Common features

  1. Sound Card. You may see no sound card in the macOS settings. Therefore, you need to follow the guide to find out your sound card’s ALC and try the layout id one by one in the boot arg section in configure.plist file. It spent me a lot of time to identify ALC of my sound card. Following is my experience:
    • Find your sound card’s vendor id (VEN), device id (DEV), and subsys id (SUBSYS) in device manager -> Properties of your sound card -> Detials -> Device instance path on Windows 10.
    • Search the combination of VEN and DEV. For example: Dell Inspiron 15-7569’s sound card is customized. It’s hard to find the actual Codec. I found the VEN 10EC, DEV 0225, SUBSYS 1028073 in the devce manager on Windows 10. I searched 10EC0225 in this file. And then try to match the SUBSYS in results. And found out the codec is ALC3234.
    • Found the codec in the AppleALC list.
    • You should see there are few or a lot of layout ids for your codec.
    • Now you need to test each id by following “Testing your layout section” in OpenCore.
    • Be patient! I tried a lot of ids for my codec, and one time I was about to gave up. But suddenly one ID was working!
  2. TouchPad and Mic on laptop. The OpenCore official guidelines have enough information for this. However, The trick is you need to decide are your TouchPad and Mic a PS2, USB, I2C or something else. It really confused me. My workaround to identiy it is to go to BIOS setting to check. My laptop has a keyword “PS2” in the TouchPad setting.

That’s all I have at this moment. I didn’t provide detailed procedures since everyone’s hardware is different. However, the high-level processes may bring you some ideas about the whole picture of Hackintosh. Good luck and have fun!!!

Hackintosh on x86 platform – Part I Hardware

laptop notebook internet connection


“Hackintosh is a computer that runs Apple’s Macintosh operating system macOS on computer hardware not authorized for the purpose by Apple.”

Wiki

All credits belong to the OpenCore official guide. I cannot complete without the super detailed guide. 🙂

Hardware is the first step for Hackintosh. You need compatible computer parts that macOS can support. I have successfully build my Hackintosh system on a desktop PC and a laptop.

Please refer to the OpenCore official guide to buy your computer parts. I will only share my experience in this article.

CPU

First of all, I recommend Intel CPU. According to the guide. It appears a bit hard and extra steps if you use AMD CPU.

Memory

Memory is more flexible. I have tried from high-end Samsung DIMMs to some super cheap DIMMs (32GB per DIMM). I didn’t see any issue.

Hard Disk

Hard disk is also flexible. You can use SATA to NVMe. However, I would recommend SATA SSD or NVMe SSD. It’s much faster. My macOS loading speed is about 4 – 6 seconds with NVMe SSD. And any brand is ok. My desktop PC use SAN Disk. And my laptop uses a cheap ($85 for 512 GB) no-brand SATA SSD.

GPU

A graphics card is essential. It impacts Apple TV+, NetFlix, and any other online streaming services that use Apple DRM technology. I assume you are using Intel CPU. And you only want to use the embedded graphics card. You will not be able to watch movies on Apple TV+. (I have tried all options. Please let me know if you figured it out.) If you use an external graphics card. AMD card is the best choice since Apple’s computers use only AMD graphics cards.

And “iGPU” means the embedded graphics card. “dGPU” means the external graphics card. If you have a proper dGPU, you build a Hackintosh computer by following the OpenCore official guide. And you find Apple TV+ still doesn’t work. In addition, you need to run the following command in the terminal:

defaults write com.apple.AppleGVA gvaForceAMDKE -bool YES
defaults write com.apple.AppleGVA gvaForceAMDAVCEncode -bool YES
defaults write com.apple.AppleGVA gvaForceAMDAVCDecode -bool YES
defaults write com.apple.AppleGVA gvaForceAMDHEVCDecode -bool YES

Wifi and Bluetooth

The wifi card is a critical part of achieving most of Apple’s unique functions. Such as AirDrop, SideCar, AirPod, and Apple Watch unlock, etc. The suggestion is to buy a second-hand Apple wifi card or something natively supported by macOS. For example, my laptop uses the DW1820A wifi card. The part number is CN-08PKF4 which is perfectly running on my Dell Inspiron 15-7569! I would recommend the same card if you have a Dell laptop. Please make sure the part number is the same as mine. I tried some other model on the Dell laptop. No one works.

Other Consideration

In addition. You also need to prepare a USB keyboard and mouse if you build Hackintosh on a laptop. The laptop keyboard and touchpad may not work in the macOS installation if you do not configure OpenCore properly. So you may need to use the USB keyboard and mouse temporarily.

Cursor is lagging on External 4K Monitor

I bought a new 4K monitor recently. It’s connected with HDMI to my laptop. The cursor is lagging when moving on the external 4K monitor. This is the second time that I noticed cursors move slow on an external 4K monitor.

The solution is on the internet. Change the Screen refresh rate to the same with the primary screen. It’s 60 hertz in my case.

Screen refresh rate setting

And I also noticed that the screen refresh rate can cause other issues. Such as screenshot software, game, or other applications may crash.

Balanced Memory Configuration for ESXi Servers

Background

ESXi servers are fundamental infrastructure. The underly hardware performance has a butterfly effect on the upper layer virtual machines and applications. Since there is less than 10% performance overhead on the virtualization layer. So it’s valuable to get full performance on the hardware layer. Memory is a big player in hardware performance tuning. Balanced memory configuration is very important. I wrote an article “LRDIMM or RDIMM on ESXi hosts?” a long time ago. It was the understanding in 2016. I did some research recently. I hope the following study help with your hardware decisions. This study is based on Intel Xeon 2nd Generation Scalable Processors.

1. Basic Concepts

Before we talk about balanced memory and optimized memory. Let’s take a look at some basic concepts which will be used in the article.

1.1 Memory Channel

The memory channels control reading and writing bandwidth operations between the CPU and memory modules. Think about it like the lanes on a highway connect CPU and memory. There are 6 memory channels on Intel Xeon 2nd generation Scalable processors. This is different from Intel Xeon E7. E7 only has 4 memory channels. If you are an E7 user and transform to Scalable. You should notice that the balanced memory size on E7 doesn’t balance on Scalable processors.

1.2 DIMM

The full name of DIMM is Dual In-line Memory Module. It’s the small chip-set mounted on a printed circuit board. There are multiple DIMMs on the board. We usually call the whole stuff DIMM in life. DIMM should be installed on the DIMM slot on the server’s motherboard. Each memory channel has two DIMM slots for Intel Xeon 2nd Generation Scalable Processors.

1.3 DIMM Type

The major two types are RDIMM and LRDIMM. The main difference between the two types is that LRDIMM has a buffer in the DIMM. That means LRDIMM is slower than DIMM. LRDMM supports a larger size per DIMM. Such as 128 GB, or higher. RDIMM usually is 16 GB, 32 GB, or 64 GB.

1.4 Rank

It’s one set of memory chips that are accessed while writing to or reading from the memory. Small DIMM size needs maybe only a single rank. Larger DIMM size needs more ranks. Refer to this article to learn more about rank. Dual-rank is better performance than quad-rank according to hardware vendors.

1.5 Interleave

Memory interleaving allows a CPU to efficiently spread memory accesses across multiple DIMMs. All DIMMs should be in one interleaved set creating a single uniform memory region that is spread across as many DIMMs as possible. If there are different types of DIMM or size of DIMM, the memory subsystem interleaves multiple times to access data.

2. Balanced Memory

Memory balance refers to memory population rules on physical servers. There are 6 memory channels on an Intel Xeon 2nd Generation Scalable Processors. Each channel handles two DIMM slots. Enterprise users usually use dual processors for ESXi servers. So there are 24 DIMM slots totally in the server. Each processor handles 12 DIMM slots. The DIMM population should be in pairs and even numbers. For example. You have 12 DIMMs. 6 of 12 should be assigned to the first processor and the other 6 are assigned to the second processor’s DIMM slots. And the 6 DIMMs should be populated on the same slot on each processor. This is called a “balanced memory” population. The memory balance is also related to the NUMA balance for ESXi. The imbalanced memory population causes imbalanced NUMA nodes. This is very important in virtualization performance tuning.

DIMM size and type in the population also impact to memory balance. The DIMM type and size on both processors should be the same. Some customers may want to upgrade existing balanced memory to a higher capacity. The suggestion is to use the same type and size of DIMMs for the upgrading.

3. Memory Optimize

Balanced memory is easy. Hardware vendor’s pre-sales usually give a balanced memory configuration. But the trick is the balance doesn’t means optimized. Balanced but non-optimized server’s performance can be only 35% of the balanced and optimized servers according to Lenovo.

Fully populate the DIMM slots is the first rule. Each interleaving grabs data from all DIMM slots. Think about it like 24 lanes highway again. You can load more goods if you dispatch 24 trucks at the same time. One benefit of virtualization is hardware consolidation. We usually see high memory utilization on ESXi. So this is an important point to optimize ESXi performance.

Use the same type and size of DIMM. Do not mix different types or sizes of DIMM in the server. Since different types or size of DIMM means multiple interleaves. Use the same example. The trucks can only load one type of goods each time. If there are two types of goods. The trucks have to go twice even it’s half loaded.

Rank is another weight impact on performance. Dual-rank DIMM is the best performance. Quad-rank usually in big size DIMM. The performance is lower than dual-rank.

Different DIMM type also impacts performance. RDIMM is a better performance than LRDIMM. The reason because LRDIMM has a cache on DIMM to handle data I/O between processor and memory. It slows down the I/O.

The other things impact to ESXi performance are BIOS settings and power settings. These are out of scope of this post. Basically you need to set to high performance for BIOS and power to achieve best memory performance.

4. Reference

Lenovo: Balanced Memory Configurations with Second-Generation Intel Xeon Scalable Processors

Dell: How to Balance Memory on 2nd Generation Intel® Xeon™ Scalable Processors
Dell: Balanced Memory is Best: 2nd Generation AMD EPYC Processors for PowerEdge Servers

Cisco: Intel Xeon Scalable 2nd Generation Processor Recommendations for Cisco UCS M5 Servers (Login required)

HPE: Server Memory and Persistent Memory Population Rules for HPE Gen10 Servers With Intel Xeon Scalable Processors

VMware: A Performance Comparison of Hypervisors

MAC Address Conflict with ESXi vmkernel NIC on Cisco UCS Blades

Background

I worked on a interesting case few month back. A ESXi blade was not able to bring up due to management IP address didn’t responding to ping. We tried to reconfigure IP address, re-acknowledge blade, rebuild the network, and even replaced the motherboard. It was no lucky. Eventually we figured it out that another ESXi host’s management network somehow configured same MAC address. It caused the MAC address conflict on network.

This guide will show you some tips of how to troubleshooting MAC address conflicts on ESXi and Cisco UCS level.

Some Reference

The first article you should read is “vmk0 management network MAC address is not updated when NIC card is replaced or vmkernel has duplicate MAC address”. It helps you understand why vmkernel MAC address is not updated. The solution in the KB is change MAC address manually on ESXi. Or re-create management network.

But the reality is we usually don’t know where the conflict comes from. We only know this Cisco UCS blade installed ESXi and it doesn’t responding to ping. So you may suspect it’s a hardware issue like me.

Check MAC address conflicts on Cisco UCS

There are some ways to check MAC address conflicts on Cisco UCS.

  • Login to UCS Manager by SSH and check MAC address status.
  • Export UCS Manager log and check MAC address conflicts in fwm_trace_log file.
# Login to UCS Manager
# Run following command to show mac address status.
show platform fwm info mac <mac address> <vlan id>

# Sample
show platform fwm info mac 0025.0050.11.11 141

Login to UCS Manager GUI to generate support log.

Admins -> AllFaults, Events and Audit -> Log -> TechSupport Files

Generate a ucsm log bundle. Download and extract it. There are two major files in the log bundle: UCSM_A_TechSupport.tar.gz and UCSM_B_TechSupport.tar.gz. The files correspond to their respective Fabric Interconnect.

MAC address conflicts usually occurred on one Fabric Interconnect. So you may need to check both of them. I use A side as sample. Go to extract folder -> UCSM_A_TechSupport -> sw_trace_logs -> fwm_trace_log.current

Search keyword “REGMAC seen on border port” in the log. You need to repeat same in the log of the other FI. If you can find the entries and time is recently. Then it indicate there is conflict on the MAC address outside the UCS domain.

There maybe other reasons can cause mac address issue. I wrote in Error: No NIC found with MAC address…

Get SSD Hard Disk Information by PowerShell to HPE Servers

Summary

HPE published an advisor for SSD issue recently. The issue impacts most popular Proliant servers in the world. The remediation is upgrading firmware. Unfortunately HPE doesn’t have a product can easy report hard disk model for Gen9 and earlier models. I have tried HPE OneView and OneView Global Dashboard. However, we can get SSD hard disk information by PowerShell through API.

Solution

Following procedure helps you get SSD hard disk information in large environment.

  1. Make sure you have same credential available on iLO of Proliant servers. It can be local or domain credentials.
  2. Prepare a Windows 2016 or Windows 10 computer with latest patch and internet.
  3. Install HPEiLOCmdlet by following PowerShell command
Install-Module -Name HPEiLOCmdlets
  1. Connecting to HPE iLO.
$Conn = Connect-HPEiLO -IP xxx -User xxx -Password xxx -DisableCertificateAuthentication
  1. Retrieving HPE Smart Array Storage Controller information.
$HardDisks = Get-HPEiLOSmartArrayStorageController -Connection $Conn
  1. Run following command to get physical disk information.
HardDisks.Controllers.PhysicalDrives

Conclusion

PowerShell API is much flexible to get any information of hardware. The solution above is core part. Of course you can leverage ForEach-Object to do some automation report to export to CSV file. PowerShell is not only method, you can also get SSD hard disk information by other API.

Cisco UCS Error: Applying moref properties. Remote-Invocation-Error.

Cisco UCS Manager shows following errors with code “F1001201”.

Applying moref properties(FSM:sam:dme:MorefImportRootApplyMoRefs)​. Remote-Invocation-Error: FSM Retries Exhausted.

The reason is Cisco UCS Manager cannot imports some configurations when the UCS is setup.

Solution:

  1. Login to Cisco UCS Manager by SSH.
  2. Run following commands:
    • # scope system
  3. If you want to see what is pending on importing please run following commands, otherwise skip this step:
    • # show pending-import
    • # show pending-import fsm status expand detail
  4. Delete pending imports:
    • # delete pending-import
    • # commit-buffer
  5. The alerts should go away now in Cisco UCS Manager GUI.

This procedure is online operation without downtime required.

Agentless Management with PowerShell for DELL iDRAC

DELL provides agentless management of iDRAC by PowerShell. It’s more convenience for enterprise level infrastructure compare with HPE Scripting Tools or Cisco PowerTools. You don’t have to install any extra software to retrieve hardware data from iDRAC

DELL provides an article “Agentless Management with PowerShell 3.0 – CIM Cmdlets and iDRAC/Lifecycle Controller” with a sample code which is very detail. The scripts leverage public repos on internet: schemas.dell.com.

But what if your infrastructure is offline or internet is blocked?

After few hours dig into it. I found a workaround works in my environment.

  1. Go to DCIM library profile to find profile of what your iDRAC. (I use DCIM System Info Profile for example)
  2. The document tells what’s the ” Implementation Namespace” and “Central Class”.
  3. Follow sample code in DELL document but when you connect CIM session use following format:
Get-CimInstance -CimSession $session -ClassName <class name> -Namespace <Name space name>

In my sample, the command is:

Get-CimInstance -CimSession $session -ClassName DCIM_SystemView -Namespace "root/dcim"

I have some posts talk about PowerShell. Here is the article to get space utilization of Windows Servers.

Cannot Open Cisco UCS KVM Console By Java

When you lunch KVM console in Cisco UCS Manager. You probably get following error message:

Unable to launch the application

Error: you can not run this program because your system deployment.config file states that an enterprise configuration file is mandatory…

This is caused by Java. There are two things you can try to fix KVM console:

  • Install Java on a directory without “space”. For example, install it on C:javajre7.
  • Delete Sun folder in C:windows. But please make a backup of the folder since it may contains some special configuration of your enterprise.

I have another blog talking about UCS KVM issue: Cisco UCS Blade Cannot Get IP Address for KVM

Emulex OneConnect OCe10102 on ESXi 6.0

Please refer to following post for basic troubleshooting of Emulex OneConnect.

How to Install Proper Drivers for 3rd Party Network Adapter on ESXi 5.x

I have a box uses Emulex OneConnect OCe10102 network adapters. The adapter is quite old and Emulex brand card doesn’t support ESXi 6.0. I upgraded the server to ESXi 6.0 and the Emulex adapters lost.

In the initial troubleshooting, I noticed that the adapters are still visible in BIOS. So it should be some driver level issues. I checked VMware Compatibility Guide. The model OCe10102 doesn’t support by ESXi 6.0.

If you run the following command you will still be able to see the adapters in PCI list on ESXi.

[code language="perl"]
esxcli hardware pci list
[/code]

So it indicates the adapters are not visible in ESXi since the newer Emulex driver doesn’t contain the model of the adapter in ESXi 6.0 native driver.

Then I uninstalled the native Emulex driver for ESXi 6.0 by the following command and rebooted the ESXi host.

[code language="perl"]
esxcli software vib remove -n elxnet
[/code]

The adapters still not visible after rebooting since no any drivers for Emulex adapters. Then I downloaded the Emulex drivers for ESXi 5.5 on VMware website and uploaded the “offline” package in the zip file to /tmp directory of the host. Then installed the driver by the following command:

[code language="perl"]
esxcli software vib install -d "/tmp/xxxxx.zip"
[/code]

The adapters appeared after rebooting the host.