PAE/NX enabled, but no NX in Windows 7 Pro Guest

Discussions about using Windows guests in VirtualBox.
Locked
kwolf22
Posts: 8
Joined: 8. Sep 2015, 22:51

PAE/NX enabled, but no NX in Windows 7 Pro Guest

Post by kwolf22 »

VirtualBox 5.0.4 r102546 with guest additions installed
Host: Mac Pro 3,1 (early 2008) OS X 10.10.5 (64 bit)
Windows Guest: Windows 7 Pro (64 bit)
Linux Guest: Ubuntu 15.04

Hello,

I've been attempting to upgrade my Windows 7 Pro guest to Windows 10. Unfortunately, I keep getting a “CPU incompatible” message from the Windows 10 upgrade tool. This is kind of strange because my CPU is definitely compatible. I know this because my host system will dual boot - and the WIN7 -> WIN10 upgrade worked just fine on the native Windows partition.

After a bit of Googling, I found that the Windows 10 upgrade tool looks for PAE, NX and SSE2 support on the CPU before allowing you to upgrade. So, just to be sure, on my host system (OS X), when I check the CPU features using

Code: Select all

sysctl -a | grep machdep.cpu.features
I get:

Code: Select all

FPU VME DE PSE TSC MSR PAE MCE CX8 APIC SEP MTRR PGE MCA CMOV PAT PSE36 CLFSH DS ACPI MMX FXSR SSE SSE2 SS HTT TM PBE SSE3 DTES64 MON DSCPL VMX EST TM2 SSSE3 CX16 TPR PDCM SSE4.1
checking the ext CPU features using

Code: Select all

sysctl -a | grep machdep.cpu.extfeatures
gives me:

Code: Select all

SYSCALL XD EM64T LAHF
So, between those two commands, I can see support for PAE, SSE2 and NX (aka XD since this is Intel). This support is also reflected in my VB guest log files. In the “CPUID dump” section under Features, I see:

Code: Select all

00:00:03.391069   PAE - Physical Address Extension                        = 1 (1)

Code: Select all

00:00:03.391096   SSE2 - SSE2 support                                     = 1 (1)
and under ext features, I see:

Code: Select all

00:00:03.391265   NX - No-Execute/Execute-Disable                         = 1 (1)
Looks like everything I need is recognized by VirtualBox and enabled.... However, when I run

Code: Select all

grep flags /proc/cpuinfo
in my Windows 7 guest (using cygwin), I get:

Code: Select all

fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht pni ssse3 cx16 sse4_1 hypervisor lahf_lm
In the Windows 7 guest, PAE and SSE2 are present, but NX isn't there.

Moreover, when I fire up a Linux guest and run the same

Code: Select all

grep flags /proc/cpuinfo
command, I get:

Code: Select all

fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx lm constant_tsc rep_good nopl pni ssse3 sse4_1 hypervisor lahf_lm
In my Linux guest, PAE, SSE2 & NX are all there!... What's going on? Why is NX available for one guest, but not another? Before posting this issue, I also tried to re-install a fresh new Windows 7 guest (using the new Windows 10 profile), being sure to have PAE/NX enabled prior to the OS installation. However, even the fresh copy of Windows 7 still doesn't see the NX bit.

Log files for Windows & Linux guests are attached. Thanks in advance for your help!
Attachments
Win7GuestLog.txt.zip
Windows 7 Guest Log
(25.79 KiB) Downloaded 21 times
LinuxGuestLog.txt.zip
Linux Guest Log
(26.64 KiB) Downloaded 13 times
michaln
Oracle Corporation
Posts: 2973
Joined: 19. Dec 2007, 15:45
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Any and all
Contact:

Re: PAE/NX enabled, but no NX in Windows 7 Pro Guest

Post by michaln »

Please don't use Cygwin, use some proper Windows tool. For example CoreInfo from Sysinternals.

How certain are you that the upgrade tool is complaining about NX? Did it say so explicitly, or is that just a guess? Are you certain it's not complaining about, say, CMPXCHG16B?
kwolf22
Posts: 8
Joined: 8. Sep 2015, 22:51

Re: PAE/NX enabled, but no NX in Windows 7 Pro Guest

Post by kwolf22 »

Thanks for the help.

You were right - NX wasn't the issue, looks like Cygwin lied. After downloading CoreInfo and running coreinfo -f, I can see that NX is enabled, but CX16 is not:

Code: Select all

NX       *     Supports no-execute page protection
CX16     -     Supports CMPXCHG16B instruction
I did some searching and applied the workaround described in Ticket #11899 that manually enabled CMPXCHG16B:

Code: Select all

VBoxManage setextradata global VBoxInternal/CPUM/CMPXCHG16B 1
Now, CoreInfo shows the CX16 support:

Code: Select all

CX16     *     Supports CMPXCHG16B instruction
Unfortunately, the Windows 10 Installer is still telling me the CPU is incompatible. Is there any way to see details about why the installer is still unhappy? I don't see anything obvious in the event viewer... Also I've attached the output of CoreInfo.

Thanks again.
Attachments
coreinfo.txt
CoreInfo Results
(5.03 KiB) Downloaded 23 times
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: PAE/NX enabled, but no NX in Windows 7 Pro Guest

Post by mpack »

I'm sure that the 50 or so times that this conversation has already occurred (in various forums) ought to be enough.

To upgrade a Win7 VM to Win10, first uninstall the Guest Additions then shut down the VM. Change the OS version in the VM settings to "Windows 10 (xx bits)", then do your upgrade. Finally, reinstall the (new) GAs.
kwolf22
Posts: 8
Joined: 8. Sep 2015, 22:51

Re: PAE/NX enabled, but no NX in Windows 7 Pro Guest

Post by kwolf22 »

Thanks for the suggestion. Unfortunately, it didn't work for me. I'm still getting "The CPU isn't supported" from the Get Windows 10 app. Just to be clear, here are the steps that I followed:
  1. Uninstalled the guest additions from Windows 7 guest.
  2. Shut down the Windows 7 guest.
  3. Changed the OS version of the Windows 7 guest from "Windows 7 (64 bit)" to "Windows 10 (64 bit)".
  4. Restarted the Windows 7 guest.
  5. Launched the "Get Windows 10" app from the task bar.
  6. Was informed: "The CPU isn't supported." <- can't proceed.
Did I miss something? Should I be trying to perform the install another way? Or is there something else that I can do to get more information about why the CPU isn't supported?

Thanks again.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: PAE/NX enabled, but no NX in Windows 7 Pro Guest

Post by mpack »

Well, I think that it may now be time for you to contact Microsoft with your Windows 10 support question. For all I know your processor really does lack a required feature.
kwolf22
Posts: 8
Joined: 8. Sep 2015, 22:51

Re: PAE/NX enabled, but no NX in Windows 7 Pro Guest

Post by kwolf22 »

Thanks for the suggestion. However, as I stated initially, Windows 10 runs fine on the hardware (booting from its own partition) - just not in the VM.
Laca
Posts: 3
Joined: 15. Sep 2015, 20:43

Re: PAE/NX enabled, but no NX in Windows 7 Pro Guest

Post by Laca »

I had the same symptom and managed to fix it using:

- all the steps you have already done (changing the VM type to Windows 10, uninstalling GA, etc.)
- the batch utility referenced by MD678685 in another thread. The batch file can be found here: goo.gl/7y8uWz (I know it is a bit shady, but it uses the GWX windows utility to do the magic, plus some registry tampering). I used the "Quick method", it seems to reinitialize/clear whatever information the "Get Windows 10" utility gathers about the system.

After doing this I was able to upgrade, there were no more CPU compatibility warnings.

YMMV, though!
kwolf22
Posts: 8
Joined: 8. Sep 2015, 22:51

Re: PAE/NX enabled, but no NX in Windows 7 Pro Guest

Post by kwolf22 »

Thanks to everyone for your help and patience.

I was finally able to get Windows 7 Pro to upgrade to Windows 10. The solution?… Other than the steps that I took above to sort out the NX and CX16 business, in the end, I simply ignored the “Get Windows 10” app, and upgraded using the Windows 10 media creation tool. Here's what I ended up doing:
  1. Cloned my Windows 7 guest (making sure that my Windows 7 license remained valid) – can't be too careful with these OS upgrades!
  2. Uninstalled the VirtualBox guest additions from Windows 7 clone.
  3. Shut down the Windows 7 clone.
  4. Changed the OS version of the Windows 7 clone from "Windows 7 (64 bit)" to "Windows 10 (64 bit)".
  5. Restarted the Windows 7 clone.
  6. Made sure that I had 10 GB of free space in my Windows 7 clone.
  7. Downloaded the Windows 10 media creation tool.
  8. Ran the media creation tool, selecting “Upgrade this PC now.”
After a few clicks (using the default choices) and a whole lot of waiting, My cloned Windows 7 Pro guest was upgraded to Windows 10. Once the final reboot was completed I re-installed the guest additions and seem to have a fully functional Windows 10 guest now.

So, my take-away from this experience is that there is definitely some incompatibility between the "Get Windows 10" task bar application and my installation of VirtualBox. Although I'm not sure where the fault lies, I'm leaning toward the Windows app - simply because there have already been documented issues with this app. Besides, Once I started the "manual" install process, I didn't encounter any other installation issues.

