February 01, 2015

About Hyper-V Virtual Processor Limitations

I was reviewing older posts on the Petri IT Knowledgebase when I noticed an article called Virtual Processor Limitations in Hyper-V. It occurred to me that I should write an updated post that covers a few related topics. In this article, I will clear up a few myths about Microsoft guidance and talk about support virtual processor maximums in Hyper-V.

Virtual Processors versus Logical Processors

Consider a physical computer for a moment. This machine has one or more CPUs or sockets. Each CPU has a number of cores. Most Intel desktop or server processors feature something called hyper threading. This is a design that improves parallelization, enabling a single core to process two threads of execution at once. This isn't truly a doubling of processing horsepower, but it does improve capacity when using modern software on a modern processor. In virtualization, it is important to understand how many logical processors a host has. If you have an AMD 8-core CPU, then that CPU has 8 logical processors (LPs). If you have an Intel 8-core CPU, then it will have 8 LPs if hyper threading is disabled and 16 LPs is hyper threading is disabled.

Each virtual machine you create also has one or more single-core virtual processors. Each virtual processor executes on a host's LPs. What does this mean? If a host has 16 LPs, then the most number of virtual processors (vCPUs) that can be executing on the host hardware at once is 16. I've tried to use precise wording here because there is a subtlety; I can actually overcommit my processors by having lots more virtual machines in a running state. The hypervisor will swap virtual machines in and out on the physical processors based on demand and resource control.

Let's make this clear with a few examples.
  • I have a host with 16 LPs.
  • At any one point in time I can have 8 virtual machines with 2 vCPUs executing on the physical processors. Or that might be 16 x 1 vCPU virtual machines, or 4 x 4 vCPU VMs, or any mix that makes up to 16 vCPUs.
  • However, I might have 50 virtual machines with one or more vCPUs actually running on that host. The hypervisor will swap them in and out of the physical processor, so I don't notice the over-commitment.

That might sounds scary if you're new to virtualization, but we've been doing that sort of thing for decades with software, and it's been the norm for the last 10+ years of machine virtualization.

Maximum Processor Counts

There are four factors to consider:

    How many logical processors are supported by your specific version of Hyper-V?
    What are the maximum number of vCPUs supported on a host?
    How many vCPUs are supported per LP on the host?
    What are the performance requirements of your guests' services?

The first two questions are easy to answer with a search engine by querying 'Hyper-V 2012 R2 Maximums.' In the case of Windows Server 2012 R2 (WS2012 R2) Hyper-V, a single host can have up to 320 logical processors and can support up to 2048 vCPUs on 1024 virtual machines running on a single host.

Note: When you log into a host and run Task Manager, you will see a maximum of 64 logical processors on the host; rest assured that all the logical processors are there and used by the virtual machines it's just that a single install of Windows Server can only use up to 64 logical processors.

In the case of Windows Server 2008 R2 (W2008 R2) Hyper-V, a host can have up to 64 logical processors, and a single host can support up to 512 running vCPUs on 384 running virtual machines.

Older versions of Hyper-V applied a vCPU:LP ratio. In the case of server workloads, Microsoft supported 8 server vCPUs per LP in the host to be running at any one time. So if my host had 8 LPs, Microsoft would support me having 32 x virtual machines, each with a 2 vCPUs. For VDI workloads, we had a 12:1 ratio. That would mean my 8 LP host could run up to 96 virtual machines with a single vCPU each. Microsoft dropped this ratio with the release of Windows Server 2012 (WS2012) Hyper-V, which is because of the fourth question above.

In reality, all these ratios and counts are theory for exams. There is no "you can run X virtual machines" on a host rule in Hyper-V. Virtual machines on all platforms are just like physical servers in terms of resource requirements. Some services are heavy consumers of cores, some services require lots of cores for multi-threading, and some services are lightweights. Microsoft's guidance is quite realistic: you can fit as many virtual machines onto your hardware as your hardware can support, and this is dictated by the workloads that you will run in those virtual machines. In the real world, you'll hit a performance ceiling long before you hit the theoretical maximums of supported vCPUs per host.

Hyper-V Virtual Processor Best Practices

Microsoft does not have and never has had a general rule of having one LP per vCPU. However, some products from Microsoft have issued support guidance. Some products will support 2 vCPUs per LP, and some want a 1:1 assignment. This is a per-product guidance and affects only those virtual machines running those products. You can use Resource Control to enforce this guidance.

Another best practice is to not go crazy with assigning vCPUs. The MSDN Performance Tuning Guidelines for Windows Server 2012 R2 advises that you should only assign enough vCPUs to a virtual machine to meet the needs of that machine's services. Wastefully assigning vCPUs will reduce the performance of the host and other virtual machines.

