Virtual Box虛擬機安裝蘋果Monterey和big sur版本實踐

虛擬機安裝蘋果實踐,在Windows10系統,安裝Virtual Box7.1.6,安裝虛擬蘋果Monterey版本Monterey?(macOS 12) 。碰到的主要問題是安裝光盤不像Windows那么容易拿到,而且根據網上很多文章制作的光盤,在viritualBox里都無法引導啟動,最后只有一個big sur版本的iso可以啟動,見后面調試部分。

下載安裝軟件

?經過多次嘗試,只有這個鏈接里面拿到的Mac OS 盤是可以在virtualBox里引導啟動的。

這篇文檔里有個big sur版本mac的下載地址:VirtualBox 7.0 安裝 macOS big sur + Windows 11系統-零度博客

以下制作的iso光盤都無法在VirtualBox里引導啟動,留檔。?

嘗試下載10.12版本(無法啟動)

先下載一個較老的版本10.12,下載頁面:如何下載和安裝 macOS - 官方 Apple 支持 (中國)

具體下載鏈接:http://updates-http.cdn-apple.com/2019/cert/061-39476-20191023-48f365f4-0015-4c41-9f44-39d3d2aca067/InstallOS.dmg

轉換格式,到華軍軟件園下載轉換軟件:dmg轉iso(dmg2img)下載2025最新pc版_dmg轉iso(dmg2img)電腦版官方免費下載_華軍軟件園?

使用命令dmg2img.exe InstallOS.dmg InstallOS.iso 轉換:

e:\360Downloads>e:\tools\dmg2img\dmg2img.exe InstallOS.dmg InstallOS.isodmg2img v1.6.2 is derived from dmg2iso by vu1tur (to@vu1tur.eu.org)InstallOS.dmg --> InstallOS.isoreading property list, 306327 bytes from address 5007575287 ...decompressing:
opening partition 0 ...             100.00%  ok
opening partition 1 ...             100.00%  ok
opening partition 2 ...             100.00%  ok
opening partition 3 ...             100.00%  ok
opening partition 4 ...             100.00%  ok
opening partition 5 ...             100.00%  ok
opening partition 6 ...             100.00%  ok
opening partition 7 ...             100.00%  ok
opening partition 8 ...             100.00%  okArchive successfully decompressed as InstallOS.iso

經測試,這樣轉換的iso文件不行。

下載Big Sur和Monterey并轉換dmg到iso文件(無法啟動)

?如何在Windows 10的VirtualBox中安裝macOS High Sierra:如何在Windows 10的VirtualBox中安裝macOS High Sierra-騰訊云開發者社區-騰訊云

查看下載的安裝文件,在/Applications

Install macOS Big Sur.app

Install macOS Monterey.app

具體來說,Monterry的盤在這里:/Applications/Install macOS Monterey.app/Contents/SharedSupport

ls -l
total 24235624
-rw-r--r--  1 root  wheel  12408638012  2 27 20:19 SharedSupport.dmg

?創建空白磁盤

hdiutil create -o /tmp/HighSierra.cdr -size 7316m -layout SPUD -fs HFS+J

hdiutil create -o /tmp/Monterey.cdr -size 12412m -layout SPUD -fs HFS+J

掛載空白磁盤

hdiutil attach /tmp/Monterey.cdr.dmg -noverify -nobrowse -mountpoint /Volumes/install_build

掛載成功

hdiutil attach /tmp/Monterey.cdr.dmg -noverify -nobrowse -mountpoint /Volumes/install_build
/dev/disk3          	Apple_partition_scheme         	
/dev/disk3s1        	Apple_partition_map            	
/dev/disk3s2        	Apple_HFS                      	/Volumes/install_build

?從安裝程序中還原安裝鏡像到掛載的空白磁盤

asr restore --source "/Applications/Install macOS Monterey.app/Contents/SharedSupport/SharedSupport.dmg" --target /Volumes/Install_build --noprompt --noverify -erase

注意,原文檔里參數只有一個“-”,會報錯,要修改成兩個"--"

輸出信息說:

Restored target device is /dev/disk3s2.

也就是/dev/disk3s2 這個盤,掛載點為/Volumes/install_build ,已經做成MacOS啟動盤了

因為前面知道創建的空白磁盤是/dev/disk3,所以直接卸載它就行了。可以到“訪達”里用鼠標點擊卸載,也可以用命令

hdiutil detach /dev/disk3

將dmg變成iso

hdiutil convert /tmp/Monterey.cdr.dmg -format UDTO -o /tmp/Monterey.iso

