The (almost) definitive guide for installing MacOS 10.14 (Mojave) on ESXi 6.7 (WiP)

Hi all,

This was originally a post asking for the definitive guide. Since I did not get a response, I continued tinkering. I eventually was able to patch something together based on other tutorials. Below what I have done.

 

If you run into issues or mistakes from my end, or certain steps don’t turn out to be necessary, please comment below so we can make this guide complete!

 

Starting point

  • ESXi 6.7 installed and working
  • My hardware: Fujitsu D3417-B2 (Intel C236), Xeon E3-1245 v6, 32GB RAM, 1250 GB SSDs and 8 TB HDDs
  • This guide assumes that all steps are executed on a mac; most can be done on most other operating systems as well, except for Step 3.

 

Aim
Installing fully functional version of macOS Mojave on ESXi. Why would one want this? I upgraded my server and installed ESXi (a virtualisation hypervisor) to run several operating systems side by side. Since the server is now located near my desk, I wanted to use the opportunity to also use that system as a workstation for some of my photo hobby stuff, rather than using my work MBP.

 

High-level steps

  1. Install ESXi (not covered here)
  2. Install Unlocker
  3. Create a bootable ISO
  4. Create a new virtual machine
  5. Install macOS
  6. Install VMware Tools

 

Required files

  • Unlocker. Latest version verified for ESXi is v.3.0.0 (https://www.insanelymac.com/forum/files/file/964-macos-unlocker-v30-for-vmware-esxi/ ; credits to @Donk; you need to be logged in to download)
  • MacOS Mojave (See instructions below. For this, you need a macOS machine)
  • VMware Tools for macOS (https://www.insanelymac.com/forum/files/file/31-vmware-tools-for-os-x-darwiniso/ ; credits to @MSoK; you need to be logged in to download)

 

Step 2: Install Unlocker
Normally, macOS can only be installed on Apple hardware. The unlocker will modify ESXi to accept non-Apple hardware for macOS VMs.

  • Using the link above, download Unlocker and upload the file to your ESXi systems
  • Enable SSH in ESXi
  • Open a terminal window
  • SSH into ESXi (“ssh login_name@ESXi_IP”)
  • Navigate to the folder where you uploaded the unlocker (datastores are located in “/vmfs/volumes/“
  • Unpack the Unlocker (“tar xzvf esxi-unlocker-xxx.tgz”)
  • You may need to make the script executable. This can by done by typing “sudo chmod -x esxi-install.sh” (you will likely be asked for your password)
  • Run the script using “./esxi-install.sh”
  • Reboot ESXi

 

Step 3a: Download MacOS Mojave
This is easy if you have a MacOS machine. There are other sources, but I would not recommend using them for security reasons

  • Within the Mac App Store find MacOS Mojave: https://itunes.apple.com/us/app/macos-mojave/id1398502828?ls=1&mt=12
  • Click “Get” and the update process starts
  • Depending on the version of macOS installed, the update process will automatically halt after download or you will need to press CMD+Q as soon as the download is finished
  • As a result you will find a new ‘app’ in your applications folder: “Install macOS Mojave.app”

 

Step 3b: Create a bootable ISO
From the file above, we need to create a bootable ISO. Bill Plein made an excellent script for this that you can use one-on-one: https://blog.plein.org/2018/09/28/creating-a-macos-10-14-mojave-installation-iso/

  • Open the Textedit app and create a new file
  • In the app’s preferences choose ‘Plain text’ as the document format
  • Paste the script and save as “mk-mojave-iso.sh”
  • Open a Terminal window and navigate to the folder with the script
  • You may need to make the script executable. This can by done by typing “sudo chmod -x mk-mojave-iso.sh” (you will likely be asked for your password)
  • Then run the script: “./mk-mojave-iso.sh”
  • The script will run for a couple of minutes and as a result a file named “Mojave.iso” will be placed on your desktop
  • Upload the file to ESXi
  • NB: the file will be stored on your Desktop and hence possibly automatically synced with your iCloud, make sure to remove/delete it to save iCloud space

 

Step 4: Create a new virtual machine

  • Log into the ESXi web interface
  • From the Virtual Machines section click “Create / Register VM”
  • Click “Create a new virtual machine”
  • Give it whatever name you like
  • Choose “Mac OS” as the guest OS
  • Choose “Apple Mac OS X 10.14 (64-bit)” as the guest OS version
  • Choose the datastore you want to use
  • I opted to use 2 cores, 100GB and 4GB in RAM
  • Make sure to give the VM a unique MAC address by setting it to manual under Network Adapter 1 (I took the server’s MAC address and added ‘1’ to the last digit)
  • I chose adapter type E1000e for no particular reason, other than that one was required in one of my other OSs
  • As CD/DVD Drive 1, choose Datastore ISO file, make sure “Connect at power on” is checked and choose the bootable ISO that you uploaded
  • Click “Finish” to create the VM

 

Step 5: Install MacOS

  • Run the VM you have just created
  • If everything worked correctly, the VM will boot from the bootable ISO (The screen will say it is “attempting to start up from … Virtual SATA CDROM Drive (1.0)”). If not, the ISO file was likely not created correctly (Step 3) or it was not properly mounted in Step 4.
  • You will see the white Apple logo and a progress bar
  • You will be asked to select your language
  • Then you will enter the setup menu, choose “Disk Utility”
  • Select the “VMware Virtual S..” on the left and choose “Erase”, this will format your virtual drive. You can give it any name you want (I went traditional with “Macintosh HD”, I chose “Mac OS Extended (Journaled)” as the format and “GUID Partition Map” as the scheme).
  • When formatted, you can continue the installation process (this mostly speaks for itself). You are asked several questions. I opted out of all things that would send data to Apple (location services, Apple ID) as I do not want to load their infrastructure with my system. Please share whether you succeeded if you have chosen otherwise.
  • You should now be able to boot into a working version of MacOS

 

Step 6: Install VMware Tools 
Finally, it is recommended to install VMware Tools. More info: https://www.vmware.com/support/ws5/doc/new_guest_tools_ws.html. It can be downloaded here: https://www.insanelymac.com/forum/files/file/31-vmware-tools-for-os-x-darwiniso/ (com.vmware.fusion.tools.darwin.zip.tar; extract and find darwin.iso)

  • Upload Darwin.iso to an ESXi datastore
  • Shut down the running MacOS VM (if you hadn’t done so already)
  • Edit the settings of the VM and navigate to the CD/DVD drive: replace the MacOS bootable ISO with the Darwin.iso file
  • Save and start the MacOS VM
  • When started, the darwin.iso should be mounted and you should be able to install VMware Tools

 

Acknowledgements
To tinker together the above, I used (amongst others) the below:

 

Open questions / TODO’s

  • How to realise video passthrough?
  • Add screenshots

 

I hope this is helpful; please share your experience so we can refine this guide if needed!

 

Thanks! J

Edited January 15 by 3JL

解决ESXi虚拟机MacOS10.14全屏问题! 20Y0205 在ESXi6.7下安装黑苹果 ##主要事项 ###必备的材料 1. 制作macOS10.14的ISO镜像文件「10.15怕不兼容回头再测试」 2. 下载Unlocker3.0 for ESXi 「这个找了很久拼合了几个下载资源才凑齐」 3. VMWare Tools for macOS10.14 [这个也是找了很久从官网下载了Fusion的更新版本中再解包出来的DarWin11.0版本才能用] ###注意的要点 1. 安装镜像之前需要先用Unlocker解锁一下「可能心里安慰作用,没试过不用是啥样子」 2. 安装镜像的时候先要在启动安装界面右上角的菜单里把硬盘格式化一下,否则进入安装流程了就没盘可装…… 3. 在安装完成后,重启时再用Command+R的快捷进入恢复「recover」模式,把安全模式禁用掉,不然VMWareTools不会起效;命令行是:`csrutil disable` 4. 需要在命令行中输入修改分辨率的命令才能调整虚拟机的显示分辨率「实际上还有更改主机系统Vga文件的方法,但是没搞到最新版本的文件无法执行」命令行是: ``` sudo nvram AC20C489-DD86-4E99-992C-B7C742C1DDA9:width=%80%07%00%00 sudo nvram AC20C489-DD86-4E99-992C-B7C742C1DDA9:height=%38%04%00%00 ``` 对应的是1920*1080分辨率; 如果需要Macbook Pro全屏是2560 x 1600那么就应该是: ``` sudo nvram AC20C489-DD86-4E99-992C-B7C742C1DDA9:width=%00%0A%00%00 sudo nvram AC20C489-DD86-4E99-992C-B7C742C1DDA9:height=%40%06%00%00 ``` 最后记得在macOS的这个虚拟机的设置里修改:操作-->编辑设置-->显卡:选成“自动检测设置” 以上每改一项都记得重启一次哦^_^
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值