Hyper-V Server 2012 安裝

原本照著 以免費版Hyper-V Server 2012建立虛擬化環境 做,後用Windows 8 裝了遠端伺服器管理工具 仍然無法控制,試了很多次才成功。
在Server上已經下指令:

netsh advfirewall set all profiles settings remotemanagement enable
netsh advfirewall firewall set rule group="遠端服務管理" new enable=yes
netsh advfirewall firewall set rule group="遠端桌面" new enable=yes
cscript %windir%\system32\scregedit.wsf /AR 0
cscript %windir%\system32\scregedit.wsf /CS 0
winrm quickconfig –q

英文版是 

netsh advfirewall set all profiles settings remotemanagement enable
netsh advfirewall firewall set rule group="Remote Administration" new enable=Yes
netsh advfirewall firewall set rule group="Remote Desktop" new enable=yes
cscript %windir%\system32\scregedit.wsf /AR 0
cscript %windir%\system32\scregedit.wsf /CS 0
winrm quickconfig –q

為何還是不行呢?又 找到 Manage Hyper-V Server 2012 Remotely 和 Remotely Manage Hyper-V Server 2012 Core,原來是Windows 8也要做相對的權限設定,要再下 cmdkey /add:<ServerName> /user:<UserName> /pass:<password> 等等,實在太麻煩了。

要簡化權限設定得用 Hyper-V Remote Management Configuration Utility (hvremote.wsf),怎麼設定要看底下這張表:

Configuration Where Purpose Commands
Client and Server both workgroup Server Create a local account (eg "john") Use net user /? or Computer Management 
  Server Grant the user access cscript hvremote.wsf /add:accountname          ***
  Client Allow Anonymous Logon remote DCOM access cscript hvremote.wsf /anondcom:grant
  Client Logon with matching local account. Ctrl+Alt+Del :)
  Client If passwords do not match cmdkey /add:servername /user:servername\account /pass
  Both   Verify configuration for errors cscript hvremote.wsf /show /target:othercomputername
-------------------------      
Client workgroup, Server domain Server Grant domain account access cscript hvremote.wsf /add:domain\account           ***
  Client Allow Anonymous Logon remote DCOM access cscript hvremote.wsf /anondcom:grant
  Client Set credentials for domain account cmdkey /add:servername /user:domain\account /pass
  Both   Verify configuration for errors cscript hvremote.wsf /show /target:othercomputername
-------------------------      
Client domain, Server workgroup Server Create a local account (eg "john") Use net user /? or Computer Management 
  Server Grant the user access cscript hvremote.wsf /add:accountname           ***
  Client Allow Anonymous Logon remote DCOM access cscript hvremote.wsf /anondcom:grant
  Client Set credentials for local account Use cmdkey /add:servername /user:servername\accountname /pass
  Both   Verify configuration for errors cscript hvremote.wsf /show /target:othercomputername
-------------------------      
Client and Server both domain Server Grant the non-admin user access cscript hvremote.wsf /add:domain\account           *** 
  Both   Verify configuration for errors cscript hvremote.wsf /show /target:othercomputername


其中有個弔詭的地方,就是兩台(Client與Server)的網路設定,在用 cscript hvremote.wsf /show /target:othercomputername 看的時候會警告的話,得加到 %windir%\system32\drivers\etc\hosts 這個檔,再重新加入到伺服器管理員,這時候才能遠端管理。

接下來,就可以快樂的玩Hyper-V 3.0了!

猜你喜欢

转载自top5.iteye.com/blog/1996081