完成:created: /tmp/Monterey.iso.cdr?

但是用這個文件在virtualbox里還是無法啟動。

嘗試學習用hdiutil轉換dmg到iso(無法啟動)?

hdiutil makehybrid  -iso -o Monterey.iso /tmp/Monterey.cdr.dmg 

執行這些命令:

首先,運行以下命令以創建空白磁盤映像:

hdiutil create -o /tmp/HighSierra.cdr -size 7316m -layout SPUD -fs HFS+J

接下來,掛載空白鏡像:

hdiutil attach /tmp/HighSierra.cdr.dmg -noverify -nobrowse -mountpoint /Volumes/install_build

現在,您將從安裝程序中還原BaseSystem.dmg到新安裝的映像:

asr restore -source /Applications/Install/macOS/High/Sierra.app/Contents/SharedSupport/BaseSystem.dmg -target /Volumes/Install_build -noprompt -noverify -erase

請注意,執行完此操作后,目標掛載點的名稱已更改為“ OS X Base System / System”。你幾乎已經完成!卸載圖像:

hdiutil detach /Volumes/OS/X/Base/System

最后,將您創建的映像轉換為ISO文件:

hdiutil convert /tmp/HighSierra.cdr.dmg -format UDTO -o /tmp/HighSierra.iso

將ISO移至桌面:

mv /tmp/HighSierra.iso.cdr ~/Desktop/HighSierra.iso

您已經擁有可引導的High Sierra ISO文件!

此方法未測試成功。

創建virtualbox mac虛擬機

知乎一篇文章講到這樣:

VBoxManage.exe modifyvm MacOS --cpuidset 00000001 000106e5 00100800 0098e3fd bfebfbffVBoxManage setextradata MacOS "VBoxInternal/Devices/efi/0/Config/DmiSystemProduct" "iMac11,3"VBoxManage setextradata MacOS "VBoxInternal/Devices/efi/0/Config/DmiSystemVersion" "1.0"VBoxManage setextradata MacOS "VBoxInternal/Devices/efi/0/Config/DmiBoardProduct" "Iloveapple"VBoxManage setextradata MacOS "VBoxInternal/Devices/smc/0/Config/DeviceKey" "ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc"VBoxManage setextradata MacOS "VBoxInternal/Devices/smc/0/Config/GetKeyFromRealSMC" 1# 修改屏幕分辨率為 1440 * 900
VBoxManage setextradata MacOS VBoxInternal2/EfiGopMode 4# VirtualBox5.2版本修改分辨率命令
VBoxManage setextradata MacOS VBoxInternal2/EfiGraphicsResolution 1440x900

其實應該不用吧,現在直接有macos的虛擬機選項了。

蘋果版本號對應表:

  1. Sonoma?(macOS 14)

    • 發布年份:2023
    • 主要特性:增強的桌面小部件、改進的游戲體驗、Safari 的新功能等。
  2. Ventura?(macOS 13)

    • 發布年份:2022
    • 主要特性:引入了 Stage Manager、改進的郵件和信息應用、增強的隱私保護等。
  3. Monterey?(macOS 12)

    • 發布年份:2021
    • 主要特性:引入了 Focus 模式、快捷指令、Universal Control 等。
  4. Big Sur?(macOS 11)

    • 發布年份:2020
    • 主要特性:全新的用戶界面設計、控制中心、改進的 Safari 瀏覽器等。
  5. Catalina?(macOS 10.15)

    • 發布年份:2019
    • 主要特性:引入了 Sidecar、屏幕時間、完全移除 iTunes 等。
  6. Mojave?(macOS 10.14)

    • 發布年份:2018
    • 主要特性:引入了黑暗模式、桌面堆棧、改進的屏幕截圖工具等。
  7. High Sierra?(macOS 10.13)

    • 發布年份:2017
    • 主要特性:引入了 APFS 文件系統、改進的照片應用、Metal 2 圖形技術等。
  8. Sierra?(macOS 10.12)

    • 發布年份:2016
    • 主要特性:引入了 Siri、優化的文件管理、Apple Pay 支持等。
  9. El Capitan?(macOS 10.11)

    • 發布年份:2015
    • 主要特性:改進的窗口管理、Split View、增強的 Spotlight 搜索等。
  10. Yosemite?(macOS 10.10)

    • 發布年份:2014
    • 主要特性:全新的用戶界面設計、Handoff 功能、改進的通知中心等。

其它學習

下載mac軟件

參考:Making the installer in macOS | OpenCore Install Guide

