VMware Communities > VMTN > VMTN Solutions > User Solutions > Discussions
1 2 3 Previous Next
30 Replies Last post: Jul 25, 2007 7:26 AM by Natiboy
Reply

How to repeatedly upgrade Windows 2003 to SMP and revert to uniprocessor

Jan 10, 2006 3:43 AM

Click to view paulo.meireles's profile Master paulo.meireles 999 posts since
Oct 29, 2004
Problem description
It's commonly heard that you cannot revert a Windows Server 2003 back to Uniprocessor after upgrading to Multiprocessor - and then upgrade to Multiprocessor again. There are some "hacks" that involve manually replacing system files or editing .inf files, but these are, of course, unsupported. The solution described here involves no hacks, no scripting, no manual file replacement, no file editing, and even no command line! It only uses supported mechanisms available on the GUI, so I guess it should be a supported operation.

Warning: The solution described here has only been tested on Windows Server 2003 machines on ACPI VMs.

Common pitfalls
It's considered good practice to start with uniprocessor machines and, only if needed, upgrade them to SMP. This is usually done by powering off the VM, adding a second CPU and powering it on. Windows Server 2003 does, then, detect the second CPU and convert it to an ACPI Multiprocessor PC by itself, and all sems to be OK. The problem is, if we ever need to downgrade back to ACPI Uniprocessor PC, we will no longer be able to; if we go back to one CPU, the machine won't "autoconfigure" itself again; it will remain as ACPI Multiprocessor PC. When this happens, the only options we have are either:
- "Update Driver" to the Advanced Configuration and Power Interface (ACPI) PC HAL/Kernel. Although all seems to work (and, as far as I know, there are no reports of problems arising from its use), there is a lot of FUD about doing this; an official clarification from Microsoft would be nice to have. Moreover, if we install this HAL/Kernel, we won't be able to "Update Driver" to the multiprocessor HAL/Kernel again.

The solution
The trick, if it can be called so, it to use the Roll Back Driver feature on the Device Manager instead of Update Driver. It must, however, be used with caution, and there are some operations that must be done previously or it won't work. Step-by-step, here's how it's done:

- Upgrade to SMP is complete!

- Downgrade to Uniprocessor is complete!

These two operations may now be repeated over and over again.

How to handle machines that already have the SMP HAL/Kernel
The "roll back" trick only works if - expectedly - there's something to "roll back" to. When we install a uniprocessor VM, shut it down, add a second CPU and let plug-n-play do its magic, Windows doesn't make a copy of the previous Kernel/HAL to which we can revert. Also, when we create an SMP VM or P2V an SMP server - which were both installed with the Multiprocessor kernel - there's no Uniprocessor to roll back to. So, the lack of a Uniprocessor HAL/Kernel to which to roll back happens in two scenarios:
- if the Kernel and HAL have been upgraded "by themselves", by just adding a second CPU and rebooting the machine.
However, if you're comfortable with running with the Advanced Configuration and Power Interface (ACPI) PC Hal/Kernel instead of ACPI Uniprocessor PC, here's what you can do:

- Downgrade to Uniprocessor is complete!

- Rollback to Multiprocessor is complete!

Again, these operations may be repeated as many times as you like.

Last thoughts
If you're building a physical Windows 2003 server with only one single-core Intel CPU, you might want to disable HyperThreading before installation, manually select ACPI Multiprocessor PC after installation and only then enable HyperThreading, so you can later revert to ACPI Uniprocessor PC if needed.
The most important thing to keep in mind is that the VM should never be powered on with 2 CPUs and the Uniprocessor HAL, or Windows will upgrade to Multiprocessor by itself and there will be no way back to ACPI Uniprocessor PC.

Paulo
Reply Re: How to repeatedly upgrade Windows 2003 to SMP and revert to uniprocesso Jan 10, 2006 1:02 AM
Click to view devzero's profile Master devzero 2,679 posts since
Dec 27, 2004
*sigh*

(but a good description from you!)

thanks
roland
Reply Re: How to repeatedly upgrade Windows 2003 to SMP and revert to uniprocesso Jan 10, 2006 7:07 AM
in response to: devzero
Click to view Mike_Laverick's profile Virtuoso Mike_Laverick 3,938 posts since
Jan 5, 2004
Moderator
It is possible to do downgrade from Multi-to-Uni using Microsoft's DevCon utility...

It does work - but i cannot speak for the performance...

I wrote a white paper on how to achieve this:

http://www.rtfm-ed.co.uk

