当前位置:网站首页 > 更多 > 玩电脑 > 正文

[玩转系统] 如何在 Hyper-V 虚拟机中安装 VMWare ESXi?

作者:精品下载站 日期:2024-12-14 23:09:26 浏览:15 分类:玩电脑

如何在 Hyper-V 虚拟机中安装 VMWare ESXi?


我想在 Windows 10 上运行的 Hyper-V 虚拟机中为我的家庭实验室安装 VMWare ESXi。 Hyper-V 和 VMWare ESXi 支持嵌套虚拟化,因此这种情况是可能的(尽管官方不支持)。但是,在 Hyper-V 上安装 ESXi 有一些方面需要注意。

ESXi 映像中没有适用于 Hyper-V 虚拟网络适配器的驱动程序,并且 VMware 不支持此网卡(它未包含在 VMware 硬件兼容性列表 - HCL 中)。因此,在虚拟机上安装 VMWare ESXi 之前,您需要将 Hyper-V 网络适配器 (net-tulip) 的驱动程序集成到 ESXi 安装映像中。

Net-tulip 是一个社区 DECchip 21140 以太网驱动程序,用于将 ESXi 作为 Microsoft Hyper-V 上的虚拟机运行。支持 ESXi 6.5 之前的所有 ESXi 版本。

如果 ESXi 安装程序未找到任何网络适配器,它将返回以下错误并阻止您继续安装:

No Network Adapters.
No network adapters were detected. Either no network adapters are physically connected to the system, or a suitable driver could not be located. A third-party driver may be required.

[玩转系统] 如何在 Hyper-V 虚拟机中安装 VMWare ESXi?

要添加

net-tulip

将驱动程序添加到 ESXi 映像,然后在计算机上安装 VMWare PowerCLI 模块。

