当前位置:   article > 正文

Ubuntu 22.04.6 | QEMU KVM 安装 macOS虚拟机_kvm安装macos

kvm安装macos

参考https://github.com/kholia/OSX-KVM

更新软件源

sudo apt-get update
  • 1

环境要求

  1. A modern Linux distribution. E.g. Ubuntu 22.04 LTS 64-bit or later.
  2. QEMU >= 6.2.0
  3. A CPU with Intel VT-x / AMD SVM support is required (grep -e vmx -e svm /proc/cpuinfo)
  4. A CPU with SSE4.1 support is required for >= macOS Sierra
  5. A CPU with AVX2 support is required for >= macOS Mojave

安装需要的软件包

  1. 安装 QEMU 和其他软件包。
sudo apt-get install qemu uml-utilities virt-manager git \
    wget libguestfs-tools p7zip-full make dmg2img tesseract-ocr \
    tesseract-ocr-eng genisoimage -y
  • 1
  • 2
  • 3
  1. 克隆OSX-KVM代码(macOS运行的虚拟机)
    首先进入当前用户目录下
cd ~
  • 1

然后克隆仓库代码
国外(二选一)

git clone --depth 1 --recursive https://github.com/y141111/OSX-KVM.git
  • 1

国内(二选一)

git clone --depth 1 --recursive https://gitee.com/y141111/OSX-KVM.git
  • 1

进入克隆的代码目录

cd OSX-KVM
  • 1
  1. 获取macOS安装包
./fetch-macOS-v2.py
  • 1

将下载的dmg文件转换为img文件

dmg2img -i BaseSystem.dmg BaseSystem.img
  • 1

创建将在其中安装 macOS 的虚拟硬盘映像。如果将 磁盘映像的名称 从 到其他内容,引导脚本 将需要更新以指向新的映像名称。mac_hdd_ng.img

qemu-img create -f qcow2 mac_hdd_ng.img 128G
  • 1

安装

  • CLI 方法(主要)。只需运行脚本即可启动 安装过程。OpenCore-Boot.sh
./OpenCore-Boot.sh
  • 1

注意:此脚本适用于所有最新的 macOS 版本。

  • 使用 macOS 安装程序中的工具进行分区,以及 格式化附加到 macOS 虚拟机的虚拟磁盘。Disk Utility

  • 继续,并安装 macOS

    声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/空白诗007/article/detail/973326
推荐阅读
相关标签