Kind Regards
Mike Laverick
Reply Re: How to repeatedly upgrade Windows 2003 to SMP and revert to uniprocesso Jan 10, 2006 8:59 AM
in response to: Mike_Laverick
Click to view paulo.meireles's profile Master paulo.meireles 999 posts since
Oct 29, 2004
Thanks, Mike! I just read your whitepaper, and it's good! I wish I had found about it sooner - it would have saved me a lot of trial and error.

The driver rollback "trick", however, can't be found on your otherwise much more complete whitepaper. Feel free to incorporate it - or any of the information here - if you find it useful.

Paulo
Reply Re: How to repeatedly upgrade Windows 2003 to SMP and revert to uniprocesso Jan 11, 2006 1:18 AM
in response to: paulo.meireles
Click to view Mike_Laverick's profile Virtuoso Mike_Laverick 3,938 posts since
Jan 5, 2004
Moderator
Sure... I will check out your steps and incorporate them (with credits) when I have time...

Regards
Mike
Reply Re: How to repeatedly upgrade Windows 2003 to SMP and revert to uniprocesso Jan 11, 2006 1:40 PM
in response to: Mike_Laverick
Click to view paulo.meireles's profile Master paulo.meireles 999 posts since
Oct 29, 2004
I found a Microsoft KB article with a very interesting paragraph, (http://support.microsoft.com/default.aspx?scid=kb;EN-US;811366) which reads:

"In Windows 2000, you can change to any listed HAL type. However, if you select an incorrect HAL, the computer may not start correctly. Therefore, only compatible HALs are listed in Windows Server 2003 and Windows XP. If you run a multiprocessor HAL with only a single processor installed, the computer typically works as expected, and there is little or no affect on performance." (my emphasis)

This seems to imply that, as soon as a HAL is visible and selected, it's "compatible" - I hope meaning it's supported to change to that HAL. It also seems to imply that it's supported to be running a single-CPU machine with the multiprocessor kernel - and that it doesn't hurt.

Paulo
Reply Re: How to repeatedly upgrade Windows 2003 to SMP and revert to uniprocesso Jan 12, 2006 2:16 PM
in response to: paulo.meireles
Click to view skearney's profile Hot Shot skearney 290 posts since
Jan 28, 2004
Has anybody tried the /HAL option available in boot.ini file as referenced in this KB?

http://support.microsoft.com/default.aspx?scid=kb;en-us;833721
Reply Re: How to repeatedly upgrade Windows 2003 to SMP and revert to uniprocesso Jan 12, 2006 2:28 PM
in response to: skearney
Click to view paulo.meireles's profile Master paulo.meireles 999 posts since
Oct 29, 2004
No, I haven't, but that opens interesting possibilities, like allowing to test a configuration without commiting to it. I especially like this bit: "This switch is useful to try out a different HAL before you rename the file to Hal.dll." I thought manually renaming files was unsupported, and here they are advising how to do it... Are these guys schizophrenic, or what?!

Thanks for sharing!

Paulo
Reply Re: How to repeatedly upgrade Windows 2003 to SMP and revert to uniprocessor Feb 27, 2006 6:29 PM
Click to view nsmallcomb's profile Novice nsmallcomb 19 posts since
Dec 7, 2005
In my experience I have found the following to be untrue:

Windows Server 2003 does, then, detect the second CPU and convert it to an ACPI Multiprocessor PC by itself, and all sems to be OK.

It usually does not detect the second CPU...although when it does...I would agree that all seems OK

Also, I have found that when I try to upgrade the driver to multiproc, I am not always presented with that option. Does anybody have any thoughts on this? Is there a specific .inf I can point the update at?
Reply Re: How to repeatedly upgrade Windows 2003 to SMP and revert to uniprocessor Feb 28, 2006 6:37 AM
in response to: nsmallcomb
Click to view Mike_Laverick's profile Virtuoso Mike_Laverick 3,938 posts since
Jan 5, 2004
Moderator
In my experience I have found the following to be
untrue:

Windows Server 2003 does, then, detect the second CPU
and convert it to an ACPI Multiprocessor PC by
itself, and all sems to be OK.

It usually does not detect the second CPU...although
when it does...I would agree that all seems OK

Also, I have found that when I try to upgrade the
driver to multiproc, I am not always presented with
that option. Does anybody have any thoughts on this?
Is there a specific .inf I can point the update at?


For the hell of it - I did a CPU upgrade on a Win2K3 box... Without having to update the HAL or ACPI - I have 2-CPU's when I originally had just one...

If you upgrade from 1-CPU to 2-CPU the MUI (can't speak for VirtualCenter) it warns you:

"This virtual machine is configured with a single processor. The guest operating system may require additional tuning if this number is increased"

Operative word here is "may" - as the automatic upgrade doesn't work with all Windows OS - and you "may" have to upgrade the ACPI manual to ACPI MultiProcessor

If you downgrade from 1-CPU to 2-CPU the MUI warns you:

"This virtual machine is configured with more than one processor. If you choose a single processor configuration and the guest operating system is tuned for multiple processors, it may not boot and will probably degrade the performance of other virtual machines."

I think this is because it would be up to the operate to downgrade to ACPI Uni-Processor to make sure the HAL.DLL and ntsokernel.exe was correct for the operating system to "idle" correctly

Regards
Mike
Reply Re: How to repeatedly upgrade Windows 2003 to SMP and revert to uniprocesso Feb 28, 2006 9:08 AM
in response to: Mike_Laverick
Click to view nsmallcomb's profile Novice nsmallcomb 19 posts since
Dec 7, 2005
Thank you for suggesting the idea that I use the MUI...I typically use VirtualCenter.

When I went into MUI to upgrade to two procs I found this message:

This virtual machine is using legacy virtual hardware and cannot be configured with more than a single processor. To upgrade the virtual machine's hardware, click here.

VirtualCenter provided no such message and let me change the number of processors without complaining.

Upon clicking "here" I am prompted with:

If this virtual machine's hardware is upgraded, it can only be powered on with ESX Server version 2.0 or later. If you need to run this virtual machine on versions of ESX Server prior to 2.0, then click Cancel. Upgrade virtual hardware now?

Of course I click OK because we are running ESX 2.5.2 across the board.

Now the plot thickens as the windows informs me that the operation timed out. The cause for this was VirtualCenter. Because it was open while I was working in the MUI, VC was prompting me to accept the upgrade prompt in the same way the MUI did. After I responded affirmatively to the pending (backlogged) questions in VC, I clicked "here" again in the MUI then quickly acknowledged the same prompt in VirtualCenter. The upgrade worked successfully in the MUI and I am now able to change it to 2 CPUs.

I boot the VM and still can't get the OS (Windows 2003 Server SP1) to recognize both CPU's. I tried upgrading the driver, but am not presented with the SMP option.

I decided to use the P2V assistant on the drive. When prompted to select the target VMware Product / Virtual Harware the "2 VCPU" options are all greyed out. I am forced to choose a 1 VCPU option.

Thanks for this input thus far. Any ideas?
Reply Re: How to repeatedly upgrade Windows 2003 to SMP and revert to uniprocesso Feb 28, 2006 9:37 AM
in response to: nsmallcomb
Click to view Mike_Laverick's profile Virtuoso Mike_Laverick 3,938 posts since
Jan 5, 2004
Moderator
Thank you for suggesting the idea that I use the
MUI...I typically use VirtualCenter.

When I went into MUI to upgrade to two procs I found
this message:

This virtual machine is using legacy virtual hardware
and cannot be configured with more than a single
processor. To upgrade the virtual machine's hardware,
click here.

VirtualCenter provided no such message and let me
change the number of processors without complaining.

Upon clicking "here" I am prompted with:

If this virtual machine's hardware is upgraded, it
can only be powered on with ESX Server version 2.0 or
later. If you need to run this virtual machine on
versions of ESX Server prior to 2.0, then click
Cancel. Upgrade virtual hardware now?

Of course I click OK because we are running ESX 2.5.2
across the board.

Now the plot thickens as the windows informs me that
the operation timed out. The cause for this was
VirtualCenter. Because it was open while I was
working in the MUI, VC was prompting me to accept the
upgrade prompt in the same way the MUI did. After I
responded affirmatively to the pending (backlogged)
questions in VC, I clicked "here" again in the MUI
then quickly acknowledged the same prompt in
VirtualCenter. The upgrade worked successfully in
the MUI and I am now able to change it to 2 CPUs.

I boot the VM and still can't get the OS (Windows
2003 Server SP1) to recognize both CPU's. I tried
upgrading the driver, but am not presented with the
SMP option.

I decided to use the P2V assistant on the drive.
When prompted to select the target VMware Product /
Virtual Harware the "2 VCPU" options are all greyed
out. I am forced to choose a 1 VCPU option.

Thanks for this input thus far. Any ideas?


This is very interesting scenario (does that make me a sad person)

Firstly this statement...

This virtual machine is using legacy virtual hardware
and cannot be configured with more than a single
processor. To upgrade the virtual machine's hardware,
click here.

Its the case that a P2V VM can "inherit" some of the limitations of the physical hardware - for example ability to only host one CPU or the lack of ACPI Management. This is because when you install Windows - windows selects the approrpiate HAL for that "computer type". Only by updating the the HAL can we alter this.

There are some cases where updating the HAL is not support by Windows and therefore as consequence by VMware...

Since W2K3 Microsoft has chosen to "hide" from the GUI the ability to change the HAL in some circumstances - obstensible to aviod BSOD. I see this as their support adopting a CYA policy...

The only option they "offically" support is a "in place installation" - basically going through a repair installation of Windows. This always gives ACPI UniProcessor or MultiProcessor. The downside - is its a very long process, full of frightening caveats from Microsoft and could undo a lot of the system information our P2V was meant to "capture" in the first place.

I have found a method using Microsoft DevCon to force upgrades/downgrades of WinXP/2K/3 to any HAL to support any number of processors.

In my case I wanted upgrade W2K3 from 1-CPU to 2-CPU on non-ACPI compliant motherboard.

I wrote a whitepaper about my experiences here:

http://www.rtfm-ed.co.uk/docs/vmwdocs/whitepaper-upgrading-cpus-on-non-acpi-p2v.pdf

Perhaps you might find reading this useful... it outlines the DevCon method I meantioned earlier - and includes some useful MS KB Links as well...

Regards
Mike Laverick
RTFM Education
Have you RTFM'd today?
Reply Re: How to repeatedly upgrade Windows 2003 to SMP and revert to uniprocesso Feb 28, 2006 9:43 AM
in response to: Mike_Laverick
Click to view nsmallcomb's profile Novice nsmallcomb 19 posts since
Dec 7, 2005
Thank you Mike for your comments.

I think I found VMware's difinitive answer on page 29 of the P2V manual. (http://www.vmware.com/pdf/p2v21_manual.pdf) It says that the upgrade from Windows 2003 uniprocessor to smp is not supported:

Unsupported. No SMP upgrade path available through Device Manager.

I'll have a look at your "unsupported" solution.
Reply Re: How to repeatedly upgrade Windows 2003 to SMP and revert to uniprocesso Feb 28, 2006 9:48 AM
in response to: nsmallcomb
Click to view Mike_Laverick's profile Virtuoso Mike_Laverick 3,938 posts since
Jan 5, 2004
Moderator
Yup...

It's the exact same problem. I wish I'd realised sooner that it was! So it goes, as Kurt Vonnegut says...

You basically have two choices... an "in place (re)install" which could be quite dangerous - or this unsupported method. Using DevCon you can go in any direction with respect to CPU upgrades and downgrades & differences in motherboard support. Like any unsupported work around don't expect VMware or Microsoft to touch this with a barge pole.

I looked into this issue because I was curious - and always bugs me when MS remove options because I'm considered to stupid to let loose on something (I'm sure this isn't why they do it - it just feels like I am being treated a like a teenager who can't be trusted with Dad's gadgets!)

I think the biggest worry with processor DOWNgrades is what the performance will be like... especially CPU times and if the VM "idles" as expect when it is not busy processing threads...

Let us know how you get on...

Kind Regards
Mike

Reply Re: How to repeatedly upgrade Windows 2003 to SMP and revert to uniprocesso Mar 22, 2006 5:42 PM
in response to: Mike_Laverick
Click to view nsmallcomb's profile Novice nsmallcomb 19 posts since
Dec 7, 2005
My machine is ACPI. I mod'd the last three lines of your script to read:

devcon sethwid @ROOT\PCI_HAL\0000 := +ACPIAPIC_MP > nul
devcon sethwid @ROOT\ACPI_HAL\0000 := + ACPIAPIC_MP > nul
devcon update %windir%\inf\hal.inf ACPIAPIC_MP > nul

Here is the output from your script:

====================================================
==Upgrading Standard PC to Multiprocessor PC ======================
====================================================

Please Wait
No hardware ID's modified.
'!MPS_UP' is not recognized as an internal or external command,
operable program or batch file.
ROOT\ACPI_HAL\0000 :
Modified 1 hardware ID(s).
'!MPS_UP' is not recognized as an internal or external command,
operable program or batch file.
devcon: Invalid use of sethwid.
For more information type: devcon help sethwid
devcon failed.
Done!

====================================================
==Script Completed=======================================
====================================================

====================================================
==Press any key to reboot the Virtual Machine=======================
====================================================
1 2 3 Previous Next
Actions