Using App Store
From a macOS machine that meets the requirements of the OS version you want to install, go directly to the App Store and download the desired OS release and continue to Setting up the installer.
#
Command Line Software Update Utility
Open a terminal window then copy and paste the below command:
sh
softwareupdate --list-full-installers; echo; echo "Please enter version number you wish to download:"; read REPLY; [ -n "$REPLY" ] && softwareupdate --fetch-full-installer --full-installer-version "$REPLY"

This gives you a list of available releases you can choose from. Once downloaded it will be saved in your Applications folder. You can continue to Setting up the installer.
#
Munki's InstallInstallMacOS utility
Note for users running macOS Monterey 12.3 or above
In order to run it, just copy and paste the below command in a terminal window:
sh
mkdir -p ~/macOS-installer && cd ~/macOS-installer && curl https://raw.githubusercontent.com/munki/macadmin-scripts/main/installinstallmacos.py > installinstallmacos.py && sudo
?python installinstallmacos.py

As you can see, we get a nice list of macOS installers. If you need a particular versions of macOS, you can select it by typing the number next to it. For this example we'll choose 10:

This is going to take a while as we're downloading the entire 8GB+ macOS installer, so it's highly recommended to read the rest of the guide while you wait.
Once finished, you'll find in your ~/macOS-Installer/ folder a DMG containing the macOS Installer, called Install_macOS_11.1-20C69.dmg for example. Mount it and you'll find the installer application.
? Note: We recommend to move the Install macOS.app into the /Applications folder, as we'll be executing commands from there.
? Note 2: Running Cmd+Shift+G in Finder will allow you to easily jump to ~/macOS-installer


From here, jump to Setting up the installer to finish your work. If you want to check the integrity of your download, you can check this repository of checks

softwareupdate --list-full-installers; echo; echo "Please enter version number you wish to download:"; read REPLY; [ -n "$REPLY" ] && softwareupdate --fetch-full-installer --full-installer-version "$REPLY"

參考如何在windows下安裝mac虛擬機安裝 | PingCode智庫

使用VirtualBox安裝macOS

1、安裝Oracle VM VirtualBox

下載并安裝VirtualBox。完成后,安裝VirtualBox擴展包以獲得更好的性能和更多的功能。

2、創建新的虛擬機

打開VirtualBox,點擊“新建”。

  • 輸入虛擬機名稱,類型選擇“Mac OS X”,版本選擇對應的macOS版本,點擊“下一步”。
  • 分配內存大小,建議至少分配8GB,點擊“下一步”。
  • 創建虛擬硬盤,選擇“VDI(VirtualBox磁盤映像)”,點擊“下一步”。
  • 硬盤類型選擇“動態分配”,點擊“下一步”。
  • 指定虛擬硬盤文件的位置和大小,點擊“創建”。

3、加載macOS鏡像文件

  • 右鍵點擊創建好的虛擬機,選擇“設置”。
  • 在“系統”選項中,確保啟用“EFI(特殊操作系統的唯一固件接口)”。
  • 在“存儲”選項中,選擇“空”,然后點擊光盤圖標,選擇“選擇虛擬光盤文件”,選擇macOS鏡像文件。

4、運行命令行配置(這個非必須)

關閉VirtualBox,打開命令提示符(以管理員身份運行),運行以下命令來配置虛擬機:

cd "C:Program FilesOracleVirtualBox"

VBoxManage modifyvm "你的虛擬機名稱" --cpuidset 00000001 000106e5 00100800 0098e3fd bfebfbff

VBoxManage setextradata "你的虛擬機名稱" "VBoxInternal/Devices/efi/0/Config/DmiSystemProduct" "iMac11,3"

VBoxManage setextradata "你的虛擬機名稱" "VBoxInternal/Devices/efi/0/Config/DmiSystemVersion" "1.0"

VBoxManage setextradata "你的虛擬機名稱" "VBoxInternal/Devices/efi/0/Config/DmiBoardProduct" "Iloveapple"

VBoxManage setextradata "你的虛擬機名稱" "VBoxInternal/Devices/smc/0/Config/DeviceKey" "ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc"

VBoxManage setextradata "你的虛擬機名稱" "VBoxInternal/Devices/smc/0/Config/GetKeyFromRealSMC" 1

5、啟動虛擬機并安裝macOS

  • 打開VirtualBox,啟動虛擬機。
  • 虛擬機會啟動macOS安裝程序,按照提示進行安裝。

實踐下來,啟動非常慢,大約要20-30分鐘才能進入mac安裝界面

調試

啟動后無法從光盤啟動。

