VMware 虚拟机安装 Mac OS X Mountain Lion 苹果系统(vm9.0和Mac OS10.7)



苹果桌面操作系统 Mac OS X Mountain Lion(版本号为 Mac OS X v10.8)已于今年 7 月 21 日通过 Mac App Store 发布。未能上手 MacBook / iMac 的用户亦可通过一定的方法在普通电脑上安装 Mac OS X 并获得极佳的体验。

  本文将详细介绍如何在 VMware Workstation 8/9 下安装并使用 Mac OS X。VMware Workstation 是非常优秀的一款桌面虚拟化软件,不仅硬件兼容性高,功能也非常丰富,并能在普通家用电脑上实现很好的虚拟机操作使用体验,可以说并不亚于真实 Mac 机。(笔者在 2011 年 6 月份曾发表过一篇《普通 PC 电脑上安装苹果雪豹 Mac OS X Snow Leopard 教程》,但为避免及其繁琐的前期工作和应对驱动程序疑难,特撰写本文。)

  如果读者的机器配置在主流上下,那么完全可以抛弃传统的真实机分区安装法,而采用本文介绍的虚拟机法,不仅碰到的问题疑难大大减少,而且在使用 Mac OS X 得到的体验也是极佳的。(本教程对配置的需求:支持硬件虚拟化技术(Virtualization)的 CPU。目前主流的 Intel Core 系列和 AMD Athlon 系列的 CPU 均支持虚拟化技术,名称分别为 Intel VT-x 和 AMD-V。)

  本文中所涉及的工具和附件,请见本文末尾。

  全过程简述:

  1. 前期准备工作
  2. 安装 VMware
  3. 破解 VMware 支持 Mac OS X
  4. 在 VMware 中安装 Mac OS X
  5. 后期收尾工作

前期准备

  本教程所用的虚拟机法,前提是机器的 CPU 必须支持硬件虚拟化技术。读者可用 CPU-V 或 CPU-Z 等工具测试得出结果。开启 CPU 硬件虚拟化技术,可通过主板 BIOS 设置进行开启,读者可自行 Google 详细方法。

  下载 VMware 可前往 VMware Workstation 官网 或在 ed2k 网络中搜索下载(推荐)。此处不再纂述。

  关于 Mac OS X 苹果系统安装光盘镜像,请使用 dmg 格式的原始镜像。笔者推荐前往 ed2k 网络中搜索下载(推荐),关键字为“Mac OS X Mountain Lion dmg”或“Mac OS X Lion dmg”。此处不再纂述。

安装 VMware Workstation 8/9

  在本文中笔者采用 VMware Workstation 9 作为虚拟机软件,同时实践表明本文方法亦适用于 VMware Workstation 8。

破解 VMware Workstation 支持 Mac OS X

  此处我们需要用到工具“Workstation 8 and Fusion 4 Mac OS X Unlocker”(作者为 Zenith432),此工具用于破解 VMware Workstation 软件程序,使其支持 Mac OS X 的特性得到启用。该工具的最新版本 1.1.0 已支持 VMware Workstation 8、9 等各个版本。

  在安装 VMware Workstation 并完成重启后,完全解压 Unlocker 压缩包,以管理员模式运行 windows/install.cmd。(如图)

VMware 虚拟机安装 Mac OS X Mountain Lion 苹果系统

  Unlocker 将自动完成停止 VMware 服务、备份 VMware 程序文件、破解 VMware 程序文件、重新启动 VMware 服务等一系列操作,并将自动结束命令行窗口。(如图)

VMware 虚拟机安装 Mac OS X Mountain Lion 苹果系统

  未经破解的 VMware 新建虚拟机系统选择对话框:

VMware 虚拟机安装 Mac OS X Mountain Lion 苹果系统

  已破解后的 VMware 新建虚拟机系统选择对话框:

VMware 虚拟机安装 Mac OS X Mountain Lion 苹果系统

