windows物理机器hyper-v 启用嵌套虚拟化 、windows虚拟机器hyper-v 启用嵌套虚拟化

物理机器windows的hyper-v安装windows虚拟机,windows虚拟机的hyper-v再安装虚拟机,即嵌套虚拟化
1)借助嵌套虚拟化在虚拟机中运行 Hyper-V ** 必看** https://docs.microsoft.com/zh-cn/virtualization/hyper-v-on-windows/user-guide/nested-virtualization
2)Hyper-V 嵌套虚拟化 https://www.yuanmas.com/info/YlOMk9r1aq.html 注意嵌套的前提条件
3)Hyper-V 2016启用嵌套虚拟化 https://www.fcwys.cc/archives/478.html
4)Hyper-V开启嵌套虚拟化的方法 http://www.cainiao.io/archives/926

如果物理机器是win2008,在此win2008上安装hyper-v,再在此hyper-v中安装proxmox,存在问题:
首先是在win2008 hyper-v中无法使用get-vm等设置hyper-v虚拟机cpu属性的命令

如果在proxmox物理机器中的虚拟windows操作系统上安装hyper-v呢?
目前在win10家庭版20H4 以及win sever 2012 r2(都是虚拟机)上安装hyper-v发现:
1)win10家庭版安装,只能通过bat批处理安装hyper-v,安装完成后,系统不断重启,只能通过高级选项的卸载更新和功能,重启到安全模式来恢复系统。或者当安装了hyper-v后系统直接重启时 直接到安全模式,利用bat进行 卸载hyper-v安装,如下:
pushd "%~dp0"
dir /b %SystemRoot%servicingPackagesHyper-V.mum >hyper-v.txt for /f %%i in ('findstr /i . hyper-v.txt 2^>nul') do dism /online /norestart /remove-package:"%SystemRoot%servicingPackages%%i"
del hyper-v.txt
Dism /online /disable-feature /featurename:Microsoft-Hyper-V-All /LimitAccess /ALL
2)win 2012不能通过gui方式安装hyper-v,通过gui安装hyper-v时会报错,那么只能通过powershell命令行方式安装hyper-v,安装完后,找不到hyper-v虚拟机管理程序。
以上不管win10家庭版还是win2012(都是虚拟机) ,通过systeminfo查看,发现最后hyper-v节点显示:Hyper-V要求提示已检测到虚拟机监控程序,将不显示Hyper-V所需功能。

以下都是在win2012上进行的部分调试,比较乱:
Hyper-V launch failed; Processor does not provide the features necessary to run Hyper-V (leaf 0x1, register 0x2: features needed 0x202021, features supported 0x80202021 win2012虚拟机(proxmox上安装的win2012虚拟机)安装hyper-v不能使用的原因

Windows Defender Credential Guard https://docs.microsoft.com/zh-cn/windows/security/identity-protection/credential-guard/credential-guard-manage

https://www.coder.work/article/556000 分析了一下思路

-cpu 'host,+kvm_pv_unhalt,+kvm_pv_eoi,hv_vendor_id=proxmox,hv_spinlocks=0x1fff,hv_vapic,hv_time,hv_reset,hv_vpindex,hv_runtime,hv_relaxed,hv_synic,hv_stimer,kvm=off'

https://forum.proxmox.com/threads/proxmox-cpu-model-kvm64-with-pcid-and-aes-flags.39249/page-2
cpu: host,flags=+pcid;+spec-ctrl;+aes
cpu: host,flags=-hypervisor

原文地址:https://www.cnblogs.com/weihua2020/p/13941021.html