This commit is contained in:
2026-02-11 09:55:06 +00:00
commit da4b7c19bf
313 changed files with 93710 additions and 0 deletions

360
2024/12/08/simulator.html Normal file
View File

@@ -0,0 +1,360 @@
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<!-- Begin Jekyll SEO tag v2.8.0 -->
<title>关于OS模拟器的探索 | Mayx的博客</title>
<meta name="generator" content="Jekyll v3.9.5" />
<meta property="og:title" content="关于OS模拟器的探索" />
<meta name="author" content="mayx" />
<meta property="og:locale" content="zh_CN" />
<meta name="description" content="在一个系统模拟另一个系统有多困难呢?" />
<meta property="og:description" content="在一个系统模拟另一个系统有多困难呢?" />
<meta property="og:site_name" content="Mayx的博客" />
<meta property="og:type" content="article" />
<meta property="article:published_time" content="2024-12-08T00:00:00+08:00" />
<meta name="twitter:card" content="summary" />
<meta property="twitter:title" content="关于OS模拟器的探索" />
<meta name="google-site-verification" content="huTYdEesm8NaFymixMNqflyCp6Jfvd615j5Wq1i2PHc" />
<meta name="msvalidate.01" content="0ADFCE64B3557DC4DC5F2DC224C5FDDD" />
<meta name="yandex-verification" content="fc0e535abed800be" />
<script type="application/ld+json">
{"@context":"https://schema.org","@type":"BlogPosting","author":{"@type":"Person","name":"mayx"},"dateModified":"2024-12-08T00:00:00+08:00","datePublished":"2024-12-08T00:00:00+08:00","description":"在一个系统模拟另一个系统有多困难呢?","headline":"关于OS模拟器的探索","mainEntityOfPage":{"@type":"WebPage","@id":"/2024/12/08/simulator.html"},"publisher":{"@type":"Organization","logo":{"@type":"ImageObject","url":"https://avatars0.githubusercontent.com/u/17966333"},"name":"mayx"},"url":"/2024/12/08/simulator.html"}</script>
<!-- End Jekyll SEO tag -->
<link rel="canonical" href="https://mabbs.github.io/2024/12/08/simulator.html" />
<link type="application/atom+xml" rel="alternate" href="/atom.xml" title="Mayx的博客" />
<link rel="alternate" type="application/rss+xml" title="Mayx的博客(RSS)" href="/rss.xml" />
<link rel="alternate" type="application/json" title="Mayx的博客(JSON Feed)" href="/feed.json" />
<link rel="stylesheet" href="/assets/css/style.css?v=1770803700" />
<!--[if !IE]> -->
<link rel="stylesheet" href="/Live2dHistoire/live2d/css/live2d.css" />
<!-- <![endif]-->
<link rel="search" type="application/opensearchdescription+xml" href="/opensearch.xml" title="Mayx的博客" />
<link rel="webmention" href="https://webmention.io/mabbs.github.io/webmention" />
<link rel="pingback" href="https://webmention.io/mabbs.github.io/xmlrpc" />
<link rel="preconnect" href="https://summary.mayx.eu.org" crossorigin="anonymous" />
<link rel="prefetch" href="https://www.blogsclub.org/badge/mabbs.github.io" as="image" />
<link rel="blogroll" type="text/xml" href="/blogroll.opml" />
<link rel="me" href="https://github.com/Mabbs" />
<script src="/assets/js/jquery.min.js"></script>
<!--[if lt IE 9]>
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery-ajaxtransport-xdomainrequest/1.0.3/jquery.xdomainrequest.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
<script>
var lastUpdated = new Date("Wed, 11 Feb 2026 17:55:00 +0800");
var BlogAPI = "https://summary.mayx.eu.org";
</script>
<script src="/assets/js/main.js"></script>
<!--[if !IE]> -->
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async="async" src="https://www.googletagmanager.com/gtag/js?id=UA-137710294-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-137710294-1');
</script>
<script src="/assets/js/instant.page.js" type="module"></script>
<!-- <![endif]-->
</head>
<body>
<!--[if !IE]> --><noscript><marquee style="top: -15px; position: relative;"><small>发现当前浏览器没有启用JavaScript这不影响你的浏览但可能会有一些功能无法使用……</small></marquee></noscript><!-- <![endif]-->
<!--[if IE]><marquee style="top: -15px; position: relative;"><small>发现当前浏览器为Internet Explorer这不影响你的浏览但可能会有一些功能无法使用……</small></marquee><![endif]-->
<div class="wrapper">
<header class="h-card">
<h1><a class="u-url u-uid p-name" rel="me" href="/">Mayx的博客</a></h1>
<img src="https://avatars0.githubusercontent.com/u/17966333" fetchpriority="high" class="u-photo" alt="Logo" style="width: 90%; max-width: 300px; max-height: 300px;" />
<p class="p-note">Mayx's Home Page</p>
<form action="/search.html">
<input type="text" name="keyword" id="search-input-all" placeholder="Search blog posts.." />&#160;<input type="submit" value="搜索" />
</form>
<br />
<p class="view"><a class="u-url" href="/Mabbs/">About me</a></p>
<ul class="downloads">
<li style="width: 270px; border-right: none;"><a href="/MayxBlog.tgz">Download <strong>TGZ File</strong></a></li>
</ul>
</header>
<section class="h-entry">
<small><time class="date dt-published" datetime="2024-12-08T00:00:00+08:00">8 December 2024</time> - 字数统计2400 - 阅读大约需要7分钟 - Hits: <span id="/2024/12/08/simulator.html" class="visitors">Loading...</span></small>
<h1 class="p-name">关于OS模拟器的探索</h1>
<p class="view">by <a class="p-author h-card" href="//github.com/Mabbs">mayx</a></p>
<div id="outdate" style="display:none;">
<hr /><p>
这是一篇创建于 <span id="outime"></span> 天前的文章,其中的信息可能已经有所发展或是发生改变。
</p>
</div>
<script>
daysold = Math.floor((new Date().getTime() - new Date("Sun, 08 Dec 2024 00:00:00 +0800").getTime()) / (24 * 60 * 60 * 1000));
if (daysold > 90) {
document.getElementById("outdate").style.display = "block";
document.getElementById("outime").innerHTML = daysold;
}
</script>
<hr />
<b>AI摘要</b>
<p id="ai-output">这篇文章主要探讨了系统模拟器的技术细节特别是如何区分虚拟机和模拟器以及提到几个例子如MuMu NebulaWindows模拟Android、WSLLinux模拟Windows、DarlingLinux模拟macOS和Wine跨平台模拟。文章指出MuMu Nebula作为不使用硬件虚拟化技术的模拟器其特点是轻量级、省内存且共享空间但性能可能不如虚拟机。作者也提到Wine的成功部分归功于Windows软件生态的丰富。文章最后感慨模拟器技术虽有优势但因为技术难度高和商业可行性低而鲜有企业投入多数模拟器项目因此搁浅。</p>
<hr />
<ul><li><a href="#起因">起因</a></li><li><a href="#关于虚拟机和模拟器的区别">关于虚拟机和模拟器的区别</a></li><li><a href="#各种各样的os模拟器">各种各样的OS模拟器</a><ul><li><a href="#mumu-nebulawindows模拟android">MuMu NebulaWindows模拟Android</a></li><li><a href="#wsl1windows模拟linux">WSL1Windows模拟Linux</a></li><li><a href="#darlinglinux模拟macos">DarlingLinux模拟macOS</a></li><li><a href="#winelinuxmacos模拟windows">WineLinux/macOS模拟Windows</a></li><li><a href="#其他古董模拟器">其他古董模拟器</a></li></ul></li><li><a href="#感想">感想</a></li></ul>
<hr />
<main class="post-content e-content" role="main"><p>在一个系统模拟另一个系统有多困难呢?<!--more--></p>
<h1 id="起因">
<a href="#起因"><svg class='octicon' viewBox='0 0 16 16' version='1.1' width='16' height='32' aria-hidden='true'><path fill-rule='evenodd' d='M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z'></path></svg></a> 起因
</h1>
<p>前段时间我在网上和人聊天的时候谈到了安卓模拟器在我看来所有除了Linux上可以使用例如Waydroid的<a href="/2023/12/24/android.html">容器原生运行Android</a>之外,其他系统只能通过虚拟机的方式运行,毕竟不用虚拟机能在完全不相干的系统上运行安卓我感觉还是挺不可思议的。不过随后就被打脸了🤣,网易在前几年出过一个包含“星云引擎”的安卓模拟器——<a href="https://www.mumuplayer.com/mumu-nebula.html">MuMu Nebula</a>,据说这个模拟器是不需要使用虚拟化技术的。所以这次我打算探索一下这个安卓模拟器和它类似的模拟器。</p>
<h1 id="关于虚拟机和模拟器的区别">
<a href="#关于虚拟机和模拟器的区别"><svg class='octicon' viewBox='0 0 16 16' version='1.1' width='16' height='32' aria-hidden='true'><path fill-rule='evenodd' d='M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z'></path></svg></a> 关于虚拟机和模拟器的区别
</h1>
<p>在我看来模拟硬件的就是虚拟机模拟软件的就是模拟器。不过现在这些挺难分的融合的也挺多。比如QEMU+KVM使用硬件虚拟化显然是虚拟机QEMU System模式使用二进制翻译的方式模拟硬件也是虚拟机但是QEMU User模式使用了当前系统的资源没有模拟硬件所以应该是模拟器不过也有叫仿真器的……不过也许不是这样模拟指令集也算虚拟了一个CPU吧像Java虚拟机似乎就是这样只是单模拟一个CPU叫虚拟机又感觉不太对……并且macOS的Rosetta 2甚至还有硬件加速硬件模拟x86的内存一致性模型还有用了AOT已经翻译完的程序再执行那应该不算模拟器吧……另外还有什么容器之类的……搞得这些概念很难分清。 </p><p>
那至少使用了硬件虚拟化技术的肯定是虚拟机吧其实这也不一定现在的Windows有个叫“基于虚拟化的安全性”的功能使用了硬件虚拟化技术但是不能说现在的Windows是运行在虚拟机上吧这些大公司搞的乱七八糟的黑科技把我都绕晕了😂。 </p><p>
总之接下来我要说的模拟器是一定基于某个系统然后模拟另一个系统的环境不使用硬件虚拟化技术而且翻译的不是「指令集」而是「系统调用」这样感觉才算我心目中的模拟器🫠也就是OS模拟器。</p>
<h1 id="各种各样的os模拟器">
<a href="#各种各样的os模拟器"><svg class='octicon' viewBox='0 0 16 16' version='1.1' width='16' height='32' aria-hidden='true'><path fill-rule='evenodd' d='M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z'></path></svg></a> 各种各样的OS模拟器
</h1>
<h2 id="mumu-nebulawindows模拟android">
<a href="#mumu-nebulawindows模拟android"><svg class='octicon' viewBox='0 0 16 16' version='1.1' width='16' height='32' aria-hidden='true'><path fill-rule='evenodd' d='M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z'></path></svg></a> MuMu NebulaWindows模拟Android
</h2>
<p>既然是因为网易的模拟器进行的探索肯定要先讲这个啦。首先看介绍它是专为“低端电脑”制作的模拟器所以整个软件都是32位的而且不用VT说明老到不支持硬件虚拟化的CPU都可以运行不过那样的CPU估计至少是15年前的吧😝。安装后首先会下载Android的镜像但不像其他安卓模拟器最后使用的是一个磁盘镜像文件而是像WSL1那样把所有文件都放在一个文件夹里。至于里面的文件就是和正常的32位Android x86差不多甚至还有兼容ARM的libhoudini.so文件。然后启动模拟器后可以在任务管理器中看到有许多“nebula.exe”进程这让我想到了Wine看起来在模拟器中的每个安卓进程都对应着一个“nebula.exe”进程。这么来看这个星云引擎应该相当于安卓特别精简版的WSL1。 </p><p>
其实当时WSA出之前我以为微软会用WSL1的技术做WSA结果和WSL2一起用了虚拟机太令人失望了😅。而且用类似WSL1技术的居然还让网易整出来了……虽然到现在WSA已经凉了这个星云引擎也是没什么热度不过单从技术上来说我觉得还是这种要好因为这种模拟器省<strong>内存</strong>,可以共用<strong>磁盘空间</strong>,不像其他模拟器,就算虚拟机有什么气球驱动动态调整分配的内存,总是不如这种现用现申请的好。不过从速度上来说和虚拟机版安卓模拟器拉不开什么差距,技术难度估计也比虚拟机高很多,大概因为这样,所以它也凉了吧。</p>
<h2 id="wsl1windows模拟linux">
<a href="#wsl1windows模拟linux"><svg class='octicon' viewBox='0 0 16 16' version='1.1' width='16' height='32' aria-hidden='true'><path fill-rule='evenodd' d='M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z'></path></svg></a> WSL1Windows模拟Linux
</h2>
<p>网易那个就挺像WSL1的不过很明显WSL1出的早另外和Windows结合的更深可以直接在任务管理器中管理WSL1中的进程。虽然有些人说WSL1的BUG很多但对我来说我是一个都没碰到过用起来还是挺不错的……虽然不支持Docker这也是它对我来说唯一的缺陷。不过我要是用Docker一般是在Hyper-V中单独安一个虚拟机来操作因为WSL2和Docker desktop的内存不好控制虚拟机限制起来比较方便。如果需要在Windows用到Linux的时候就安WSL1因为省内存而且和Windows共用同一个IP。不过要是安装了Nvidia显卡的话好像还是得用WSL2我一般没这个需求所以不存在这种问题。</p>
<h2 id="darlinglinux模拟macos">
<a href="#darlinglinux模拟macos"><svg class='octicon' viewBox='0 0 16 16' version='1.1' width='16' height='32' aria-hidden='true'><path fill-rule='evenodd' d='M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z'></path></svg></a> DarlingLinux模拟macOS
</h2>
<p>之前我在玩旧电脑的时候试过<a href="/2024/04/06/old-pc.html#%E5%85%B3%E4%BA%8Edarling%E7%9A%84%E6%8E%A2%E7%B4%A2">Darling</a>不过用的都是超老的电子垃圾因为指令集的原因费了不少功夫才跑起来😂不过就算用正常电脑跑这个感觉也没啥意义除了项目本身很不成熟很多软件跑不起来另外到现在也没有做出来ARM版x86的macOS马上就要被抛弃了如果没有搞出ARM版这个项目就更没什么意义了。</p>
<h2 id="winelinuxmacos模拟windows">
<a href="#winelinuxmacos模拟windows"><svg class='octicon' viewBox='0 0 16 16' version='1.1' width='16' height='32' aria-hidden='true'><path fill-rule='evenodd' d='M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z'></path></svg></a> WineLinux/macOS模拟Windows
</h2>
<p>Wine我用的还挺多的因为我现在用的是MacBook<a href="/2023/10/21/game.html#%E4%BD%BF%E7%94%A8wine%E6%B8%B8%E7%8E%A9windows%E6%B8%B8%E6%88%8F">在macOS上玩Windows游戏</a>就得用Wine另外也<a href="/2024/10/13/arm-linux.html#%E8%BD%AC%E8%AF%91%E5%BA%94%E7%94%A8%E6%B5%8B%E8%AF%95">在树莓派上试过ExaGear+Wine</a>,其实说来这个项目和使用虚拟机相比,不仅更省内存,而且性能要比虚拟机好得多,除了兼容性不太行之外其他都挺好的,看来省内存是模拟器的特色啊。</p>
<h2 id="其他古董模拟器">
<a href="#其他古董模拟器"><svg class='octicon' viewBox='0 0 16 16' version='1.1' width='16' height='32' aria-hidden='true'><path fill-rule='evenodd' d='M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z'></path></svg></a> 其他古董模拟器
</h2>
<p>这种倒是挺多的像DOSBox还有GBA模拟器之类的我以前在手机上就试过<a href="/2020/09/27/vm.html#%E6%89%8B%E6%9C%BA%E7%9A%84%E8%99%9A%E6%8B%9F%E6%9C%BA%E4%BD%BF%E7%94%A8%E5%8F%B2">用DOSBox Turbo安装Windows3.2</a>也用GBA模拟器玩过宝可梦不过这些其实不算我心目中的模拟器😆因为它们不是翻译的系统调用而是模拟了一块古董CPU然后装了对应的系统能直接用只不过大家都说这类算模拟器所以提了一下。</p>
<h1 id="感想">
<a href="#感想"><svg class='octicon' viewBox='0 0 16 16' version='1.1' width='16' height='32' aria-hidden='true'><path fill-rule='evenodd' d='M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z'></path></svg></a> 感想
</h1>
<p>看起来模拟器相比虚拟机还是有很多优势啊,省<strong>内存</strong>这一优势还是很重要的,虽然现在内存倒是不贵 <del>(苹果内存除外🤣)</del> ,但是消耗本不必要的内存就是浪费吧。只不过这种东西对技术要求果然还是太高了,实在是费力不讨好,所以没有企业愿意投入精力来做,所以就都凉了啊…… </p><p>
不过Wine倒是活得不错大概是因为Windows的软件太多了吧……生态很重要啊。</p></main>
<small style="display: block">tags: <a rel="category tag" class="p-category" href="/search.html?keyword=%E6%A8%A1%E6%8B%9F%E5%99%A8"><em>模拟器</em></a> - <a rel="category tag" class="p-category" href="/search.html?keyword=Windows"><em>Windows</em></a> - <a rel="category tag" class="p-category" href="/search.html?keyword=Android"><em>Android</em></a> - <a rel="category tag" class="p-category" href="/search.html?keyword=Linux"><em>Linux</em></a> - <a rel="category tag" class="p-category" href="/search.html?keyword=macOS"><em>macOS</em></a> <span style="float: right;"><a href="https://gitlab.com/mayx/mayx.gitlab.io/tree/master/_posts/2024-12-08-simulator.md">查看原始文件</a></span></small>
<h4 style="border-bottom: 1px solid #e5e5e5;margin: 2em 0 5px;">推荐文章</h4>
<p id="suggest-container">Loading...</p>
<script>
var suggest = $("#suggest-container");
$.get(BlogAPI + "/suggest?id=/2024/12/08/simulator.html&update=" + lastUpdated.valueOf(), function (data) {
if (data.length) {
getSearchJSON(function (search) {
suggest.empty();
var searchMap = {};
for (var i = 0; i < search.length; i++) {
searchMap[search[i].url] = search[i];
}
var tooltip = $('<div class="content-tooltip"></div>').appendTo('body').hide();
for (var j = 0; j < data.length; j++) {
var item = searchMap[data[j].id];
if (item) {
var link = $('<a href="' + item.url + '">' + item.title + '</a>');
var contentPreview = item.content.substring(0, 100);
if (item.content.length > 100) {
contentPreview += "……";
}
link.hover(
function(e) {
tooltip.text($(this).data('content'))
.css({
top: e.pageY + 10,
left: e.pageX + 10
})
.show();
},
function() {
tooltip.hide();
}
).mousemove(function(e) {
tooltip.css({
top: e.pageY + 10,
left: e.pageX + 10
});
}).data('content', contentPreview);
suggest.append(link);
suggest.append(' - ' + item.date + '<br />');
}
}
});
} else {
suggest.html("暂无推荐文章……");
}
});
</script>
<br />
<div class="pagination">
<span class="prev">
<a href="/2024/11/02/trojan.html">
上一篇关于Python制作的木马探索
</a>
</span>
<br />
<span class="next">
<a href="/2024/12/29/vm.html">
下一篇ESXi和PVE的使用体验与对比
</a>
</span>
</div>
<!--[if !IE]> -->
<link rel="stylesheet" href="/assets/css/gitalk.css">
<script src="/assets/js/gitalk.min.js"></script>
<div id="gitalk-container"></div>
<script>
var gitalk = new Gitalk({
clientID: '36557aec4c3cb04f7ac6',
clientSecret: 'ac32993299751cb5a9ba81cf2b171cca65879cdb',
repo: 'mabbs.github.io',
owner: 'Mabbs',
admin: ['Mabbs'],
id: '/2024/12/08/simulator', // Ensure uniqueness and length less than 50
distractionFreeMode: false, // Facebook-like distraction free mode
proxy: "https://cors-anywhere.mayx.eu.org/?https://github.com/login/oauth/access_token"
})
gitalk.render('gitalk-container')
</script>
<!-- <![endif]-->
</section>
<!--[if !IE]> -->
<div id="landlord" style="left:5px;bottom:0px;">
<div class="message" style="opacity:0"></div>
<canvas id="live2d" width="500" height="560" class="live2d"></canvas>
<div class="live_talk_input_body">
<form id="live_talk_input_form">
<div class="live_talk_input_name_body" >
<input type="checkbox" id="load_this" />
<input type="hidden" id="post_id" value="/2024/12/08/simulator.html" />
<label for="load_this">
<span style="font-size: 11px; color: #fff;">&#160;想问这篇文章</span>
</label>
</div>
<div class="live_talk_input_text_body">
<input name="talk" type="text" class="live_talk_talk white_input" id="AIuserText" autocomplete="off" placeholder="要和我聊什么呀?" />
<button type="submit" class="live_talk_send_btn" id="talk_send">发送</button>
</div>
</form>
</div>
<input name="live_talk" id="live_talk" value="1" type="hidden" />
<div class="live_ico_box" style="display:none;">
<div class="live_ico_item type_info" id="showInfoBtn"></div>
<div class="live_ico_item type_talk" id="showTalkBtn"></div>
<div class="live_ico_item type_music" id="musicButton"></div>
<div class="live_ico_item type_youdu" id="youduButton"></div>
<div class="live_ico_item type_quit" id="hideButton"></div>
<input name="live_statu_val" id="live_statu_val" value="0" type="hidden" />
<audio src="" style="display:none;" id="live2d_bgm" data-bgm="0" preload="none"></audio>
<input id="duType" value="douqilai" type="hidden" />
</div>
</div>
<div id="open_live2d">召唤伊斯特瓦尔</div>
<!-- <![endif]-->
<footer>
<p>
<small>Made with ❤ by Mayx<br />Last updated at 2026-02-11 17:55:00<br /> 总字数617672 - 文章数179 - <a href="/atom.xml" >Atom</a> - <a href="/README.html" >About</a></small>
</p>
</footer>
</div>
<script src="/assets/js/scale.fix.js"></script>
<!--[if !IE]> -->
<script src="/assets/js/main_new.js"></script>
<script src="/Live2dHistoire/live2d/js/live2d.js"></script>
<script src="/Live2dHistoire/live2d/js/message.js"></script>
<!-- <![endif]-->
</body>
</html>