创建 用于 Mac OS X 的 VMware 虚拟机

  经过 Unlocker 破解后,启动 VMware Workstation 正常创建虚拟机,选择“Apple Mac OS X”(根据不同的 Mac OS 安装盘在系统版本中选择对应的正确版本,此处笔者使用的是 Mac OS X Mountain Lion,版本为 10.8 64-bit)。创建过程有以下几点非缺省配置:

  1. 在处理器选项中,选择“Number of cores per processor(每个处理器核心数量)”为 2 个,这样可诱导 VMware 虚拟机自动启用高级硬件虚拟化技术。(如图)

VMware 虚拟机安装 Mac OS X Mountain Lion 苹果系统

  2. 创建完成后,先点击“Edit virtual machine settings”编辑虚拟机配置,将硬件中的“Floppy(软驱)”删除,在显示选项中启用“Accelerate 3D graphics(3D 图形加速)”。(如图)

VMware 虚拟机安装 Mac OS X Mountain Lion 苹果系统

VMware 虚拟机安装 Mac OS X Mountain Lion 苹果系统

  3. 接上步的虚拟机配置中,在通用设置的增强虚拟键盘选项中选择“Use if available(如可用则启用)”。此举也是为了增强使用体验。(如图)

VMware 虚拟机安装 Mac OS X Mountain Lion 苹果系统

  4. 接上步的虚拟机配置中,在高级设置中,设置输入捕捉的优先级为“高”,并勾选“Disable memory page trimming(禁用内存页面微调)”。(如图)

VMware 虚拟机安装 Mac OS X Mountain Lion 苹果系统

  5. 用文本编辑工具(如记事本)编辑虚拟机文件(此处笔者的是 H:\Virtual Machines\Mac OS X\Mac OS X.vmx),在文件末尾新增一行:mainMem.useNamedFile = "FALSE"。此操作用于禁止 VMware 虚拟机在硬盘中放置内存镜像,可防止虚拟机运行过程中出现硬盘读写繁忙的惨状。(如图)

VMware 虚拟机安装 Mac OS X Mountain Lion 苹果系统

启动 VMware 虚拟机并安装 Mac OS X

  编辑虚拟机配置中的“CD/DVD(光驱)”选项,在“Use ISO image file(使用 ISO 镜像文件)”处选择我们的 Mac OS X 安装光盘镜像。(选择时请先在浏览文件对话框的文件类型中选择“所有文件 (*.*)”,即可看到文件名后缀为 dmg 的镜像文件。)确认完成后,启动 VMware 虚拟机。

  启动虚拟机后,虚拟机默认从光盘引导,在苹果 Logo 约两分钟后,正式来到 Mac OS X 安装界面。(如图)

VMware 虚拟机安装 Mac OS X Mountain Lion 苹果系统

  在“Mac OS X 实用工具”中选择“磁盘工具”,在左侧选中第一个硬盘,并在右侧选择“抹掉”(“格式”选择“Mac OS X 扩展(日志式)”),点击“抹掉”按钮以格式化当前硬盘。(如图)

VMware 虚拟机安装 Mac OS X Mountain Lion 苹果系统

VMware 虚拟机安装 Mac OS X Mountain Lion 苹果系统

  硬盘格式化分区完成后,回到“Mac OS X 实用工具”中点选“重新安装 Mac OS X”,进入安装过程。(如图)

VMware 虚拟机安装 Mac OS X Mountain Lion 苹果系统

VMware 虚拟机安装 Mac OS X Mountain Lion 苹果系统

VMware 虚拟机安装 Mac OS X Mountain Lion 苹果系统

VMware 虚拟机安装 Mac OS X Mountain Lion 苹果系统

 

黑苹果”的后期工作

  在 VMware 虚拟机中完成安装 Mac OS X 后,第一件事当然是安装 VMware Tools。VMware Tools 包括了 VMware 虚拟机的“硬件”驱动、虚拟机与宿主机间沟通的功能支持等。点选 VMware 菜单中的“VM”→“Install VMware Tools(安装 VMware Tools)”,载入 VMware Workstation 安装目录下的 darwin.iso 光盘镜像,确定后虚拟机中将自动弹出安装对话框。(如图)

