• Some users have recently had their accounts hijacked. It seems that the now defunct EVGA forums might have compromised your password there and seems many are using the same PW here. We would suggest you UPDATE YOUR PASSWORD and TURN ON 2FA for your account here to further secure it. None of the compromised accounts had 2FA turned on.
    Once you have enabled 2FA, your account will be updated soon to show a badge, letting other members know that you use 2FA to protect your account. This should be beneficial for everyone that uses FSFT.

Server 2012R2 in VM Acting Up

USMCGrunt

2[H]4U
Joined
Mar 19, 2010
Messages
3,103
So I am trying to setup a couple 2012R2 VMs to experiment with Failover and become familiar with it, unfortunately, initial setup of the VMs is proving to be a pain. I have allocated 8 vCPUs and reserved 45% of the processing to the VM (i7 2700k) along with 4GB of RAM, which should be plenty of horsepower to get this thing going. OS Installation runs fine, get into the OS and run Windows Update and it says there are X number of updates to install. I install the updates, it requests a restart and I do a restart. It does some processing, restarts, does some more update processing after the update and then says, "Can't install updates, reverting changes." This whole process takes quite a bit of time and once I am able to log back into the OS, the Windows Update log displays no errors, there are no warnings or errors in the event viewer logs. When I goto Windows Updates, not clicking on check for updates, it shows the same number of updates and the same updates it just installed. If I click check for updates, the number changes as if it actually DID do the install. While this may just be an inconvenience, its something I've never ran into before with all the different VMs I've setup. The only difference I can think of is that I am using a Gen2 VM and have the network adapter set to be isolated from the host OS....but those settings shouldn't be causing this.

Cant seem to find any information on this through the great Google, anybody have any ideas?
 
You said the event viewer logs were empty. There is a separate file containing windows update logs. %windir%\windowsupdate.log
 
...This whole process takes quite a bit of time and once I am able to log back into the OS, the Windows Update log displays no errors, there are no warnings or errors in the event viewer logs....

Though I will admit, I didn't really make a very good post there.
 
you could try to stop the update service, rename/delete the datastore.edb file, remove the contents of the "download" folder, and restart the update service/reboot the server. That should wholly reload Windows update and force it to re-cache all the needed updates. I've had to do that a couple times.

C:\Windows\SoftwareDistribution\DataStore\DataStore.edb <-- Windows Update database file
 
Last edited:
Turns out it had to do with using a Gen2 VM...kind of. Gen2 VMs enable a few new features, one of which is the use of a UEFI BIOS which allows for the use of Secure Boot. While Secure Boot is supposed to stop unauthorized software from running, it appears bugged in Hyper-V and doesn't recognize windows updates as legitimate software. Turned off Secure Boot and updates started installing normally and have also set up a brand new VM from scratch with Secure Boot disabled from the get go and there have been no issues at all. Stumbled onto the solution after an update failing to install with an error of 800F0922.
 
Weird. None of my Gen 2 VMs have had this problem both at home and with clients.

Are they also 2012R2? I dunno, I am using Hyper-V for Windows 8.1, and an image downloaded from Microsoft's VLSC. I've setup four separate VMs with this issue before I stumbled onto the fix.
 
Well #1 if your physical computer has 4 real cores (8 logical with HT) why are you assigning 8 vCPUs to the VMs? Give them 1, maybe 2, unless you know they need more. HT cheats by presenting each physical core as two processing threads which works ok when you have lots of 1 or 2 thread apps or VMs running but when you try to give ALL the logical cores to a single VM it won't perform well.

Plus, there's no need to reserve CPU for the VMs either unless your application demands it. Just assign 1 or 2 vCPUs per VM and go. See what that does.
 
Gah. SecureBoot strikes again. It's a nice idea in theory, but in practice it causes me so much grief.
 
Well #1 if your physical computer has 4 real cores (8 logical with HT) why are you assigning 8 vCPUs to the VMs? Give them 1, maybe 2, unless you know they need more. HT cheats by presenting each physical core as two processing threads which works ok when you have lots of 1 or 2 thread apps or VMs running but when you try to give ALL the logical cores to a single VM it won't perform well.

Plus, there's no need to reserve CPU for the VMs either unless your application demands it. Just assign 1 or 2 vCPUs per VM and go. See what that does.

My understanding of vCPUs, at least with Hyper-Visor, is that all your doing is telling the VM how many threads its allowed to send to the processor. An i7 has 8 threads so I set them up to use 8. I know they don't NEED it but it also shouldn't hurt anything either while giving them the added speed boost. I also gave them a CPU reservation just to familiarize myself with the settings and see it in action.

These settings shouldn't cause Windows Update to malfunction in the way it was and I believe, though I can't remember for sure, that I originally set up a couple machines without doing anything more than assigning 2 vCPUs to them and running into this issue.
 
My understanding of vCPUs, at least with Hyper-Visor, is that all your doing is telling the VM how many threads its allowed to send to the processor. An i7 has 8 threads so I set them up to use 8. I know they don't NEED it but it also shouldn't hurt anything either while giving them the added speed boost. I also gave them a CPU reservation just to familiarize myself with the settings and see it in action.

These settings shouldn't cause Windows Update to malfunction in the way it was and I believe, though I can't remember for sure, that I originally set up a couple machines without doing anything more than assigning 2 vCPUs to them and running into this issue.

Hyper-V's CPU scheduler is more forgiving than VMware's, however, and everyone feel free to correct me if I'm wrong, it is still effected by overprovisioning vCPUs when it comes to Hyperthreading.

Hyperthreading may present two processing threads per core to the host and VMs, but when two threads execute in parallel on a core, that core is unavailable until both threads complete. This means that if the host has 8 logical cores thanks to HT and you assign 8 vCPUs to a VM, that VM expects to behave as if it has access to 8 real cores. Since that "wait" exists due to two threads holding up a single physical core until both are finished, the CPU does not perform as the VM expects since it is not aware that HT is enabled on the host.

I spoke to a client recently who moved some SQL servers from VMware to Hyper-V. In VMware, he had assigned 4 vCPUs to each VM since the hosts they were running on had 2x 4 core CPUs. His new Hyper-V hosts had 2x 10 core CPUs which equated to 40 logical cores per host thanks to HT.

His VMs performed well in VMware but seemed a little CPU bound. When he moved them to Hyper-V, he dedicated 2 SQL VMs per host only and gave them each 20 vCPUs thinking that each NUMA node on the host was 20 logical processors. He discovered that the VM's performed WORSE in this scenario and CPU utilization was almost always spiked. I told him I thought it was due to high CPU WAIT times (didn't have access to his environment so couldn't check for myself) since he was giving the VMs 20 vCPUs and to try lowering them to 10 vCPU each then disabling HT on the host. He didn't want to try this and as far as I know blames Hyper-V for the performance loss and wants to move back to VMware (which I think he was aiming for all along since it wasn't his call to move to Hyper-V).

When a host has 4 physical cores and HT, assigning up to 4 vCPUs per VM should behave just fine but giving 4 VMs 8 vCPUs, each with a CPU reservation, would probably send CPU WAIT times through the roof and cause a litany of performance issues.

Again, I could be totally off base and welcome a bitch slap if I am. :)
 
Replying on my phone so I haven't read the article yet but, is there a particular tool I should use to see cpu wait times or is there a built in tool to see it?
 
From Perfmon on the Hyper-V host look at the "Hyper-V Hypervisor Virtual Processor\CPU Wait Time Per Dispatch" counter. It displays how long a vCPU was in a ready state waiting for physical CPU resources and is measured in nanoseconds.
 
Last edited:
Back
Top