解決中。經過多次嘗試,只有這個鏈接里面拿到的Mac OS 盤是可以在virtualBox里引導啟動的。

這篇文檔里有個big sur版本mac的下載地址:VirtualBox 7.0 安裝 macOS big sur + Windows 11系統-零度博客

這個盤是可以啟動的?

啟動后報錯:

Failed to query SMC value from the host (VERR_INVALID_HANDLE).

返回?代碼:

E_FAIL (0x80004005)

組件:

ConsoleWrap

界面:

IConsole {6ac83d89-6ee7-4e33-8ae6-b257b2e81be8}

嘗試禁用禁用SMC查詢

?VBoxManage.exe setextradata "MacOS" "VBoxInternal/Devices/smc/0/Config/GetKeyFromRealSMC" 0

確實管用,又重復原來無法從光盤啟動的問題了。光盤啟動問題解決見上面。

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/web/70919.shtml
繁體地址,請注明出處:http://hk.pswp.cn/web/70919.shtml
英文地址,請注明出處:http://en.pswp.cn/web/70919.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

dify基礎之prompts

摘要:在大型語言模型(LLM)應用中,Prompt(提示詞)是連接用戶意圖與模型輸出的核心工具。本文從概念、組成、設計原則到實踐案例,系統講解如何通過Prompt解鎖LLM的潛能,提升生成內容的…

【學寫LibreCAD】0 仿寫LibreCAD簡介

一、LibreCAD 核心模塊: 核心模塊(Core) 功能:處理 CAD 的核心邏輯,如幾何計算、圖形對象管理、坐標系轉換等。關鍵組件: 圖形對象:如直線、圓、圓弧、多段線等。數學工具:向量、矩…

HTML元素,標簽到底指的哪塊部分?單雙標簽何時使用?

1. 標簽&#xff08;Tag&#xff09; vs 元素&#xff08;Element&#xff09; 標簽&#xff08;Tag&#xff09; 標簽是 HTML 中用于定義元素的符號&#xff0c;用尖括號 < > 包裹。例如 <img> 是標簽。元素&#xff08;Element&#xff09; 元素是由 標簽 內容…

Android APK組成編譯打包流程詳解

Android APK&#xff08;Android Package&#xff09;是 Android 應用的安裝包文件&#xff0c;其組成和打包流程涉及多個步驟和文件結構。以下是詳細的說明&#xff1a; 一、APK 的組成 APK 是一個 ZIP 格式的壓縮包&#xff0c;包含應用運行所需的所有文件。解壓后主要包含以…

Token相關設計

文章目錄 1. 雙Token 機制概述1.1 訪問令牌&#xff08;Access Token&#xff09;1.2 刷新令牌&#xff08;Refresh Token&#xff09; 2. 雙Token 認證流程3. Spring Boot 具體實現3.1 生成 Token&#xff08;使用 JWT&#xff09;3.2 解析 Token3.3 登錄接口&#xff08;返回…

HTTP 請求時傳遞多部分表單數據

HTTP 請求時傳遞多部分表單數據&#xff08;multipart/form-data&#xff09; --data-raw $------demo11111\r\nContent-Disposition: form-data; name"Filedata"; filename"截屏2025-02-27 15.45.46.png"\r\nContent-Type: image/png\r\n\r\n\r\n------d…

Java基礎關鍵_013_日期處理

目 錄 一、傳統 API 1.System.currentTimeMillis() &#xff08;1&#xff09;說明 &#xff08;2&#xff09;實例 2.構造方法 &#xff08;1&#xff09;說明 &#xff08;2&#xff09;無參構造 &#xff08;3&#xff09;有參構造 3.日期格式化 &#xff08;1&am…

51單片機中reg52.h與regx52.h在進行位操作時的不同

reg52.h中不能使用例如 P2_0;這樣的定義 而只能使用 P2^0;這樣的定義 但是都不可以對位進行直接賦值操作&#xff1b; 而 regx52.h中可以使用 P2_0和P2^0&#xff1b;但是只有使用下劃線的才可以對位進行賦值操作 例如P2_0 1; 但不可以是P2^0 1; 在 C 語言中&#xff0c;…

基于Rook的Ceph云原生存儲部署與實踐指南(上)

#作者&#xff1a;任少近 文章目錄 1 Ceph環境準備2 rook部署ceph群集2.1 Rook 幫助地址2.2 安裝ceph2.3 獲取csi鏡像2.4 Master參加到osd2.5 設置默認存儲 3 Rook部署云原生RBD塊存儲3.1 部署storageclass資源3.2 部署WordPress使用RBD3.3 WordPress訪問 4 Rook部署云原生RGW…