VMware 虚拟机安装 Mac OS X Mountain Lion 苹果系统

VMware 虚拟机安装 Mac OS X Mountain Lion 苹果系统

VMware 安装 mac os x 的解锁工具 Mac OS X Unlocker for VMware ============================ 1. Introduction --------------- The package is a combination of the Unlocker code written by Zenith432 plus some scripts written by myself that wrap the actual unlocker code. It has been tested against: * Workstation 8.0/9.0 on Windows and Linux (32 & 64-bit versions) * Player 4.0/5.0 on Windows and Linux (32 & 64-bit versions) * Fusion 4.0/5.0 on Snow Leopard and Lion * ESXi 5.0/5.1 The patch code carries out the following modifications dependent on the product being patched: * Fix vmware-vmx and derivatives to allow Mac OS X to boot * Fix vmwarebase .dll or .so to allow Apple to be selected during creation * Copy darwin.iso if needed to VMware folder Note that not all products recognise the darwin.iso via install tools menu item. You will have to manually mount the darwin.iso for example on Workstation. Also Player is missing vmware-vmx-debug and vmware-vmx-stats files and so an error is shown during patching as the files are not found. This can be safely ignored. In all cases make sure VMware is not running, and any background guests have been shutdown. 2. Windows ---------- On Windows you will need to either run cmd.exe as Administrator or using Explorer right click on the command file and select "Run as administrator". install.cmd - patches VMware and copies darwin.iso tools image to VMware uninstall.cmd - restores VMware and removes darwin.iso tools image from VMware 3. Linux --------- On Linux you will need to be either root or use sudo to run the scripts. You may need to ensure the contents of the linux folder have execute permissions by running chmod +x against the 4 files. install.sh - patches VMware and copies darwin.iso tools image to VMware uninstall.sh - restores VMware and removes darwin.iso tools image from VMware 4. Mac OS X ----------- On Mac OS X you will need to be either root or use sudo to run the scripts. This is really only needed if you want to use client versions of Mac OS X. You may need to ensure the contents of the osx folder have execute permissions by running chmod +x against the 3 files. install.sh - patches VMware uninstall.sh - restores VMware 5. ESXi ------- ESXi has to be patched using the scripts, as the unlocker is used to overlay the ESXi firmware at runtime. You will need to transfer the files to the ESXi host either using vSphere client or SCP. Once uploaded you will need to either use the ESXi support console or use SSH to run the commands. Please note that you will need to reboot the host for the patches to become active. You may need to ensure the contents of the esxi folder have execute permissions by running chmod +x against the 3 files. install.sh - patches VMware uninstall.sh - restores VMware 6. Zenith432's Unlocker ----------------------- In all cases the unlocker can be run without the scripts but you would need to carry out additional actions which the scripts encapsulate for you especially on ESXi. If you want to run the unlocker directly the parameters are: Usage: ./Unlocker.Linux64 [-h] [-u] [target_directory] -h: print help -u: remove the patch target_directory: customize location of vmx executables On all platforms you must run it with administrator or root privileges. The source code is provided and Zenith432 makes it freely available for modification. In 1.1.0 I have modified the code and it is available as per Zenith432's original statement. Thanks to Zenith432 for building the unlocker and Mac Son of Knife for all the testing and support. Also to Albert Nietznie for original Workstation 7 code. History ------- 11/10/11 1.0.0 - First release 07/11/11 1.0.1 - Fixed typo in Windows command files 07/12/11 1.0.2 - Updated patcher and tools for latest release WKS 8.0.1 & FUS 4.1.1 10/05/12 1.1.0 - Changed the patching mechanism for vmwarebase .dll or .so & tested against ESXi 5.0 U1 and Tech Previews.
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值