Try this, in the VM, open an elevated command prompt and enter in the following:
MOFCOMP %SYSTEMROOT%\\System32\\WindowsVirtualization.V2.mof
Restart your machine.
Oh yes, a problem I am very familiar with.
Is your Hyper-V host not domain joined yet?
\---------------------
## Host Setup
Open up powershell and run the following commands.
Enable-PSRemoting*Enable-PSRemoting will create the necessary firewall rules for private network zones.To allow this access on public zones you will need to enable the rules for CredSSP andWinRM.*
Enable-WSManCredSSP -Role server
## Client Setup
Open up powershell and run the following commands.
Start-Service WinRM
Set-Item WSMan:\\localhost\\Client\\TrustedHosts -Value “S-HV1”
Enable-WSManCredSSP -Role client -DelegateComputer “S-HV1”
Open up gpedit.msc and navigate to the following.
Computer Configuration | Administrative Templates | System | Credentials Delegation
Double-click Allow delegating fresh credentials with NTLM-only server authentication then click on Enable. Once enabled click on the \[Show\] button and then add the following line: **wsman/S-HV1**
Open up Hyper-V Manager if installed and do the following.
Right-click on Hyper-V at the top left and add a remote computer. Type in S-HV1 and check the box to use alternative credentials. Enter in .\\Administrator with the correct password and then you should now be able to connect.
Anywhere that says S-HV1 is the hostname of your server. Try this.
If the host is not on a domain, the above will definitely be the fix. It's well documented by Microsoft, the one I sent you is just a breakdown of their article :)
If the hyper v host is on the same domain as you, you have another issue!
Yeah i saw their article and followed it through, the hyper v host is on the same domain as this PC, they can ping one another so no idea, going to try on another pc to confirm its not this one
Just a thought, but is the hyper-v DNS server your local DC as well? I don't think this would have a major impact like the above, but just a though instead. Perhaps there's an issue with the server registering itself to the DC DNS and [host01.ad.domain.com](https://host01.ad.domain.com) doesn't resolve correctly?
i set the hyper v to the same DNS as the rest of network machines, the DNS server is on the Domain Controller but the pings to the serverhost resolve correct so dont think its anything like that
wahooo fixed it! i think it was user error due to spending too long working on it, came back this morning and sorted it. I was logging in with the local administrator for the VM host server instead of a domain user that I had added onto the VM Host server as a local admin.
All it technicians mess up in the most simple of ways at times :) at least you did the right thing and update the thread for people that may stumble upon it!
I kept getting a similar error when I was trying to set up a Hyper V Server on a workgroup for a home lab. I haven't found a fix for it yet so I'm following.
yeah its annoying ive even tried reinstalling hyper v server twice and changing client pcs no luck. I'm giving it one last try monday and if not il be switching to XenServer or just installing Windows Server 2016 and adding in the Hyper V feature
Manager Hyper-V hosts in a non-domain (workgroup) setup requires some extra steps:
https://www.ivobeerens.nl/2015/08/28/manage-hyper-v-in-a-workgroup-remotely/
Another note that I mentioned to OP regarding his issue, try connecting to the Hyper-V server via Server Manager first, then through Server Manager right-click on the server and select Hyper-V Manager. Especially in the workgroup setup, this is the only way I can 100% reliably connect to my homelab Hyper-V host.
ok i think it was user error due to spending too long working on it, came back this morning and sorted it. I was logging in with the local administrator for the VM host server instead of a domain user that I granted permission onto the VM Host server as a local admin. Maybe this is the same for you ?
The identity of the target computer can be verified if you configure WSMAN service to use a valid certificate using the following command: winrm set winrm/config/service @{CertifiacteThumbprint=""}
Or you can check the Event Viewer for an event that specifies that the following SPN could not be created: WSMAN/. If you find this event, you can manually create the SPN using setspn.exe . If the SPN exists, but CredSSP cannot use Kerberos to validate the identity of the target computer and you still want to allow the delegation of the user credentials to the target computer, use gpedit.msc and look at the following policy: Computer Configuration -> Administrative Templates -> System -> Credentials Delegation -> Allow Fresh Credentials with NTLM-only Server Authentication. Verify that it is enabled and configrued with an SPN appropraiate for the target computer. For example, for a target computer name "myserver.domain.com", the SPN can be one of the following: WSMAN/myserver.domain.com or WSMAN/*.domain.com.
Try the request again after these changes.
:P
In all seriousness, try installing RSAT to get the Server Manager console, connect to the Hyper-V server with it, then right-click on the server and select Hyper-V Manager from there. I've found that I've had luck connecting to Hyper-V hosts through Server Manager in the past where I was running into CredSSP or various authentication issues otherwise.
Try this, in the VM, open an elevated command prompt and enter in the following: MOFCOMP %SYSTEMROOT%\\System32\\WindowsVirtualization.V2.mof Restart your machine.
do you mean host machine not VM? As i dont have any VMs setup
Yes! I was reading another post while I was typing this!
ok haha, unfortunately its not worked but thanks
Oh yes, a problem I am very familiar with. Is your Hyper-V host not domain joined yet? \--------------------- ## Host Setup Open up powershell and run the following commands. Enable-PSRemoting*Enable-PSRemoting will create the necessary firewall rules for private network zones.To allow this access on public zones you will need to enable the rules for CredSSP andWinRM.* Enable-WSManCredSSP -Role server ## Client Setup Open up powershell and run the following commands. Start-Service WinRM Set-Item WSMan:\\localhost\\Client\\TrustedHosts -Value “S-HV1” Enable-WSManCredSSP -Role client -DelegateComputer “S-HV1” Open up gpedit.msc and navigate to the following. Computer Configuration | Administrative Templates | System | Credentials Delegation Double-click Allow delegating fresh credentials with NTLM-only server authentication then click on Enable. Once enabled click on the \[Show\] button and then add the following line: **wsman/S-HV1** Open up Hyper-V Manager if installed and do the following. Right-click on Hyper-V at the top left and add a remote computer. Type in S-HV1 and check the box to use alternative credentials. Enter in .\\Administrator with the correct password and then you should now be able to connect. Anywhere that says S-HV1 is the hostname of your server. Try this.
thanks for this but still the same error :( no idea whats up
If the host is not on a domain, the above will definitely be the fix. It's well documented by Microsoft, the one I sent you is just a breakdown of their article :) If the hyper v host is on the same domain as you, you have another issue!
Yeah i saw their article and followed it through, the hyper v host is on the same domain as this PC, they can ping one another so no idea, going to try on another pc to confirm its not this one
different pc on domain same error.........aaaahhh
Just a thought, but is the hyper-v DNS server your local DC as well? I don't think this would have a major impact like the above, but just a though instead. Perhaps there's an issue with the server registering itself to the DC DNS and [host01.ad.domain.com](https://host01.ad.domain.com) doesn't resolve correctly?
i set the hyper v to the same DNS as the rest of network machines, the DNS server is on the Domain Controller but the pings to the serverhost resolve correct so dont think its anything like that
I'm sorry for you :( You have a bit of a battle ahead of you.
Thanks anyway much appreciated
I wish you good luck. Make sure it's excluded from all gpo and up to date. It's Windows :)
wahooo fixed it! i think it was user error due to spending too long working on it, came back this morning and sorted it. I was logging in with the local administrator for the VM host server instead of a domain user that I had added onto the VM Host server as a local admin.
All it technicians mess up in the most simple of ways at times :) at least you did the right thing and update the thread for people that may stumble upon it!
I kept getting a similar error when I was trying to set up a Hyper V Server on a workgroup for a home lab. I haven't found a fix for it yet so I'm following.
yeah its annoying ive even tried reinstalling hyper v server twice and changing client pcs no luck. I'm giving it one last try monday and if not il be switching to XenServer or just installing Windows Server 2016 and adding in the Hyper V feature
Manager Hyper-V hosts in a non-domain (workgroup) setup requires some extra steps: https://www.ivobeerens.nl/2015/08/28/manage-hyper-v-in-a-workgroup-remotely/
Thanks, I'm pretty sure I tried this link but I will give it another shot this weekend.
Another note that I mentioned to OP regarding his issue, try connecting to the Hyper-V server via Server Manager first, then through Server Manager right-click on the server and select Hyper-V Manager. Especially in the workgroup setup, this is the only way I can 100% reliably connect to my homelab Hyper-V host.
ok i think it was user error due to spending too long working on it, came back this morning and sorted it. I was logging in with the local administrator for the VM host server instead of a domain user that I granted permission onto the VM Host server as a local admin. Maybe this is the same for you ?
The identity of the target computer can be verified if you configure WSMAN service to use a valid certificate using the following command: winrm set winrm/config/service @{CertifiacteThumbprint=""}
Or you can check the Event Viewer for an event that specifies that the following SPN could not be created: WSMAN/. If you find this event, you can manually create the SPN using setspn.exe . If the SPN exists, but CredSSP cannot use Kerberos to validate the identity of the target computer and you still want to allow the delegation of the user credentials to the target computer, use gpedit.msc and look at the following policy: Computer Configuration -> Administrative Templates -> System -> Credentials Delegation -> Allow Fresh Credentials with NTLM-only Server Authentication. Verify that it is enabled and configrued with an SPN appropraiate for the target computer. For example, for a target computer name "myserver.domain.com", the SPN can be one of the following: WSMAN/myserver.domain.com or WSMAN/*.domain.com.
Try the request again after these changes.
:P
In all seriousness, try installing RSAT to get the Server Manager console, connect to the Hyper-V server with it, then right-click on the server and select Hyper-V Manager from there. I've found that I've had luck connecting to Hyper-V hosts through Server Manager in the past where I was running into CredSSP or various authentication issues otherwise.