如何通过Windows 10远程pipe理Hyper-V 2016独立版?

如何通过我的Windows 10笔记本电脑连接到我的Hyper-V 2016独立版?

背景:我正在设置一个家庭实验室。 我已经遵循 了 一些 指南 ,但是我还没有find适用于Hyper-V 2016免费版的指南/ Youtube教程。这是Hyper-V独立版的“hello world”,我可以“find适用于2016年的指南。(Hyper-V 2012 + Windows 8似乎有一些自动脚本可以解决问题,但不适用于Hyper-V 2016。)

上下文

  • 服务器: Hyper-V服务器2016(免费,独立) ,fqdn:server.local,
  • 客户端:Windows 10专业版
  • 补充笔记
    • 客户端的etc / hosts文件包含服务器fqdn的条目
    • 客户端或服务器都不在工作组或域中
  • 我的目标是:使用客户端的Hyper-Vpipe理器远程pipe理服务器

错误

An error occurred while attempting to connect to server "server.local". Check that the Virtual Machine Management service is running and that you are authorized to connect to the server. Hyper-V encountered an error trying to access an object on computer 'server.local' because the object was not found. The object might have been deleted. Verify that the Virtual Machine Management service on the computer is running. 

我在服务器上做了什么

 # sconfig.cmd: Enable "Configure Remote Management" # sconfig.cmd: Add Local Administrator # sconfig.cmd: Enabled Remote Desktop Enable-PSRemoting Enable-WSManCredSSP -Role server sc start vmms # Is this the "missing object"? netsh advfirewall set currentprofile state off # Let's try disabling firewall 

我在客户端做了什么

 Set-Item WSMan:\localhost\Client\TrustedHosts -Value "server.local" Enable-WSManCredSSP -Role client -DelegateComputer "server.local" # Changed group policy: "Computer Configuration > Administrative Templates > System > Credentials Delegation > Allow delegating fresh credentials with NTLM-only server authentication" by doing: "Click Enable and add wsman/fqdn-of-hyper-v-host." # Disabled firewall # dcomcnfg > COM SECURITY > Access Permissions > Edit Limits > Anonymous Login > ALLOW Remote Access cmdkey /add:YOURSERVERNAME /user:USERNAMEONTHESERVER /pass:THEPASSWORDOFTHATUSER 

我如何触发错误

在客户端:

  1. 启动“连接到服务器”
    1. 尝试一:“设置”另一台计算机:'到'192.168.10.2'“
    2. 尝试两个:“设置另一台计算机:”到“server.local”
  2. 点击“确定”
  3. (错误:“尝试连接到服务器'server.local'时发生错误…)

发现我的具体问题 :)我使用了一个无效的主机名,并且DNSparsing不正确。

  • 错误:服务器1.本地
  • 右:server-1-local

但是另一方面,我还发现Microsoft文档( 使用Hyper-Vpipe理器远程pipe理Hyper-V主机 )没有logging为使事情正常工作所必需的所有说明。 这大部分是正确的,但却错过了一步。 所以我附上我的手动设置说明。

请参阅下面的完整设置说明,通过Windows 10 Professional远程pipe理Hyper-V 2016。 我的设置涉及两个独立的物理机器 – 我从头开始安装这两个系统。

在Hyper-V服务器上

  1. 安装Hyper-V Server 2016 (通过GUI)
  2. 设置密码注意:在运行sconfig的terminalgui中更改以下sconfig
  3. 设置计算机名称(例如server-1); 注意:不要使用句点
  4. configuration远程pipe理(禁用=>启用)
  5. 远程桌面(禁用=>启用)
  6. 在Powershell窗口中,以admin身份运行:

Powershell命令:

 Enable-PSRemoting Enable-WSManCredSSP -Role server 

在台式机/笔记本电脑上,您将远程pipe理Hyper-V

  1. 安装Windows 10 Professional /您的驱动程序/您的应用程序(GUI)
  2. 更改您的networking适配器设置
    • 点击开始>search“家庭组”>启动“家庭组”
    • 点击链接更改networkingtypes(public => private)
  3. 在主机文件中添加一个DNS条目(以pipe理员身份运行记事本)
    • 编辑“C:\ Windows \ System32 \ drivers \ etc \ hosts”
    • 添加一个条目,如“192.168.100.2 server-1”
  4. 在Powershell窗口中,以admin身份运行:

Powershell命令:

 Enable-PSRemoting Set-Item WSMan:\localhost\Client\TrustedHosts -Value server-1 Enable-WSManCredSSP -Role client -DelegateComputer server-1 Enable-WindowsOptionalFeature -Online -FeatureName:Microsoft-Hyper-V -All cmdkey /add:server-1 /user:Administrator /pass 

注意

官方的Microsoft文档缺lesscmdkey指令,该指令注册进入Hyper-V服务器所需的login信息。 我在一个单独的文档中find它。