FastExcel與Reactor響應式編程深度集成技術解析

一、技術融合背景與核心價值 在2025年企業級應用開發中&#xff0c;大規模異步Excel處理與響應式系統架構的結合已成為技術剛需。FastExcel與Reactor的整合方案&#xff0c;通過以下技術協同實現突破性性能&#xff1a; 內存效率革命&#xff1a;FastExcel的流式字節操作與Re…

DeepSeek R1/V3滿血版——在線體驗與API調用

前言&#xff1a;在人工智能的大模型發展進程中&#xff0c;每一次新模型的亮相都宛如一顆投入湖面的石子&#xff0c;激起層層波瀾。如今&#xff0c;DeepSeek R1/V3 滿血版強勢登場&#xff0c;為大模型應用領域帶來了全新的活力與變革。 本文不但介紹在線體驗 DeepSeek R1/…

Spring Data JPA 中的分頁實現:從 BasePage 到 Pageable

文章目錄 Spring Data JPA 中的分頁實現&#xff1a;從 BasePage 到 Pageable背景&#xff1a;為什么需要分頁&#xff1f;認識 BasePage 類深入 toPageable() 方法1. 處理頁碼和頁面大小2. 處理排序方向3. 處理排序字段4. 生成 Pageable 對象 實戰&#xff1a;如何使用 BasePa…

Android Studio 新版本Gradle發布本地Maven倉庫示例

發布代碼到JitPack示例&#xff1a;https://blog.csdn.net/loutengyuan/article/details/145938967 以下是基于 Android Studio 24.2.2&#xff08;Gradle 8.10.2 AGP 8.8.0 JDK17&#xff09; 的本地 Maven 倉庫發布示例&#xff0c;包含aar和jar的不同配置&#xff1a; 1.…

python量化交易——金融數據管理最佳實踐——qteasy創建本地數據源

文章目錄 qteasy金融歷史數據管理總體介紹本地數據源——DataSource對象默認數據源查看數據表查看數據源的整體信息最重要的數據表其他的數據表 從數據表中獲取數據向數據表中添加數據刪除數據表 —— 請盡量小心&#xff0c;刪除后無法恢復&#xff01;&#xff01;總結 qteas…

Android中使用Robolectric測試點擊事件(不需要手機)

文章目錄 一、前言二、簡單示例三、參考文檔 一、前言 Robolectric 是一個由 Google 維護的開源 Android 測試框架&#xff0c;它允許你以 Android 運行時環境運行單元測試。 Robolectric 提供了一個模擬 Android 運行時環境&#xff0c;允許你測試你的代碼是否正確地使用 And…

Spring Boot 接口 JSON 序列化優化:忽略 Null 值的九種解決方案詳解

一、針對特定接口null的處理&#xff1a; 方法一&#xff1a;使用 JsonInclude 注解 1.1 類級別&#xff1a;在接口返回的 ?DTO 類或字段? 上添加 JsonInclude 注解&#xff0c;強制忽略 null 值&#xff1a; 類級別&#xff1a;所有字段為 null 時不返回 JsonInclude(Js…

ds回答-開源llm應用開發平臺

以下是幾個著名的開源 LLM 應用開發平臺&#xff0c;涵蓋不同場景和技術特點&#xff1a; 1. Dify 特點&#xff1a;低代碼 / 無代碼開發、支持 RAG 檢索、Agent 智能體、模型管理、LLMOps 全流程優化。核心功能&#xff1a;可視化工作流編排、數百種模型兼容&#xff08;如 GP…

LDR6020 PD3.1 協議芯片在特定設備中的應用

在電子設備互聯互通的時代&#xff0c;芯片技術成為提升設備性能與功能的關鍵驅動力。LDR6020 PD3.1 協議芯片以其出色的性能&#xff0c;在 TYPE-C 臺式顯示器 / 便攜顯示器、一拖二快充線以及手機電腦轉接器等設備中展現出獨特價值&#xff0c;為用戶帶來更便捷、高效的使用體…

wzl-django學習

####################################################總的urls.py from django.contrib import admin from django.urls import path,include, re_path from django.views.static import serve from django.conf import settings from drf_yasg import openapi from drf_yas…

python -ssh學習

def exe_sshcmd(ip,username,userpswd,port,cmd): """ 功能&#xff1a;SSH登錄到指定設備&#xff0c;并執行對應的命令 入參&#xff1a;前四項為ssh登錄shell的ip和port&#xff0c;具備管理員權限的用戶名和密碼&#xff0c; cmd可以…