369
2024/12/29/vm.html Normal file
View File

@@ -0,0 +1,369 @@
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<!-- Begin Jekyll SEO tag v2.8.0 -->
<title>ESXi和PVE的使用体验与对比 | Mayx的博客</title>
<meta name="generator" content="Jekyll v3.9.5" />
<meta property="og:title" content="ESXi和PVE的使用体验与对比" />
<meta name="author" content="mayx" />
<meta property="og:locale" content="zh_CN" />
<meta name="description" content="装虚拟机用什么系统更好呢?" />
<meta property="og:description" content="装虚拟机用什么系统更好呢?" />
<meta property="og:site_name" content="Mayx的博客" />
<meta property="og:type" content="article" />
<meta property="article:published_time" content="2024-12-29T00:00:00+08:00" />
<meta name="twitter:card" content="summary" />
<meta property="twitter:title" content="ESXi和PVE的使用体验与对比" />
<meta name="google-site-verification" content="huTYdEesm8NaFymixMNqflyCp6Jfvd615j5Wq1i2PHc" />
<meta name="msvalidate.01" content="0ADFCE64B3557DC4DC5F2DC224C5FDDD" />
<meta name="yandex-verification" content="fc0e535abed800be" />
<script type="application/ld+json">
{"@context":"https://schema.org","@type":"BlogPosting","author":{"@type":"Person","name":"mayx"},"dateModified":"2024-12-29T00:00:00+08:00","datePublished":"2024-12-29T00:00:00+08:00","description":"装虚拟机用什么系统更好呢?","headline":"ESXi和PVE的使用体验与对比","mainEntityOfPage":{"@type":"WebPage","@id":"/2024/12/29/vm.html"},"publisher":{"@type":"Organization","logo":{"@type":"ImageObject","url":"https://avatars0.githubusercontent.com/u/17966333"},"name":"mayx"},"url":"/2024/12/29/vm.html"}</script>
<!-- End Jekyll SEO tag -->
<link rel="canonical" href="https://mabbs.github.io/2024/12/29/vm.html" />
<link type="application/atom+xml" rel="alternate" href="/atom.xml" title="Mayx的博客" />
<link rel="alternate" type="application/rss+xml" title="Mayx的博客(RSS)" href="/rss.xml" />
<link rel="alternate" type="application/json" title="Mayx的博客(JSON Feed)" href="/feed.json" />
<link rel="stylesheet" href="/assets/css/style.css?v=1770803700" />
<!--[if !IE]> -->
<link rel="stylesheet" href="/Live2dHistoire/live2d/css/live2d.css" />
<!-- <![endif]-->
<link rel="search" type="application/opensearchdescription+xml" href="/opensearch.xml" title="Mayx的博客" />
<link rel="webmention" href="https://webmention.io/mabbs.github.io/webmention" />
<link rel="pingback" href="https://webmention.io/mabbs.github.io/xmlrpc" />
<link rel="preconnect" href="https://summary.mayx.eu.org" crossorigin="anonymous" />
<link rel="prefetch" href="https://www.blogsclub.org/badge/mabbs.github.io" as="image" />
<link rel="blogroll" type="text/xml" href="/blogroll.opml" />
<link rel="me" href="https://github.com/Mabbs" />
<script src="/assets/js/jquery.min.js"></script>
<!--[if lt IE 9]>
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery-ajaxtransport-xdomainrequest/1.0.3/jquery.xdomainrequest.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
<script>
var lastUpdated = new Date("Wed, 11 Feb 2026 17:55:00 +0800");
var BlogAPI = "https://summary.mayx.eu.org";
</script>
<script src="/assets/js/main.js"></script>
<!--[if !IE]> -->
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async="async" src="https://www.googletagmanager.com/gtag/js?id=UA-137710294-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-137710294-1');
</script>
<script src="/assets/js/instant.page.js" type="module"></script>
<!-- <![endif]-->
</head>
<body>
<!--[if !IE]> --><noscript><marquee style="top: -15px; position: relative;"><small>发现当前浏览器没有启用JavaScript这不影响你的浏览但可能会有一些功能无法使用……</small></marquee></noscript><!-- <![endif]-->
<!--[if IE]><marquee style="top: -15px; position: relative;"><small>发现当前浏览器为Internet Explorer这不影响你的浏览但可能会有一些功能无法使用……</small></marquee><![endif]-->
<div class="wrapper">
<header class="h-card">
<h1><a class="u-url u-uid p-name" rel="me" href="/">Mayx的博客</a></h1>
<img src="https://avatars0.githubusercontent.com/u/17966333" fetchpriority="high" class="u-photo" alt="Logo" style="width: 90%; max-width: 300px; max-height: 300px;" />
<p class="p-note">Mayx's Home Page</p>
<form action="/search.html">
<input type="text" name="keyword" id="search-input-all" placeholder="Search blog posts.." />&#160;<input type="submit" value="搜索" />
</form>
<br />
<p class="view"><a class="u-url" href="/Mabbs/">About me</a></p>
<ul class="downloads">
<li style="width: 270px; border-right: none;"><a href="/MayxBlog.tgz">Download <strong>TGZ File</strong></a></li>
</ul>
</header>
<section class="h-entry">
<small><time class="date dt-published" datetime="2024-12-29T00:00:00+08:00">29 December 2024</time> - 字数统计3699 - 阅读大约需要11分钟 - Hits: <span id="/2024/12/29/vm.html" class="visitors">Loading...</span></small>
<h1 class="p-name">ESXi和PVE的使用体验与对比</h1>
<p class="view">by <a class="p-author h-card" href="//github.com/Mabbs">mayx</a></p>
<div id="outdate" style="display:none;">
<hr /><p>
这是一篇创建于 <span id="outime"></span> 天前的文章,其中的信息可能已经有所发展或是发生改变。
</p>
</div>
<script>
daysold = Math.floor((new Date().getTime() - new Date("Sun, 29 Dec 2024 00:00:00 +0800").getTime()) / (24 * 60 * 60 * 1000));
if (daysold > 90) {
document.getElementById("outdate").style.display = "block";
document.getElementById("outime").innerHTML = daysold;
}
</script>
<hr />
<b>AI摘要</b>
<p id="ai-output">这篇文章对比了ESXi和PVE在虚拟机使用体验上的优缺点。ESXi因其界面简洁、管理体验友好且更稳定但由于是VMware vSphere的一部分非免费且可能需要付费许可证而PVE功能更丰富支持LXC容器和Linux上的更多兼容性但界面设计感不强容易出现各种小问题且对系统管理要求较高。总的来说ESXi适合不想花时间解决问题和技术背景较稳定的人PVE适合小公司或希望探索Linux底层管理的用户但风险也相对较大。</p>
<hr />
<ul><li><a href="#起因">起因</a></li><li><a href="#esxi和pve的对比">ESXi和PVE的对比</a><ul><li><a href="#界面与体验">界面与体验</a></li><li><a href="#虚拟机管理">虚拟机管理</a></li><li><a href="#存储管理">存储管理</a></li><li><a href="#网络管理">网络管理</a></li><li><a href="#pci直通">PCI直通</a></li><li><a href="#硬盘直通">硬盘直通</a></li></ul></li><li><a href="#总结">总结</a></li></ul>
<hr />
<main class="post-content e-content" role="main"><p>装虚拟机用什么系统更好呢?<!--more--></p>
<h1 id="起因">
<a href="#起因"><svg class='octicon' viewBox='0 0 16 16' version='1.1' width='16' height='32' aria-hidden='true'><path fill-rule='evenodd' d='M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z'></path></svg></a> 起因
</h1>
<p>前段时间我有个需要开很多机器的需求为了方便管理和提高资源利用率当然是上虚拟机比较合适。那用什么系统上虚拟机好呢Windows上用Hyper-V当然也是不错的选择但是我觉得Windows的基础占用太高了另外Hyper-V的操作面板也不怎么样所以就不考虑了。那用什么呢之前我上大学的时候用过ESXi在随身携带的U盘里上正好有一份一直没删所以就顺手给手头的工作站安了一下。不过我当时用的版本很旧了是6.7虽然也不是不能用但是考虑到这个版本之前有RCE漏洞所以去sysin上下了一份最终版的6.7U3u更新包更新了上去,以后就不再更新了。 </p><p>
不过除了ESXi之外还有别的选择我看很多人都拿PVE和ESXi比较。虽然经常听说PVE但是我没有用过所以就在另一个工作站上安装了PVE试试看哪个用起来更好。不过和PVE比的其实不该是ESXi而是VMWare vSphere只不过我两个系统都是一台机器也用不着搞集群找破解版还麻烦。所以其实我是拿ESXi的VMware Host Client和PVE进行对比。 </p><p>
另外从本质来说它们也不是一个东西PVE更像是Debian上一个管理虚拟化的面板ESXi是VMKernel附带了个可以临时使用的Web端面板侧重点不一样。</p>
<h1 id="esxi和pve的对比">
<a href="#esxi和pve的对比"><svg class='octicon' viewBox='0 0 16 16' version='1.1' width='16' height='32' aria-hidden='true'><path fill-rule='evenodd' d='M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z'></path></svg></a> ESXi和PVE的对比
</h1>
<h2 id="界面与体验">
<a href="#界面与体验"><svg class='octicon' viewBox='0 0 16 16' version='1.1' width='16' height='32' aria-hidden='true'><path fill-rule='evenodd' d='M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z'></path></svg></a> 界面与体验
</h2>
<p>首先从界面来看两个系统长得其实差不太多不过左侧导航栏有点不太一样把PVE的导航栏改成文件夹视图就和ESXi的差不多了。从界面上来说我更喜欢ESXi的界面PVE的感觉没什么设计感。不过PVE面板的数据是1秒刷新一次的ESXi就算配置刷新也只能最短每15秒刷新一次。从功能上来说可能PVE会更好一点。另外对于显示的图表来说PVE全在“概要”里在ESXi都在“监控”里虽然PVE的图表更多但是有些感觉没什么意义因为PVE是基于Linux的所以有“负载”这个指标不过对于虚拟机系统来说感觉意义不大啊……不过也可能是因为用了LXC容器之后会影响PVE的负载所以整了这个项目 </p><p>
另外PVE还有个好处是可以看CPU温度我看有一个叫“<a href="https://github.com/ivanhao/pvetools">pvetools</a>”的工具可以配置在界面上显示CPU频率和温度ESXi没有IPMI的话用啥办法都看不到CPU温度😅。</p>
<h2 id="虚拟机管理">
<a href="#虚拟机管理"><svg class='octicon' viewBox='0 0 16 16' version='1.1' width='16' height='32' aria-hidden='true'><path fill-rule='evenodd' d='M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z'></path></svg></a> 虚拟机管理
</h2>
<p>ESXi和PVE创建虚拟机都挺简单的都有专门的向导。不过我测试PVE的时候选择安装Windows 10它推荐的架构居然是i440fx机器和SeaBIOS固件虽然也不是不能用但它怎么选了个最垃圾的虽然选成Windows 11是推荐的q35和UEFI引导……而且SCSI控制器还选了个要驱动的半虚拟化设备但PVE没有自带这个驱动包啊这些都是不小的坑。而ESXi就正常多了选择Windows 10会默认使用UEFI引导而且会选择一个兼容性最好的SCSI控制器和网络适配器便于没有安装驱动的时候能正常使用另外ESXi是自带VMWare Tools的在系统安装完成后可以直接挂载安装比PVE的体验好很多。另外PVE还有一个坑那就是CPU默认会用QEMU自己的一个类型那个在虚拟机里就读不到CPU的型号了而且性能会打折扣。不过这个倒也能理解毕竟PVE是给集群设计的在迁移到其他节点的时候选host可能在迁移到不同CPU的节点时会出现问题。不过ESXi也是啊……怎么它就没有这种问题总之PVE不适合小白。 </p><p>
PVE相比ESXi多了个特性那就是LXC容器因为PVE是基于Linux的所以可以创建容器。这个体验倒是还行可以直接在面板上下载模版创建也没什么坑配好之后和虚拟机几乎一模一样甚至还能在上面安装DockerIP也是独立分配的用起来还不错。</p>
<h2 id="存储管理">
<a href="#存储管理"><svg class='octicon' viewBox='0 0 16 16' version='1.1' width='16' height='32' aria-hidden='true'><path fill-rule='evenodd' d='M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z'></path></svg></a> 存储管理
</h2>
<p>PVE相比ESXi在存储上能选的花里胡哨的东西有点多默认它会把系统盘配置成LVM然后单独分了个LVM-Thin的东西两个容量不互通。这个LVM-Thin好像是只能用来存磁盘而且看不到东西到底存在哪里了我搜了一下好像是说这个LVM-Thin可以用多少占多少空间……我寻思qcow2格式的磁盘也有这个功能啊而且raw格式的磁盘文件是稀疏文件也是用多少占多少啊……两个容量不互通还浪费磁盘空间然后我就把这个LVM-Thin删掉了把系统盘扩容到整个磁盘然后在存储里面允许local存储磁盘映像之类的。 </p><p>
除此之外PVE还支持ZFS相当于软RAID但是它是文件系统层面支持的不需要初始化。我手头有3块机械盘插在上面组了个RAIDZ可以允许坏任意1块。组好之后可以用来存储磁盘映像和容器的数据。 </p><p>
ESXi的话就只能把盘格式化成VMFS6的文件系统要么还能挂iSCSI当作磁盘或者NFS作为数据存储如果要分布式存储应该只能搭到别的机器上然后用iSCSI挂过来阵列看起来只能是硬RAIDESXi并不提供软RAID的选项也不支持挂SMB、CephFS、ZFS之类乱七八糟的东西PVE在这一方面因为基于Linux系统发挥了很大的优势只要Linux能挂的它就能挂。</p>
<h2 id="网络管理">
<a href="#网络管理"><svg class='octicon' viewBox='0 0 16 16' version='1.1' width='16' height='32' aria-hidden='true'><path fill-rule='evenodd' d='M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z'></path></svg></a> 网络管理
</h2>
<p>在PVE上的网络是用的Linux Bridge安装的时候会强制要求静态IP不过毕竟是Linux可以修改配置让它使用DHCP。不过看起来PVE上似乎没有配置NAT的选项当然作为Linux来说肯定是有办法配的。ESXi用的叫做虚拟交换机配置冗余也是在这里配置PVE的话应该要先配置Bond然后再配置网桥。 </p><p>
另外ESXi对网卡要求很高不是服务器或者工作站用的比如什么瑞昱的网卡都是不识别的要额外安装驱动才行这也是PVE的优势Linux兼容什么它就兼容什么。不过对于大公司来说也不可能用家用电脑当服务器使🤣所以就算是用ESXi也不存在这种问题。</p>
<h2 id="pci直通">
<a href="#pci直通"><svg class='octicon' viewBox='0 0 16 16' version='1.1' width='16' height='32' aria-hidden='true'><path fill-rule='evenodd' d='M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z'></path></svg></a> PCI直通
</h2>
<p>在这一方面ESXi的体验就比PVE要好很多直接在“管理”——“硬件”——“PCI设备”里面就可以配置显卡直通之类的没有什么复杂的配置直接点“切换直通”然后重启就可以在虚拟机里配置了当然VT-d之类的东西要提前开</p><p>
PVE我最开始配直通的时候是直接网上搜的那个pvetools也可以帮助配置PCI直通之类的用这个工具配完之后就可以在虚拟机里添加了。不过在我添加的时候发现它有个“映射的设备”这个选项用刚才那个工具配置完之后要选“原始设备”然后我就想着这两个有什么区别结果发现“数据中心”——“资源映射”里面有个PCI设备的选项😂也许从一开始我就做错了直接用这个添加就可以了吧只不过因为我已经用那个工具配置过了怕在这里加了会冲突所以就算啦。 </p><p>
另外PVE的PCI直通还有个好处就是在5-10代的IntelCPU可以用Intel GVT-g技术把核显拆成多个显卡像虚拟机如果要是需要显卡的话用这个就不用插一堆显卡给虚拟机分配了。ESXi的话只支持SR-IOV拆分这个只有11代之后的Intel核显才可以用……我用的这两台工作站都是Intel6代的U所以在ESXi只能把整个核显直通分给某台机器了……</p>
<h2 id="硬盘直通">
<a href="#硬盘直通"><svg class='octicon' viewBox='0 0 16 16' version='1.1' width='16' height='32' aria-hidden='true'><path fill-rule='evenodd' d='M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z'></path></svg></a> 硬盘直通
</h2>
<p>硬盘直通有两种方式一种是把控制器直通了另外是只直通某个磁盘在ESXi上叫RDM直通。我的主板只有一个SATA控制器而且没有NVME硬盘所以直通控制器肯定不行这样会导致虚拟机管理系统读不到硬盘然后挂掉所以要直通就只能直通某个硬盘。 </p><p>
ESXi直通硬盘有点复杂要打开SSH然后用命令创建RDM磁盘文件挂载到虚拟机就可以了。不过我操作的时候不知道为什么网页出BUG了加载磁盘文件之后什么都读不到然后也不能保存最后没办法只能修改vmx文件进行挂载了…… </p><p>
PVE的话我感觉它的直通更像是把整个硬盘的设备文件作为一个磁盘映像来挂载到虚拟机上了但是PVE不允许在界面上挂载在指定存储以外的文件所以就只能通过命令来挂载…… </p><p>
两个从功能来说都没问题不过PVE挂载完之后磁盘显示的是“QEMU HARDDISK”而且SMART信息是瞎编的ESXi挂载之后可以看到磁盘名字、序列号另外SMART信息也能看到至少我用的ESXi 6.7U3u是可以的。不过PVE可以在面板上看SMART信息ESXi就只能登SSH敲命令看了……不过要是有IPMI应该也是能获取到硬盘的健康信息的。</p>
<h1 id="总结">
<a href="#总结"><svg class='octicon' viewBox='0 0 16 16' version='1.1' width='16' height='32' aria-hidden='true'><path fill-rule='evenodd' d='M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z'></path></svg></a> 总结
</h1>
<p>从上面来看PVE的功能是要更多的但是使用起来不如ESXi友好坑也比较多对于不想花时间解决问题的人来说用ESXi会更好一些当然ESXi也并不是免费产品它是VMWare vSphere的一个组件VMWare vSphere是收费的而PVE是免费的可以付费获得额外的更新和服务对于个人而言当然无所谓两个肯定都不会有个人花钱买至于公司的话……大公司选择VMWare vSphere当然会更好一些肯定对运维会很友好PVE的话小公司免费用会更合适一点。 </p><p>
至于哪个我觉得更好……我还是更倾向于用ESXi虽然PVE功能很多但是毕竟PVE底层是Linux我怕乱配给配崩了🤣ESXi的话就没有那么多会让用户搞坏的地方所以更稳定啊。</p></main>
<small style="display: block">tags: <a rel="category tag" class="p-category" href="/search.html?keyword=ESXi"><em>ESXi</em></a> - <a rel="category tag" class="p-category" href="/search.html?keyword=PVE"><em>PVE</em></a> - <a rel="category tag" class="p-category" href="/search.html?keyword=%E8%99%9A%E6%8B%9F%E6%9C%BA"><em>虚拟机</em></a> <span style="float: right;"><a href="https://gitlab.com/mayx/mayx.gitlab.io/tree/master/_posts/2024-12-29-vm.md">查看原始文件</a></span></small>
<h4 style="border-bottom: 1px solid #e5e5e5;margin: 2em 0 5px;">推荐文章</h4>
<p id="suggest-container">Loading...</p>
<script>
var suggest = $("#suggest-container");
$.get(BlogAPI + "/suggest?id=/2024/12/29/vm.html&update=" + lastUpdated.valueOf(), function (data) {
if (data.length) {
getSearchJSON(function (search) {
suggest.empty();
var searchMap = {};
for (var i = 0; i < search.length; i++) {
searchMap[search[i].url] = search[i];
}
var tooltip = $('<div class="content-tooltip"></div>').appendTo('body').hide();
for (var j = 0; j < data.length; j++) {
var item = searchMap[data[j].id];
if (item) {
var link = $('<a href="' + item.url + '">' + item.title + '</a>');
var contentPreview = item.content.substring(0, 100);
if (item.content.length > 100) {
contentPreview += "……";
}
link.hover(
function(e) {
tooltip.text($(this).data('content'))
.css({
top: e.pageY + 10,
left: e.pageX + 10
})
.show();
},
function() {
tooltip.hide();
}
).mousemove(function(e) {
tooltip.css({
top: e.pageY + 10,
left: e.pageX + 10
});
}).data('content', contentPreview);
suggest.append(link);
suggest.append(' - ' + item.date + '<br />');
}
}
});
} else {
suggest.html("暂无推荐文章……");
}
});
</script>
<br />
<div class="pagination">
<span class="prev">
<a href="/2024/12/08/simulator.html">
上一篇关于OS模拟器的探索
</a>
</span>
<br />
<span class="next">
<a href="/2025/01/01/summary.html">
下一篇:年终总结
</a>
</span>
</div>
<!--[if !IE]> -->
<link rel="stylesheet" href="/assets/css/gitalk.css">
<script src="/assets/js/gitalk.min.js"></script>
<div id="gitalk-container"></div>
<script>
var gitalk = new Gitalk({
clientID: '36557aec4c3cb04f7ac6',
clientSecret: 'ac32993299751cb5a9ba81cf2b171cca65879cdb',
repo: 'mabbs.github.io',
owner: 'Mabbs',
admin: ['Mabbs'],
id: '/2024/12/29/vm', // Ensure uniqueness and length less than 50
distractionFreeMode: false, // Facebook-like distraction free mode
proxy: "https://cors-anywhere.mayx.eu.org/?https://github.com/login/oauth/access_token"
})
gitalk.render('gitalk-container')
</script>
<!-- <![endif]-->
</section>
<!--[if !IE]> -->
<div id="landlord" style="left:5px;bottom:0px;">
<div class="message" style="opacity:0"></div>
<canvas id="live2d" width="500" height="560" class="live2d"></canvas>
<div class="live_talk_input_body">
<form id="live_talk_input_form">
<div class="live_talk_input_name_body" >
<input type="checkbox" id="load_this" />
<input type="hidden" id="post_id" value="/2024/12/29/vm.html" />
<label for="load_this">
<span style="font-size: 11px; color: #fff;">&#160;想问这篇文章</span>
</label>
</div>
<div class="live_talk_input_text_body">
<input name="talk" type="text" class="live_talk_talk white_input" id="AIuserText" autocomplete="off" placeholder="要和我聊什么呀?" />
<button type="submit" class="live_talk_send_btn" id="talk_send">发送</button>
</div>
</form>
</div>
<input name="live_talk" id="live_talk" value="1" type="hidden" />
<div class="live_ico_box" style="display:none;">
<div class="live_ico_item type_info" id="showInfoBtn"></div>
<div class="live_ico_item type_talk" id="showTalkBtn"></div>
<div class="live_ico_item type_music" id="musicButton"></div>
<div class="live_ico_item type_youdu" id="youduButton"></div>
<div class="live_ico_item type_quit" id="hideButton"></div>
<input name="live_statu_val" id="live_statu_val" value="0" type="hidden" />
<audio src="" style="display:none;" id="live2d_bgm" data-bgm="0" preload="none"></audio>
<input id="duType" value="douqilai" type="hidden" />
</div>
</div>
<div id="open_live2d">召唤伊斯特瓦尔</div>
<!-- <![endif]-->
<footer>
<p>
<small>Made with ❤ by Mayx<br />Last updated at 2026-02-11 17:55:00<br /> 总字数617672 - 文章数179 - <a href="/atom.xml" >Atom</a> - <a href="/README.html" >About</a></small>
</p>
</footer>
</div>
<script src="/assets/js/scale.fix.js"></script>
<!--[if !IE]> -->
<script src="/assets/js/main_new.js"></script>
<script src="/Live2dHistoire/live2d/js/live2d.js"></script>
<script src="/Live2dHistoire/live2d/js/message.js"></script>
<!-- <![endif]-->
</body>
</html>