A related tip is to monitor the processor queue length within the guest operating systems of your virtual machines, especially mutli-threaded ones such as those running SQL Server. If this metric rises beyond acceptable levels then assign more virtual CPUs to the virtual machine.


Using Internet Explorer 11 Edge Mode in Windows 10 Technical Preview

In August 2013, Microsoft announced that document modes would be deprecated starting with Internet Explorer 11. IE in the Windows 10 Technical Preview is the only version that currently includes Edge Mode, and any sites that need one of the deprecated document modes to render correctly will have to be recoded to adhere to web standards going forward.

Enabling Edge mode on the new Experimental Features dashboard in Internet Explorer 11 on the Windows 10 Technical Preview. (Image Credit: Russell Smith)

Enabling Edge mode on the new Experimental Features dashboard in Internet Explorer 11 on the Windows 10 Technical Preview.

At the time of writing, Edge Mode is only enabled by default for a small percentage of Windows Insider users who have downloaded the Windows 10 Technical Preview. But Edge Mode can also be enabled and disabled manually.

What is Edge Mode?

The concept for Edge Mode comes from the interoperability strategy deployed in Mobile IE in Windows Phone 8.1 Update, where prior to the update it was found that either mobile versions of sites weren't displayed or sites didn't display correctly.

In the updated IE11 on Windows Phone, changes were made to ensure that sites render in a similar way to how Safari and Chrome users see them on iOS and Android devices, even if that meant implementing changes that didn't adhere to standards.

The IE11 Windows 10 Technical Preview has an interoperable User Agent (UA) string to help ensure that the browser is provided with site mark-up that uses modern web standards and not IE-specific code. Edge Mode will be the new default setting in IE12 and is designed to replace all previous document compatibility modes.

New HTML5 Feature Support

The Windows 10 Technical Preview supports some new HTML5 features that are currently in development, including:

  • WAV lossless PCM audio
  • ECMAScript 6 Features
  • Gamepad API to give JavaScript access to game controllers over USB
  • Content Security Policy 1.0
  • CSS Interaction Media Queries (Level 4) for responsive input on different device types

Content Security Policy 1.0 Support for a Safer Browsing Experience

One of the most interesting features for IT administrators is support for Content Security Policy 1.0, which when defined in the HTML code, instead of complying with the web's same origin policy, trusting everything that a web server delivers, a whitelist of trusted content sources can be specified to help prevent cross-site scripting attacks. Content Security Policy can contain one or more directives that determine where trusted content can be downloaded. IE10 and later already include limited experimental support for Content Security Policy 1.0 using the X-Content-Security-Policy header.

Enable Edge in IE11 on Windows 10 Technical Preview

Edge can be enabled in the new experimental features dashboard. To get to the dashboard, open Internet Explorer by clicking the icon on the desktop taskbar, type about:flags in the address bar, and press ENTER.

Check Enabled, under Enable Experimental Web Platform Features, and then restart the browser. Now you will be using Edge Mode, and you can always disable the feature if you run into any problems.

Updating the Windows 10 Technical Preview to the Latest Build

In this article, I'll teach you how to upgrade to the latest Windows 10 Technical Preview build and learn about the two update tracks Microsoft is offering within Windows Insider program.

Yesterday Microsoft released Windows 10 Technical Preview build 9860, and in this Ask the Admin I'll show you how to perform an upgrade. Before starting, be aware that there is no .iso for this build. I suspect that Microsoft might not release another .iso for Windows 10 until the consumer preview arrives in early 2015. Assuming that it will be possible to upgrade to the latest builds without applying every preceding update, the lack of .iso shouldn't be much of a problem.

Slow and fast track updates

After the upgrade to build 9860, there is the option in PC Settings to choose between two different update tracks. Internally, Microsoft has three tracks: Canary for daily builds, Operating System Group (OSG) once approved by the Canary track, and then Microsoft as a whole once the build has been approved by OSG.

Once a new build has been validated by Microsoft employees, it's released to the Windows Insiders 'fast track' first, and at a later stage to the Windows Insiders 'slow track.' Users running the Windows 10 Technical Preview will be able to choose between slow and fast tracks in build 9860 and later. Although regular updates might be interesting to investigate for IT professionals, it will be more important to see how Microsoft decides to cope with delivering frequent builds via Windows Update.

Update to the latest build

There are nearly 7,000 improvements in build 9860, including features borrowed from Windows Phone 8.1, such as Action Center and Battery Saver. If you'd like to know more about these and other new features in Windows 10,

