<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet href="https://www.bigdick.live/feed_style.xsl" type="text/xsl"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="zh-Hans">
    <tabi:metadata xmlns:tabi="https://github.com/welpo/tabi">
        <tabi:base_url>https:&#x2F;&#x2F;www.bigdick.live</tabi:base_url>
        <tabi:separator>
            •
        </tabi:separator>
        <tabi:about_feeds>这是Web Feed，又称为Atom Feed，把现在的网址复制到新闻阅读器即可订阅本站文章。造访「About Feeds」来了解更多资讯。</tabi:about_feeds>
        <tabi:visit_the_site>造访网站</tabi:visit_the_site>
        <tabi:recent_posts>近期文章</tabi:recent_posts>
        <tabi:last_updated_on>更新于 $DATE</tabi:last_updated_on>
        <tabi:default_theme></tabi:default_theme>
        <tabi:post_listing_date>date</tabi:post_listing_date>
        <tabi:current_section>虚拟机</tabi:current_section>
    </tabi:metadata><link rel="extra-stylesheet" href="https://www.bigdick.live/skins/black-orange.css?h=c64b7f81e34a143cd725" /><title>孙瑜 - 虚拟机</title>
        <subtitle>孙瑜的个人首页：生物信息、数据科学、软件工程，以及公开简历、项目和文章。</subtitle>
    <link href="https://www.bigdick.live/tags/xu-ni-ji/atom.xml" rel="self" type="application/atom+xml"/>
    <link href="https://www.bigdick.live/tags/xu-ni-ji/" rel="alternate" type="text/html"/>
    <generator uri="https://www.getzola.org/">Zola</generator><updated>2024-07-07T00:00:00+00:00</updated><id>https://www.bigdick.live/tags/xu-ni-ji/atom.xml</id><entry xml:lang="zh-Hans">
        <title>在VirtualBox里安装macOS</title>
        <published>2024-07-07T00:00:00+00:00</published>
        <updated>2024-07-07T00:00:00+00:00</updated>
        <author>
            <name>孙瑜</name>
        </author>
        <link rel="alternate" href="https://www.bigdick.live/blog/macos14-virtualbox/" type="text/html"/>
        <id>https://www.bigdick.live/blog/macos14-virtualbox/</id>
        
            <content type="html">&lt;h2 id=&quot;jing-xiang-wen-jian&quot;&gt;镜像文件&lt;&#x2F;h2&gt;
