ESXi 上的 VMWare VM 上的 Virtualbox 运行

Virtualbox running on VMWare VM on ESXi

我正在尝试 运行 我的 Chef/Kitchen 测试,在 ESXi VMWare 集群客户机上使用 Vagrant/Virtualbox 来测试说明书集成。我可能会转向 Kitchen/Vagrant 的 VMWare 版本,并在某个时候删除 Virtualbox 部分,但我想先看看这项工作。

我在 VM 中启用了虚拟化支持,所以它确实可以运行,但速度慢得令人难以忍受。在我的桌面上完全融合在 4 分钟内完成,而在 VM 中则需要将近 40 分钟。检查 VMWare VM 的性能,似乎可以接受,但其中的 VirtualBox VM 具有非常高的硬件中断服务。所有其他指标似乎都处于平均水平。在正常系统下,HI 很少达到 1-2 左右,即使在 Virtualbox 来宾中空闲时,它也稳定 >30,并且通常高于 50。

关于寻找什么或我可能错过的神奇设置有什么想法吗?

VirtualBox,运行在虚拟环境中,只能使用"software"虚拟化。当然,它很慢。它应该消耗大量的处理器时间。主机系统中的 ESXi 使用硬件加速(VT-x 或类似),其性能接近真实主机性能。您不应在 VM 上安装 VM。

阅读 itfdev 在 https://egustafson.github.io/esxi-nested-virtualbox.html 链接到的非常有用的文章后,我发现由于下面的引用,我想做的事情可能总是很慢:

Disk Performance During my initial experimentation with nested VM’s I observed a clear decrease in performance of the nested VM. My initial experimentation mostly only went as far as installing the OS on the nested VM. Installing an OS is generally a disk intensive activity.

Disk virtualization is more expensive than most. Nesting virtualized disks will accumulate "virtualization debt" quicker than other virtualized components. The short, but rambling explanation goes something like this:

In my inner VM I write a block to "disk". This traverses the inner OS’s file system code and is mapped to a sector on the inner VM’s virtual block device. Writing is the passed to the outer VM, traverses the file system code, and is mapped to the outer VM’s virtual block device. Finally, the block is passed to the host, (physical), file system, mapped through to a sector, and finally placed on the actual physical device. — If your head is spinning now, it
should be. That’s three times the block is passed through file system code on it’s eventual path to a physical write.

虚拟化社区了解这个问题,并且根据安装的要求有不同程度的避免惩罚的方法。我不会在这里介绍这些。我的观点:如果您的嵌套虚拟机让您觉得很慢,这可能是一个重要的原因。