To update to build 9860, log in to Windows 10 and follow the instructions below.

  • Open PC Settings from the Start menu. PC Settings is listed in the Quick Links section of the Start menu by default.
  • In PC Settings, click Update and recovery on the left.
  • In the left of PC Settings, click Preview builds and then the Check now button on the right.
Checking for a new preview build in Windows 10 Technical Preview. (Image Credit: Russell Smith)

Checking for a new preview build in Windows 10 Technical Preview.

  • If a new preview build is available, click Download now on the right in PC Settings.
  • Once the build bits have downloaded, in PC Settings click Install now.
Installing a new preview build in Windows 10 Technical Preview. (Image Credit: Russell Smith)

Installing a new preview build in Windows 10 Technical Preview.

The install process for build 9860 takes much longer than a clean install of Windows 10 Technical Preview using the .iso, so be prepared to wait.

  • Once the initial phase of the upgrade has completed, you'll be prompted to restart the PC. You can opt to restart right away or at a later stage. Select Now from the Restart and update menu and click OK.
Rebooting your PC to update Windows 10 Technical Preview. (Image Credit: Russell Smith)

Rebooting your PC to update Windows 10 Technical Preview.

The PC might start several times during the update process. When the update has finished, log on to the PC. They will be another delay while Windows reinstalls your Universal apps. Users of Windows Phone 8.1 will be familiar with this process.

Log in to Windows 10 Technical Preview after updating. (Image Credit: Russell Smith)

Log in to Windows 10 Technical Preview after updating.

Configure new update options in PC Settings

Now that the new build has been installed, you can choose between fast and slow track updates. The slow track is the default track.

  • Open PC Settings from the Start menu.
  • In PC Settings, click Update and recovery on the left.
  • Under Update and recovery, click Preview builds.
  • On the right side of PC Settings under Preview builds, select Fast or Slow from the drop-down menu.
  • Click Check now if you want to check for new builds right away.
  • Close PC Settings.
Select your preferred update track after updating to build 9860. (Image credit: Russell Smith)

Select your preferred update track after updating to build 9860.

In the final version of Windows 10, Microsoft has promised that there will be three update tracks: Consumer, Near Consumer and Enterprise. But that could change between now and RTM.

Easily Edit the Hosts File in Windows 10

Most operating systems, including Microsoft Windows versions, use the hosts file to translate computer names. Also known as "host names" to numerical IP addresses, the hosts file is similar to using a phone book to find the matching phone number of a specific person's name.

While Domain Name System – or DNS – is mostly used for this function (being a centralized and half-automatically managed name resolution system), the HOSTS file can be used as a local name resolution mechanism, and when used in conjunction with other name resolution mechanisms such as DNS, the HOSTS file takes precedence over them.

This is why many users still edit the HOSTS file and add names and IP addresses of servers, websites and other computers they frequently access to it.

Location of the Hosts File

In Microsoft operating systems, the HOSTS file is located in the following location:

C:\Windows\System32\Drivers\etc

How the Hosts File Works

The HOSTS file is a text file, one that does not have a file extension. It contains lines of text that are made of IP addresses followed by one or more host names or fully qualified domain names (FQDNs). Each field is separated by white space (blanks or tabulation characters).

For example, if you wanted to use the HOSTS file to translate a host name of a computer called "printserver" into the IP address of 192.168.0.1, you would add this line:

1
192.168.0.1 printserver

You can add more than one host name to the same IP address. For example, if the computer called "printserver" also acts as a scanner called "scanserver", you could use this line:

1
192.168.0.1 printserver scanserver

If you ping either "printserver" or "scanserver", you'd get to the same IP address:

Edit the HOSTS File in Windows 10

 

The HOSTS file can also translate Fully Qualified Domain Names (or FQDNs) of computers, such as ones used on the Internet.

