一、在macOS系统中生成ISO文件:
1、在App Store中搜索、下载macOS Sierra系统。

App Store --> macos --> macOS Sierra --> DOWNLOAD

2、通过github下载OSX-KVM文件:

sh-3.2# git clone https://github.com/kholia/OSX-KVM.git

3、进入OSX-KVM目录,将下载的系统文件生成ISO文件(Install_macOS_10.12.6_Sierra.iso):

sh-3.2# ./create_install_iso.sh

二、在KVM机器中配置、创建虚拟机:

OS:Ubuntu 16.04.3
KVM:QEMU 2.5

1、安装QEMU及虚拟机管理工具:

root@rock-desktop:/# apt-get install qemu uml-utilities virt-manager

2、下载OSX-KVM配置文件:

root@rock-desktop:/# git clone https://github.com/kholia/OSX-KVM.git

3、创建虚拟硬盘文件:

root@rock-desktop:/# qemu-img create -f qcow2 /usr/local/src/vm/mac_hdd.qcow2 40G

4、修改虚拟机配置文件:

root@rock-desktop:/# vim /usr/local/src/OSX-KVM/macOS-libvirt.xml
<domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
<name>OSX_KVM</name>
<title>OSX-KVM</title>
<description># echo 1 > /sys/module/kvm/parameters/ignore_msrs</description>
<memory unit='KiB'>4194304</memory>
<currentMemory unit='KiB'>4194304</currentMemory>
<vcpu placement='static'>2</vcpu>
<os>
<type arch='x86_64' machine='pc-q35-2.4'>hvm</type>
<kernel>/usr/local/src/OSX-KVM/enoch_rev2889_boot</kernel>
</os>
<features>
<acpi/>
<kvm>
<hidden state='on'/>
</kvm>
</features>
<cpu mode='custom' match='exact'>
<model fallback='allow'>Penryn</model>
</cpu>
<devices>
<emulator>/usr/bin/qemu-system-x86_64</emulator>
<disk type='file' device='disk'>
<driver name='qemu' type='qcow2'/>
<source file='/usr/local/src/vm/mac_hdd.qcow2'/>
<target dev='sda' bus='sata'/>
<boot order='1'/>
<address type='drive' controller='0' bus='0' target='0' unit='0'/>
</disk>
<interface type='network'>
<source network='default'/>
<model type='e1000-82545em'/>
<address type='pci' domain='0x0000' bus='0x02' slot='0x02' function='0x0'/>
</interface>
<input type='mouse' bus='usb'/>
<input type='keyboard' bus='usb'/>
<graphics type='vnc' port='5900' autoport='no' listen='127.0.0.1' keymap='en-us'>
<listen type='address' address='127.0.0.1'/>
</graphics>
<video>
<model type='vmvga' vram='16384' heads='1'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/>
</video>
<memballoon model='none'/>
</devices>
<qemu:commandline>
<qemu:arg value='-device'/>
<qemu:arg value='isa-applesmc,osk=ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc'/>
<qemu:arg value='-smbios'/>
<qemu:arg value='type=2'/>
<qemu:arg value='-k'/>
<qemu:arg value='en-us'/>
<qemu:arg value='-cpu'/>
<qemu:arg value='Penryn,vendor=GenuineIntel'/>
<qemu:arg value='-device'/>
<qemu:arg value='ide-drive,bus=ide.1,drive=MacDVD'/>
<qemu:arg value='-drive'/>
<qemu:arg value='id=MacDVD,if=none,snapshot=on,file=/usr/local/src/iso/Install_macOS_Sierra_OS_X_10.12.iso'/>
</qemu:commandline>
</domain>

5、创建虚拟机:

root@rock-desktop:/# virsh define /usr/local/src/OSX-KVM/macOS-libvirt.xml

注:安装镜像ISO文件用原版的会有引导的问题,要找修改过Kernel的。

链接:http://pan.baidu.com/s/1qYbe12W 密码:6znh

此系统升级完之后也会有问题,建议不升级,或者找新的破解kernel。

总之坑很多。

在折腾过程中参考如下文档,在此表示感谢!

http://blog.csdn.net/z_yttt/article/details/69390250