It's unfortunate that the "Get Windows 10" app is not more explicit about why it thought my CPU was incompatible. I think much of my time - any everyone else's on this discussion board would have been saved if the app had a "details" view or some sort of logging.

Thanks again to everyone for your help and patience.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: PAE/NX enabled, but no NX in Windows 7 Pro Guest

Post by mpack »

kwolf22 wrote:So, my take-away from this experience is that there is definitely some incompatibility between the "Get Windows 10" task bar application and my installation of VirtualBox.
From hints I've gathered from discussions elsewhere, my guess is that if you run the "Get Windows 10" application then it examines and stores the current "hardware" profile, and doesn't expect that profile to ever change. However in the case of a VM it can change, i.e. when you change the OS version in the VM settings and uninstall the GAs.

(I don't know why it works that way - does collecting the profile take a long time?)

I.e. it would work fine provided you hadn't already run the GWX app and failed. Alternatively it should be possible to find out where the profile is stored, and delete it.
kwolf22
Posts: 8
Joined: 8. Sep 2015, 22:51

Re: PAE/NX enabled, but no NX in Windows 7 Pro Guest

Post by kwolf22 »

i.e. it would work fine provided you hadn't already run the GWX app and failed.
That sounds reasonable. However, one of the first things that I tried to do was a fresh, new install of Windows 7 Pro using the "Windows 10 (64 bit)" profile - with PAE/NX enabled prior to install (I had read in one of the forums that this was a possible solution - which didn't work). So, I can confirm that starting out with the VirtualBox WIN10 profile & a clean install of Windows 7 didn't work - at least on my system. I still got the "The CPU isn't supported" error when I ran the GWX app. So I don't think that it has anything to do with a saved hardware profile.

My theory is that Microsoft is simply trying to block VM upgrades - or at least pump the brakes a bit - probably because they want to ensure the best possible user experience on their new OS - something that VM-based installs tend to degrade quite a bit. This would explain why the GWX app tells you no, but the manual install process works fine. Or, it might just be a buggy GWX app...
kwolf22
Posts: 8
Joined: 8. Sep 2015, 22:51

Re: PAE/NX enabled, but no NX in Windows 7 Pro Guest

Post by kwolf22 »

Since I started this thread out with a question about the PAE/NX option in VirtualBox for a WIN7 -> WIN10 upgrade, I thought that I should point out that the Windows 10 (64 bit) profile does not have this option enabled - and PAE/NX doesn't seem to be needed. Nevertheless, the Windows 10 upgrade will still work. In fact, just to verify, I repeated the install/upgrade process from the beginning using the VirtualBox Windows 10 (64 bit) profile (with no changes) and a fresh install of Windows 7 Pro (64 bit, pre-SP1).

Once I had Windows 7 running, I had to download Chrome because the installed version of IE8 wouldn't work with the Windows 10 media creation tool download page. From there I used Chrome to download the media creation tool & start the upgrade process. There was no need to apply SP1 or any other updates to WIN7.

After the WIN10 upgrade completed, I installed the guest additions, downloaded CoreInfo and verified that PAE and NX were NOT enabled. Although it makes sense that a 64-bit OS doesn't need 32-bit address extension mapping (PAE), I was surprised about everything still working without NX - as I had though that this would be a required security feature.

Anyway, just wanted to make it clear that NX (my initial reason for creating this thread) seems to have nothing at all to do with upgrading & running Windows 10.
dadama
Posts: 1
Joined: 13. Oct 2019, 20:09

Re: PAE/NX enabled, but no NX in Windows 7 Pro Guest

Post by dadama »

None of the above tips solved this issue for me. I needed to open an admin shell (cmd.exe as Administrator) and execute the following command

Code: Select all

bcdedit.exe /set {current} nx AlwaysOn
which overrides NX detection in windows. I will post the web article that pointed me to this as link (1) below (the forum software defers urls in my first posting here).

Apart from this and the tips above, I took the following steps which might have played a role:
  • ensured that KB2952664 has been installed
  • ensured that KB2952664 has been applied:

    Code: Select all

    schtasks.exe /Run /TN "\Microsoft\Windows\Application Experience\Microsoft Compatibility Appraiser"
    cf. link (2) below
  • made a 2nd CPU core available to the virtual machine
After successfully beginning the upgrade, Windows setup was then announcing problems with my VM graphics card (VBoxVGA). I solved this by instead choosing VBoxSVGA in the VM configuration.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: PAE/NX enabled, but no NX in Windows 7 Pro Guest

Post by mpack »

The above discussion is 4 years old, dating from when Windows 10 was just being introduced. I doubt it has relevance to any current problem. Locking it.
Locked