&lt;p&gt;可能我姿势不对，Sonoma是万万不行的，最后还是装了High Sierra。&lt;&#x2F;p&gt;
&lt;p&gt;我们只能用ISO：&lt;a class=&quot;external&quot; rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;ia800409.us.archive.org&#x2F;28&#x2F;items&#x2F;mac-os-high-sierra-10.13_202204&#x2F;macOS%20HighSierra%2010.13.iso&quot;&gt;下载链接&lt;&#x2F;a&gt;（可能会失效，如果瓜了可以留言，我尝试传一份到其他地方）。&lt;&#x2F;p&gt;
&lt;p&gt;关于ISO和DMG的区别，以及如何从官方的DMG制作ISO镜像，可以参照&lt;a class=&quot;external&quot; rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;iboysoft.com&#x2F;howto&#x2F;macos-sonoma-iso.html&quot;&gt;这篇post&lt;&#x2F;a&gt;。&lt;&#x2F;p&gt;
&lt;h2 id=&quot;chuang-jian-xu-ni-ji&quot;&gt;创建虚拟机&lt;&#x2F;h2&gt;
&lt;p&gt;下载安装最新的VirtualBox，不赘述了，但注意还要安装&lt;strong&gt;Extension Pack&lt;&#x2F;strong&gt;。&lt;&#x2F;p&gt;
&lt;p&gt;然后用头先的镜像文件创建虚拟机：&lt;&#x2F;p&gt;
&lt;p&gt;&lt;img src=&quot;https:&#x2F;&#x2F;www.bigdick.live&#x2F;blog&#x2F;macos14-virtualbox&#x2F;new.png&quot; alt=&quot;new.png&quot; &#x2F;&gt;&lt;&#x2F;p&gt;
&lt;p&gt;下面是一些关键设置。芯片组一定要选&lt;strong&gt;ICH9&lt;&#x2F;strong&gt;，并&lt;strong&gt;启用EFI&lt;&#x2F;strong&gt;：&lt;&#x2F;p&gt;
&lt;p&gt;&lt;img src=&quot;https:&#x2F;&#x2F;www.bigdick.live&#x2F;blog&#x2F;macos14-virtualbox&#x2F;system.png&quot; alt=&quot;system.png&quot; &#x2F;&gt;&lt;&#x2F;p&gt;
&lt;p&gt;至少给128M的显存，并且尽量&lt;strong&gt;启用3D加速&lt;&#x2F;strong&gt;：&lt;&#x2F;p&gt;
&lt;p&gt;&lt;img src=&quot;https:&#x2F;&#x2F;www.bigdick.live&#x2F;blog&#x2F;macos14-virtualbox&#x2F;display.png&quot; alt=&quot;display.png&quot; &#x2F;&gt;&lt;&#x2F;p&gt;
&lt;p&gt;还需要一些额外配置，需要先完全退出VirtualBox，然后&lt;strong&gt;以管理员权限运行&lt;&#x2F;strong&gt;PowerShell或者终端，定位到VirtualBox安装的位置（默认是下面的位置），执行几条命令：&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;cd &amp;quot;C:\Program Files\Oracle\VirtualBox\&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;.&#x2F;VBoxManage.exe modifyvm &amp;quot;VM NAME&amp;quot; --cpuidset 00000001 000106e5 00100800 0098e3fd bfebfbff&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;.&#x2F;VBoxManage setextradata &amp;quot;VM NAME&amp;quot; &amp;quot;VBoxInternal&#x2F;Devices&#x2F;efi&#x2F;0&#x2F;Config&#x2F;DmiSystemProduct&amp;quot; &amp;quot;iMac19,3&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;.&#x2F;VBoxManage setextradata &amp;quot;VM NAME&amp;quot; &amp;quot;VBoxInternal&#x2F;Devices&#x2F;efi&#x2F;0&#x2F;Config&#x2F;DmiSystemVersion&amp;quot; &amp;quot;1.0&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;.&#x2F;VBoxManage setextradata &amp;quot;VM NAME&amp;quot; &amp;quot;VBoxInternal&#x2F;Devices&#x2F;efi&#x2F;0&#x2F;Config&#x2F;DmiBoardProduct&amp;quot; &amp;quot;Iloveapple&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;.&#x2F;VBoxManage setextradata &amp;quot;VM NAME&amp;quot; &amp;quot;VBoxInternal&#x2F;Devices&#x2F;smc&#x2F;0&#x2F;Config&#x2F;DeviceKey&amp;quot; &amp;quot;ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;.&#x2F;VBoxManage setextradata &amp;quot;VM NAME&amp;quot; &amp;quot;VBoxInternal&#x2F;Devices&#x2F;smc&#x2F;0&#x2F;Config&#x2F;GetKeyFromRealSMC&amp;quot; 1&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;当中的&lt;code&gt;&quot;VM NAME&quot;&lt;&#x2F;code&gt;替换成创建虚拟机时设置的名字即可。&lt;&#x2F;p&gt;
&lt;p&gt;然后重新打开VirtualBox的界面，选中头先创建的苹果虚拟机，尝试安装系统&lt;sup class=&quot;footnote-reference&quot; id=&quot;fr-1-1&quot;&gt;&lt;a href=&quot;#fn-1&quot;&gt;1&lt;&#x2F;a&gt;&lt;&#x2F;sup&gt;。&lt;&#x2F;p&gt;
&lt;p&gt;接下来还可能遇到一个恶心的问题，我忘了截图，大概是说程序已损坏，这个时候要断开host的网络，关掉时间自动同步，手动设置时间到2017年（High Sierra发行的年份）。&lt;&#x2F;p&gt;
&lt;p&gt;效果图：&lt;&#x2F;p&gt;
&lt;p&gt;&lt;img src=&quot;https:&#x2F;&#x2F;www.bigdick.live&#x2F;blog&#x2F;macos14-virtualbox&#x2F;success.png&quot; alt=&quot;&quot; &#x2F;&gt;&lt;&#x2F;p&gt;
&lt;p&gt;折腾一圈下来觉得用起来太卡了，刚好手边还有一台CPU和集显适配的小电脑，还是决定搞一个黑苹果。&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;.&#x2F;VBoxManage setextradata &amp;quot;VM NAME&amp;quot; &amp;quot;VBoxInternal&#x2F;Devices&#x2F;smc&#x2F;0&#x2F;Config&#x2F;GetKeyFromRealSMC&amp;quot; 0&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;后可以正常启动了。&lt;&#x2F;p&gt;
&lt;section class=&quot;footnotes&quot;&gt;
&lt;ol class=&quot;footnotes-list&quot;&gt;
&lt;li id=&quot;fn-1&quot;&gt;
&lt;p&gt;可能会出现如下图的报错：
&lt;img src=&quot;https:&#x2F;&#x2F;www.bigdick.live&#x2F;blog&#x2F;macos14-virtualbox&#x2F;smc_error.png&quot; alt=&quot;smc_error.png&quot; &#x2F;&gt;
&lt;a class=&quot;external&quot; rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.reddit.com&#x2F;r&#x2F;VFIO&#x2F;comments&#x2F;tkqsx4&#x2F;comment&#x2F;kc78it0&#x2F;&quot;&gt;据说&lt;&#x2F;a&gt;是BIOS中Hyper-V设置的问题（也可能直接就不支持Hyper-V），我暂时没时间验证，改成 &lt;a href=&quot;#fr-1-1&quot;&gt;↩&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;&#x2F;section&gt;
</content>
        <summary type="html">穷人没有苹果，却要调试苹果的程序，太痛苦了</summary>
        </entry>
</feed>