KVM环境安装macOS Sierra的更多相关文章

  1. 安装macOS Sierra后怎么找回“任何来源”选项

    安装macOS Sierra后,会发现系统偏好设置的“安全与隐私”中默认已经去除了允许“任何来源”App的选项,无法运行一些第三方应用(提示xx.app已经损坏).如果需要恢复允许“任何来源”的选项, ...

  2. 【转】如何在VMware上安装macOS Sierra 10.12

    本文主要介绍目前网络上比较流行的使用预安装镜像安装macOS 10.12的方法,并以9月20号发布的最新GM版本16A323为例. 安装方案 破解VMware 创建虚拟机,加载预安装镜像 初始化mac ...

  3. VMware环境安装MacOS

    环境: win10专业版 VMware 14 Pro 开始吧 1. 停止服务 2. 解压并管理员权限运行unlocker,目的是使得 win10 环境下的 VMWare14Pro 支持 mac 系统的 ...

  4. macOS Sierra 10.12.6 odoo 10.0 开发环境配置

    参考了网上的一些教程,将最终过程记录一下,其中需要的一些程序,我已经放到百度网盘: https://pan.baidu.com/s/1boKHSTL 1.抹盘安装macOS Sierra 10.12. ...

  5. 黑苹果macOS Sierra 10.12 安装教程(venue11 pro测试)

    黑苹果macOS Sierra 10.12 安装教程(venue11 pro测试) 2017-03-12 03:46:24 by SemiconductorKING PS:刚刚装好黑苹果,来记录一篇折 ...

  6. macOS Sierra 最新系统找回允许任何软件安装

    终端输入就可以了 安装macOS Sierra后,会发现系统偏好设置的“安全与隐私”中默认已经去除了允许“任何来源”App的选项,无法运行一些第三方应用. 如果需要恢复允许“任何来源”的选项,即关闭G ...

  7. macOS Sierra 10.12.4 (16E195) - Clover [ 20170403 ]

    原文:https://user.qzone.qq.com/753313822/blog/1424460141?_t_=0.48652242555134495 建议使用 1920 * 1080 屏幕分辨 ...

  8. 在 VMware 中安装 MacOS 全记录

    在 VMware 15 中安装 MacOS Mojave 安装文件 下载:Unlocker v3.0 for VMware 15地址:https://github.com/DrDonk/unlocke ...

  9. kvm环境部署及常用指令

    Linux下通过kvm创建虚拟机,通过vnc连接,做好配置后,通过ssh登录,并开启iptables Kvm虚拟化搭建教程参考链接:https://jingyan.baidu.com/article/ ...

随机推荐

  1. ToroiseGit提交代码上传到阿里云的Gitlab

    https://blog.csdn.net/xiaomogg/article/details/51903004(copy) 准备 具体过程 准备 1.拥有一个GitHub账户 2.安装了Tortois ...

  2. IntelliJ IDEA启动Tomcat后,却无法访问Tomcat主页 等一系列问题

    1.IntelliJ IDEA启动Tomcat后,却无法访问Tomcat主页 转:http://www.myexception.cn/other/1998827.html https://blog.c ...

  3. DAY04、流程控制if、while、for

    一.if 判断 语法一: if 条件: # 以下是上一条if 的子代码块 print(子代码1) print(子代码2) print(子代码3) 示例: # 路边飘过一个生物,要不要表白? sex = ...

  4. MySQL系列:视图基本操作(3)

    1. 视图简介 1.1 视图定义 视图是一种虚拟的表,是从数据库中一个或多个表中导出来的表. 视图可以从已存在的视图的基础上定义. 数据库中只存放视图的定义,并没有存放视图中的数据,数据存放在原来的表 ...

  5. ABP实践学习

    一.

  6. Java 获取客户端ip返回127.0.0.1问题

    Java开发中使用 request.getRemoteAddr 获取客户端 ip ,返回结果始终为127.0.0.1.原因是服务器使用了nginx反向代理. 解决办法:在nginx配置文件nginx. ...

  7. Linux环境下安装NodeJS和mongoDB

    前面的话 本文将详细介绍如何下Linux环境下安装NodeJS和mongoDB NodeJS [1]使用二进制包安装 1.在官网下载Linux环境下的NodeJS安装包 2.通过xftp软件将安装包上 ...

  8. Android View相关知识问答

    Android View相关核心知识问答 Activity Window View之间的三角关系 你真的了解View的坐标吗? 在渲染前获取 View 的宽高 5种手势工具类 浅析Android的窗口

  9. 获取SpringMVC所有的rest接口及其对应函数信息

    package com.geostar.gfstack.operationcenter.core.cloud.action; import com.geostar.gfstack.operationc ...

  10. [SP1043] GSS1 - Can you answer these queries I

    传送门:>Here< 题意:求区间最大子段和 $N \leq 50000$ 包括多组询问(不需要支持修改) 解题思路 线段树的一道好题 我们可以考虑,如果一组数据全部都是正数,那么问题等同 ...