Hyper-V server 2016
准备工作:
假设本地机器机器名为 [local] 远程Hyper-V 服务器机器名为 [hyperv],
用[***]来表示此处内容可根据自己需要修改,如果要直接使用,请去掉 [ 和 ]
命令行请以管理员身份执行(!重要!否则会报错)
0. 添加 hyper 的本地解析到相应ip
# localhost name resolution is handled within DNS itself.
# 127.0.0.1 localhost
# ::1 localhost
172.17.0.100 hyperv
0.1 安装 Hyper-V 管理器(启用或者关闭windows功能)
0.2 关闭服务器防火墙
netsh advfirewall set currentprofile state off
1.Win10远程服务器管理工具(RSAT)[阅读]
Win10正式版 远程服务器管理工具 TH-KB2693643 下载:
32位下载
64位下载
2.安装完成后打开 Server Manager,上面的阅读链接如果没有挂会有图的
3.授权用户
服务器端[hyperv]执行,用户名和相应密码请先添加
cmdkey /add:[local] /user:[administrator] /pass:[password]
4.遇到WinRM授权问题
服务器端[hyper]执行
winrm set winrm/config/client @{TrustedHosts="[local]"}
Enable-PSRemoting
Enable-WSManCredSSP -role server
netsh advfirewall set currentprofile state off
本机环境[local]执行
winrm quickconfig
Set-Item wsman:\localhost\Client\TrustedHosts [hyperv] -Concatenate -Force
Set-Item WSMan:\localhost\Client\TrustedHosts -Value "[hyperv]"
Enable-WSManCredSSP -Role client -DelegateComputer "[hyperv]"
TrustedHosts用法如下
Set-Item wsman:\localhost\Client\TrustedHosts hostname
Set-Item wsman:\localhost\Client\TrustedHosts 10.0.0.1
Set-Item wsman:\localhost\Client\TrustedHosts 10.0.0.*
Set-Item wsman:\localhost\Client\TrustedHosts *.wkiyo.cn
Set-Item wsman:\localhost\Client\TrustedHosts www.wkiyo.cn
5.遇到kerberos验证失败
列表 -> [右键]管理方式 -> 输入用户名密码,如下:
[hyperv]\[Administrator]
[password]
参考文章
http://blog.51cto.com/ciscoskys/1162642
https://post.smzdm.com/p/574836/
https://www.cnblogs.com/cs_net/articles/3096334.html
http://windows15603.rssing.com/chan-73144790/latest.php
版权声明:
作者:Kiyo
链接:https://www.wkiyo.cn/html/2019-01/i987.html
来源:Kiyo's space
文章版权归作者所有,未经允许请勿转载。
共有 0 条评论