VMware 如何向 Guest OS 屏敝 NX/XD Bit(No-eXecute) ?
vmware吧
全部回复
仅看楼主
level 1
对于 32 位的 Windows XP/Vista/7, 并无要求处理器必须支持 NX/XD Bit(No-eXecute). 当存在 NX/XD 时,会自动开启 PAE 内核,反而导致性能略有下降. VirtualBox 支持向 Guest OS 屏敝 NX/XD:
https://www.virtualbox.org/manual/topics/BasicConcepts.html#settings-processor
Enable PAE/NX (Can't be changed on VMs with an Arm architecture): Determines whether the PAE and NX capabilities of the host CPU will be exposed to the virtual machine.
但 VMware Workstation 似乎并无类似选项,不过 VMware 的服务器端产品却有此功能:
Hide or expose NX/XD bit
https://geek-university.com/hide-or-expose-nx-xd-bit/
因为 VMware Workstation 跟服务器端产品共享内核,所以我猜测 Workstation 也应该有这一特性。只是没在界面上提供选项,或许可以通过手工修改 .vmx 配置文件来实现。
正在使用 VMware 服务器端产品的吧友,能否帮忙查看一下该功能究竟对应 .vmx 配置文件中的什么设置?
2025年02月22日 02点02分 1
level 1
还有这里:
https://techdocs.broadcom.com/us/en/vmware-cis/vsphere/vsphere/6-7/vsphere-virtual-machine-administration-guide-6-7/configuring-virtual-machine-hardware-vSphereVirtualMachineAdministration/virtual-cpu-configuration-and-limitations-vSphereVirtualMachineAdministration/change-cpu-identification-mask-settings-h5-and-flex-vSphereVirtualMachineAdministration.html
也讲到了 vsphere 可以配置该功能。
在网上努力查找资料,发现似乎有一个选项:
featMask.vm.cpuid.NX = "Val:0x0"
可用。但在 .vmx 文件里加上那一行之后,启动虚拟机时却立刻报错。
@sky1wolf 吧主,您对 VMware 的产品线接触得非常多,麻烦帮忙看看。
2025年02月27日 03点02分 2
吧务
level 14
首先正常使用中根本没遇到过这种问题,只是测试了下对应的设置
首先2楼的资料对应的是vSphere 6.7中vCenter下对虚拟机虚拟硬件CPU中CPUID掩码的更改,默认就有这个选项,直接选择即可。
对比了下配置文件的差异变化,发现增加了几行掩码配置,不过可能CPU不一样,不一定通用!
设置隐藏的情况下配置如下
cpuid.80000001.eax = "---- ---- ---- ---- ---- ---- ---- ----"
cpuid.80000001.ebx = "---- ---- ---- ---- ---- ---- ---- ----"
cpuid.80000001.ecx = "---- ---- ---- ---- ---- ---- ---- ----"
cpuid.80000001.edx = "---- ---- ---0 ---- ---- ---- ---- ----"
cpuid.80000001.eax.amd = "---- ---- ---- ---- ---- ---- ---- ----"
cpuid.80000001.ebx.amd = "---- ---- ---- ---- ---- ---- ---- ----"
cpuid.80000001.ecx.amd = "---- ---- ---- ---- ---- ---- ---- ----"
cpuid.80000001.edx.amd = "---- ---- ---0 ---- ---- ---- ---- ----"
这些需要加到虚拟机的.vmx配置文件中
设置启用的情况下配置如下
cpuid.80000001.eax = "---- ---- ---- ---- ---- ---- ---- ----"
cpuid.80000001.ebx = "---- ---- ---- ---- ---- ---- ---- ----"
cpuid.80000001.ecx = "---- ---- ---- ---- ---- ---- ---- ----"
cpuid.80000001.edx = "---- ---- ---H ---- ---- ---- ---- ----"
cpuid.80000001.eax.amd = "---- ---- ---- ---- ---- ---- ---- ----"
cpuid.80000001.ebx.amd = "---- ---- ---- ---- ---- ---- ---- ----"
cpuid.80000001.ecx.amd = "---- ---- ---- ---- ---- ---- ---- ----"
cpuid.80000001.edx.amd = "---- ---- ---H ---- ---- ---- ---- ----"
2025年02月27日 10点02分 3
谢谢吧主的热心帮助,看来确实无法简单地修改配置文件实现这一目地。要针对具体的处理器设置掩码,太麻烦了。 再次感谢吧主提供的帮助,您多年来一直在本吧和“虚拟机”吧热心为大家解答疑问,是少见的优质吧主。
2025年02月28日 03点02分
1