In a series of blog posts, I'm going to be covering some of the basics that people just happen to overlook. Let's forget about cloud and look back to the real reason why we started virtualizing in the first place, the virtual machine. The virtual machine is key component to cloud, but having machines that are lean and clean allow greater density and better performance.
Last week I touched on P2V Clean-up and the 1vCPU goal. This post continues on with the 1vCPU goal and addresses the issues of moving between single processor and multi-processor VMs.
As I said last week, we should be striving to keep our virtual environment lean and clean by moving to a standard 1vCPU for all VMs that don't have multi-threaded applications. So what happens if we P2V a dual core physical machine but it only needs 1vCPU?
HAL, otherwise known as Hardware Abstraction Layer, is the software that talks directly to the hardware so the applications don't have to. The HAL provides routines that enable a single device driver to support a device on different hardware platforms, making device driver development much easier. It hides hardware dependent details such as I/O interfaces, interrupt controllers, and multiprocessor communication mechanisms. Applications and device drivers are no longer allowed to deal with hardware directly and must make calls to HAL routines to determine hardware specific information. Thus, through the filter provided by the HAL, different hardware configurations can be accessed in the same manner. Article ID: 99588
If you ever decide to go from a multi-CPU to a 1 CPU or 1 CPU to multi-vCPU you need to change the HAL driver. Not changing the HAL driver can result in BSODs and poor performance because the HAL thinks it's talking to a different set of CPUs.
Changing the HAL is very simple. To downgrade the HAL from a multi CPU or multi vCPU to 1vCPU follow this set of instructions from Rich Brambley at VMetc.com:
How to downgrade the HAL:
-
- Right-Click My Computer
- Properties > Hardware Tab > Device Manager
- Expand +Computer
- Right-Click ACPI Multiprocessor
- Choose Update Driver
From here Windows Dialogs vary – but whatever your version – you need to use
-
- Install from a list or specific location (advanced)
then
-
- Don’t search. I will choose a driver to install
You should then get the option to change the ACPI type
An easier way to do this is from a script I found that is packaged in the VM Advanced ISO. There are 2 scripts that can change the HAL from Multi-processor to Uni-processor and vice-versa.
Note that changing the HAL driver is only necessary on Windows XP and Windows 2003. The Windows 2008 driver is loaded with both sets of instructions so changing the HAL is unneccessary.