I had the problem on a Windows 7 VM installation the keyboard layout was always set to QWERTY at the login screen. Once logged in, everything was AZERTY. So keyboard settings were configured correctly.
I solved the issue by updating the following registry entry:
Change the value to 00000813 (it was set to 00000419 in my case)