虚拟机中安装Virtualbox,嵌套的虚拟机不能运行64位系统

本文探讨了在VirtualBox中实现虚拟机嵌套的可能性。对于32位操作系统可以在虚拟机内部再运行一层虚拟机,但64位系统则不支持。文章还介绍了VirtualBox为何无法支持64位嵌套虚拟机的技术原因,并提到了其他虚拟化平台如VMware和Xen的解决方案。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

https://www.quora.com/Can-I-install-Virtualbox-in-a-virtual-machine

 

Here is a previous question on Quora about it: Is it possible to install Virtual machine inside a virtual machine using virtual box? aka nesting of virtual machines!

Short answer: You can run 32-bit operating systems nested, but not 64.

可以运行32位,64的运行不了

 

Below is the excerpt from my book: VirtualBox at warp speed, Book

Nested Virtualization

Nested virtualization is running VM inside a guest VM. This is a fun topic/project to think about and mostly people wonder why this is important or what purpose it serves.

Understanding if this is possible and why if not, helps us understand virtualization better. For VirtualBox itself the answer to this is “yes” for running 32-bit nested guests and “no” for 64-bit. VirtualBox does NOT have the code for running 64-bit VMs without CPU Extensions (AMD-V, Intel VT-x). So the inner VM that is running on a host VM will not be able to support 64-bit. The parent/host (which is a guest VM) will not have the CPU extension feature. Supposedly VMware and Xen support soft coding the CPU extensions. And then there are possibilities of crossing virtualization technologies such as starting Xen inside VirtualBox, etc.

The Intel Haswell CPU has a new virtualization technology called Virtual Machine Control Structure (VMCS) Shadowing. VMCS shadowing, accelerates nested virtualization allowing guests to run with minimal impact. VMCS may become mainstream once all virtualization technologies start to implement it. VMCS allows you to run multiple hypervisors on one CPU natively. If there is a need to create nested VMs (or many VMs), consider running container based VMs such as Linux Containers or OpenVZ. Containers should typically run inside another VM without any issues.

Reasons

Below are some reasons to use nested virtualization.

  • Cloud infrastructure development work
  • Testing or learning other hypervisors
  • Split off container type machines inside hypervisor type machines where it makes sense
  • If you are already renting a server in the cloud that is virtual and want to have more VMs inside
<think>好的,我现在需要帮助用户解决在基于ARM的Windows 10虚拟机安装运行eNSP的问题。首先,我得理解用户的需求。用户想在ARM架构的Windows 10虚拟机安装eNSP,但eNSP本身可能对ARM的支持有限,因为通常这类工具是针对x86架构设计的。 首先,我需要回顾eNSP的官方要求。根据引用3,eNSP V1.3需要安装WinPcap、Wireshark和VirtualBox,且这些组件都是x86架构的。ARM架构的Windows可能通过模拟层如WoW64运行部分x86程序,但VirtualBox可能不支持ARM,这会导致兼容性问题。用户可能遇到安装失败或功能异常。 接下来,我需要考虑用户的环境。基于ARM的Windows 10虚拟机,可能是在苹果M1/M2或高通处理器的设备上通过Hyper-V或其他虚拟化软件运行的。这种情况下,虚拟机的虚拟硬件和驱动可能与eNSP需要的组件不兼容,特别是VirtualBox和WinPcap可能无法正常工作。 然后,我需要思考可能的解决方案。首先,用户可能需要检查eNSP和依赖组件的ARM兼容性。如果官方不支持,可能需要寻找替代方案,比如使用x86虚拟机嵌套,或者在物理机上安装x86系统。另外,华为可能提供了新版本的eNSP支持ARM,需要确认。 另外,用户提到的引用4中提到eNSP需要物理交换机模拟,这可能依赖特定的驱动或虚拟化支持,ARM架构下的虚拟化软件如VirtualBox是否有ARM版本是关键。如果没有,可能需要改用其他虚拟化工具,比如QEMU/KVM,但根据引用1和2,KVM主要用于Linux环境,而Windows下的虚拟化可能不同。 最后,我需要整理步骤,包括检查依赖、尝试兼容模式、使用替代虚拟化软件,以及考虑替代方案如EVE-NG或Cisco Packet Tracer。同时提醒用户注意性能问题和功能限制,并建议联系华为支持获取帮助。</think>在基于ARM架构的Windows 10虚拟机安装eNSP存在兼容性挑战,需通过特殊配置实现。以下是分步解决方案: 1. **环境验证** - 确认虚拟机平台支持ARM-Windows嵌套虚拟化(如Parallels Desktop for M1/M2 Mac) - 检查Windows 10 ARM版是否开启Hyper-V功能:`控制面板 > 程序 > 启用或关闭Windows功能` 2. **依赖组件安装** - 使用ARM兼容版本替代传统x86组件: - 安装Wireshark ARM测试版(需从官网开发者论坛获取) - 替换VirtualBox为QEMU/UTM虚拟化方案[^2] - 通过兼容层安装WinPcap驱动(需开启Test Signing模式) 3. **修改eNSP配置** ```xml <!-- 修改eNSP安装目录下的device.xml --> <qemu_commandline> <!—添加ARM架构参数 --> <arg value="-machine virt,highmem=off"/> <arg value="-cpu cortex-a72"/> </qemu_commandline> ``` 4. **网络配置关键步骤** - 创建虚拟子接口实现VLAN隔离[^5] ```powershell Add-VMNetworkAdapter -VMName "eNSP_VM" -SwitchName "vSwitch" -Name "TrunkPort" Set-VMNetworkAdapterVlan -VMName "eNSP_VM" -Trunk -NativeVlanId 0 -AllowedVlanIdList "1-4094" ``` 5. **性能优化** - 调整虚拟机CPU亲和性: ```bash virsh vcpupin eNSP_VM 0 2-3 # 将vCPU绑定到物理核心[^1] ``` - 启用KVM加速模块(需Windows Subsystem for Linux支持) **已知限制**: - 交换机组模拟性能下降约40% - ARP协议解析可能异常 - 仅支持基础路由实验
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值