您可以使用 VMware.ImageBuilder 模块 中的 PowerShell cmdlet(Add-EsxSoftwareDepot、Add-EsxSoftwarePackage、Export-EsxImageProfile)将 net-tulip 添加到映像中。在这种情况下,您必须手动下载 ESXi 映像和 net-tulip 驱动程序 (http://vibsdepot.v-front.de/depot/bundles/net-tulip-1.1.15-1-offline_bundle.zip)。

最简单的方法是使用现成的 ESXi-Customizer-PS 模块(我们在文章前面讨论了如何将驱动程序注入 ESXi 映像)。

您可以从 GitHub (https://github.com/VFrontDe/ESXi-Customizer-PS/blob/master/ESXi-Customizer-PS.ps1) 下载最新版本的 ESXi-Customizer-PS 2.8.1 模块。此脚本版本支持当前的 VMWare ESXi 7.0 和 6.7 版本。

显示可供下载的 ESXi 版本列表:

.\ESXi-Customizer-PS-v2.8.1.ps1 -sip -ozip

在我们的示例中,下载编号为 203 的映像 (ESXi-6.0.0-20170604001-standard)。输入203并按Enter键。

[玩转系统] 如何在 Hyper-V 虚拟机中安装 VMWare ESXi?

不幸的是,我无法在 Hyper-V 中运行最新版本的 VMWare ESXi 7.0 和 6.5。所有当前版本的 ESXi 都会阻止加载旧版 Hyper-V 虚拟网络适配器。使用 Net-tulip 驱动程序正确引导的最高 ESXi 版本是

ESXi-6.0.0-20170604001 Build 5572656

。尽管 ESXi-Customizer-PS 2.8.1 允许使用 ESXi 7.0 映像并将 Net-tulip 网络驱动程序集成到其中,但安装程序不会加载该驱动程序,也看不到 Hyper-V 虚拟网络适配器。

等待脚本将包含 ESXi 映像的 ZIP 文件下载到当前目录。

要将 net-tulip 集成到 ZIP 映像并获取 ISO 映像,请运行以下命令:

.\ESXi-Customizer-PS-v2.8.1.ps1 -iZip "C:\Ps\ESXi-6.0.0-20170604001-standard.zip" -vft -load net-tulip
This is ESXi-Customizer-PS Version 2.8.1 (visit https://ESXi-Customizer-PS.v-front.de for more information!)
(Call with -help for instructions)
Logging to C:\Users\user\AppData\Local\Temp\ESXi-Customizer-PS-15076.log ...
Running with PowerShell version 5.1 and VMware PowerCLI version .. build
Adding base Offline bundle C:\Ps\ESXi-6.0.0-20170604001-standard.zip ... [OK]
Connecting the V-Front Online depot ... [OK]
Getting Imageprofiles, please wait ... [OK]
Using Imageprofile ESXi-6.0.0-20170604001-standard ...
(Dated 02/07/2020 11:36:33, AcceptanceLevel: PartnerSupported,
For more information, see http://kb.vmware.com/kb/2149958.)
Load additional VIBs from Online depots ...
Add VIB net-tulip 1.1.15-1 [New AcceptanceLevel: CommunitySupported] [OK, added]
Exporting the Imageprofile to 'C:\PS\ESXi-6.0.0-20170604001-standard-customized.iso'. Please be patient ...
All done.

[玩转系统] 如何在 Hyper-V 虚拟机中安装 VMWare ESXi?

-vft

选项意味着必须从 V-Front 在线存储库下载最新的 VIB 驱动程序。

这样,您就有了一个安装 ESXi ISO 映像。然后在 Hyper-V 主机上创建一个新的虚拟机。对 Hyper-V VM 使用以下设置:

  • 创建第一代虚拟机;

    [玩转系统] 如何在 Hyper-V 虚拟机中安装 VMWare ESXi?

  • 为您的虚拟机添加至少 2 个 vCPU;

  • 删除虚拟机属性中的默认网络适配器并添加新的旧版网络适配器

    [玩转系统] 如何在 Hyper-V 虚拟机中安装 VMWare ESXi?

  • 允许对 VM 使用嵌套虚拟化功能:

    Set-VMProcessor -VMName test-esxi1 -ExposeVirtualizationExtensions $true
  • 将 ESXi ISO 映像装载到虚拟机。

如果您尝试从 ESXi 安装映像引导虚拟机,则会出现视频适配器与 VMkernel 不兼容的错误:

Shutting down firmware services…
Relocating modules and starting up the kernel…

[玩转系统] 如何在 Hyper-V 虚拟机中安装 VMWare ESXi?

要忽略该问题并继续安装 ESXi,请在启动虚拟机时按 TAB 并添加以下选项:

ignoreHeadless=TRUE

[玩转系统] 如何在 Hyper-V 虚拟机中安装 VMWare ESXi?

ESXi 安装程序将检查硬件配置、检测网卡并提议继续在虚拟磁盘上安装 ESXi 映像。

[玩转系统] 如何在 Hyper-V 虚拟机中安装 VMWare ESXi?

然后按照VMWare ESXi安装向导的提示进行操作(步骤在文章如何安装和配置VMWare Hypervisor?中详细描述)。

安装完成后,重新启动虚拟机并在选择 ESXi 启动选项时按 Shift+O。另外,指定 ESXi 必须在不进行显卡检查的情况下启动。为此,请输入

ignoreHeadless=TRUE

位于该行末尾,然后按 Enter。

[玩转系统] 如何在 Hyper-V 虚拟机中安装 VMWare ESXi?

为了避免每次启动虚拟机时都执行此操作,请更改 ESXi 配置:

  1. 启动ESXi后,按F2并输入root密码;

  2. 在 DCUI ESXi 中选择故障排除选项 -> 启用 ESXi Shell

    [玩转系统] 如何在 Hyper-V 虚拟机中安装 VMWare ESXi?

  3. 要打开 ESXi 控制台,请按 Alt+F2

  4. 在控制台提示符下运行以下命令:

    Esxcfg-advcfg -k TRUE ignoreHeadless

    [玩转系统] 如何在 Hyper-V 虚拟机中安装 VMWare ESXi?

按 ALT+F2 关闭控制台。然后在 DCUI 中配置 ESXi 主机的网络设置并重新启动虚拟机。确保 ESXi 可以正确引导并且您可以使用 vSphere Web Client 连接到它。

[玩转系统] 如何在 Hyper-V 虚拟机中安装 VMWare ESXi?

您需要 登录账户 后才能发表评论

取消回复欢迎 发表评论:

关灯