For example, if you wanted to add a manual line to translate a FQDN of a computer called "webserver.domain.com" into the IP address of 8.8.8.8 (this is just an example, actually 8.8.8.8 is the IP address used by Google's DNS servers), you would add this line:

1
8.8.8.8 webserver.domain.com

When you ping it, your computer will resolve the name to the correct IP address:

edit-hosts-file-win10-3

You can also include comment lines by placing a hash character (#) at the beginning of the line.

This is how the HOSTS file looks on a Windows 10 Technical Preview build machine:

edit-hosts-file-win10-1

The HOSTS file may sometimes be used by malicious software such as adware, computer viruses, or trojan horses etc. These applications may use it to redirect traffic from the intended destination to sites hosting malicious or unwanted content. That is why some Anti-Virus programs may monitor changes to the HOSTS file, preventing malicious software from modifying it. So does Windows, and unless you use elevated permissions to edit the file, you will be prevented from saving it.

How to Edit the Windows 10 Hosts File

To edit the HOSTS file we need to use a method that allows us to save the file to it's original location, which is:

C:\Windows\System32\Drivers\etc

1. To do so, copy the HOSTS file to your Desktop.

edit-hosts-file-win10-4

2. Open the copy from your Desktop in Notepad.

edit-hosts-file-win10-5

edit-hosts-file-win10-6

3. Make all necessary changes. For example, adding a line that translates 192.168.1.1 to "kuku". Save the copy.

edit-hosts-file-win10-7

4. Next, copy and paste the file to its original location.

edit-hosts-file-win10-8

5. You will be asked if you want to overwrite the file. Choose Replace the file in the destination.

edit-hosts-file-win10-9

6. Windows will ask for Administrator permissions. Click Continue.

edit-hosts-file-win10-10

7. The changed HOSTS file will replace successfully the original, and now, if you ping "kuku" you will get the corresponding IP address.

edit-hosts-file-win10-11

 

 

Microsoft Provides a Much More Complete Look at Windows 10

As expected, Microsoft provided a lot more information about Windows 10 at a media event on Wednesday and promised to ship many of the new features to testers within the week. But the software giant also had a few surprises up its sleeve, including giant new Surface Hub conferencing systems and an innovative augmented reality headset called HoloLens.

Microsoft is promising to ship many of the new Windows 10 features to testers within the week following Wednesday's media event in Redmond. (Image Credit: Microsoft)

"Windows 10 is the first step to an era of more personal computing," Windows lead Terry Myerson said today. "We are moving Windows from its heritage of enabling a single device–the PC–to a world that is more mobile, natural and grounded in trust."

Myerson and his coworkers then stepped through a two-and-a-half hour presentation that piled up the news in such rapid succession that it was almost hard to keep up. But here are the highlights.

Windows 10 will be a free upgrade for consumers for a limited time. In a bid to get as many users on the latest Windows version as quickly as possible, Microsoft will make Windows 10 available for free to users of Windows 7 with Service Pack 1, Windows 8.1, and Windows Phone 8.1. This offer will be available for the first year of Windows 10's life cycle. Windows 10 will also be a free update for Xbox One.

Windows 10 is being positioned as "Windows as a service." In order to get that free Windows 10 upgrade, consumers will need to agree to let Microsoft update the product for the lifetime of the devices on which it is installed. This will effectively remove the need to worry about version numbers since most users will always be up-to-date.

Businesses can still license Windows 10 in traditional ways. But Microsoft would really like to see its business customers adopt the always up-to-date strategy as well.

Windows Phone will be replaced by Windows 10 for phones and small tablets. Smartphones and tablets with screens smaller than eight inches will have their own Windows 10 version that looks and works much like Windows Phone OS.

Continuum arrives. For detachable PCs like Surface, Windows 10 will provide a seamless transition between laptop and tablet states, where apps float on the desktop in the former and run full-screen in the latter.

Cortana is coming to the PC and Xbox One. Windows 10 will include an improved version of the Cortana personal digital assistant capabilities that debuted in Windows Phone 8.1.

Project Spartan is a new web browser. It won't replace Internet Explorer yet because of compatibility reasons, but this new browser adopts a sleek new UI, typed and handwritten page annotation functionality, easier sharing, an improved reading view and offline article viewing.

Office universal apps will be included with Windows 10. If you're using Windows 10 on a phone or small tablet, you will get the Office universal apps — Word, Excel, PowerPoint, and Outlook Mail and Calendar — for free.

Universal apps are new and improved. Apps like Photos, Videos, Music, Maps, People, Messaging, Mail and Calendar are being updated with the evolved look and feel of Windows 10, to support usage across device types, and to support content sync via OneDrive.

New Xbox app. A new Xbox app will be the hub for all your Xbox gaming activity in Windows 10 and will provide new features like Xbox One game streaming (to any Windows 10 PC or tablet), friend finding, and more.

New devices. Microsoft showed off two new devices, the Surface Hub — an 84-inch screen with an internal Windows 10 PC and an array of sensors and unique capabilities — and HoloLens, a crazy-innovative augmented reality headset that will have ramifications for both personal and business use.

Microsoft says that testers can expect the new build of Windows 10 — which will include some but not all of the features mentioned above — "within a week," though my sources say this should be available as soon as Friday. And the first pre-release build of Windows 10 will be made available for current Windows Phone devices in February, my sources told me.

Looking ahead, Microsoft says it plans to reveal more information at upcoming events such as the Game Developers Conference, WinHEC, Mobile World Congress and Build. The company says it will ship Windows 10 sometime later in 2015.