mon*_*ner 7 hyper-v hypervisor hyper-v-server-2016
如何通过我的 Windows 10 笔记本电脑连接到我的 Hyper-V 2016 独立版?
背景:我将其设置为家庭实验室。我遵循 了 一些 指南,但我还没有找到似乎适用于 Hyper-V 2016 免费版的指南/Youtube 教程。这是 Hyper-V 独立版的“hello world”,我不能t 找到适用于 2016 年的指南。(Hyper-V 2012 + Windows 8 似乎有一些解决问题的自动化脚本,但不适用于 Hyper-V 2016。)
语境
错误
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.
Run Code Online (Sandbox Code Playgroud)
我在服务器上做了什么
# 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
Run Code Online (Sandbox Code Playgroud)
我在客户端做了什么
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
Run Code Online (Sandbox Code Playgroud)
我如何触发错误
在客户端:
mon*_*ner 21
发现我的具体问题:) 我使用了无效的主机名,并且 DNS 解析不正确。
但另一方面,我还发现 Microsoft 文档(使用 Hyper-V 管理器远程管理 Hyper-V 主机)没有记录我使事情正常运行所需的所有说明。大体上是正确的,但少了一步。所以我附上了我的手动设置说明。
有关通过 Windows 10 Professional 远程管理 Hyper-V 2016 的完整设置说明,请参见下文。我的设置涉及两台独立的物理机器 - 我从头开始安装两个系统。
在 Hyper-V 服务器上
sconfigPowershell 命令:
Enable-PSRemoting
Enable-WSManCredSSP -Role server
Run Code Online (Sandbox Code Playgroud)
在台式机/笔记本电脑上,您将远程管理 Hyper-V
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
Run Code Online (Sandbox Code Playgroud)
笔记
Microsoft 官方文档缺少cmdkey指令,该指令注册进入 Hyper-V 服务器所需的登录信息。我在一个单独的文档中找到了它。
| 归档时间: |
|
| 查看次数: |
52812 次 |
| 最近记录: |