3

According to this page: https://docs.microsoft.com/en-us/azure/virtual-machines/troubleshooting/support-32-bit-operating-systems-virtual-machines

Microsoft Azure now allows users to bring in their 32-bit Windows Operating systems over to Azure.

I tried to bring my 32-bit images to Azure but they have only 1Gb of usable memory out of total physical memory (depending on the VM size). The image is fresh installation of Windows with only RDP being configured.

Only 1GB usable out of 14

With on-premise Hyper-V I have 3,87 GB of usable memory out of 4 GB which is what I would expect.

I tried different options:

  • Windows 10 x32 image
  • Windows 7 x32 image
  • B2s size machine (2 cores, 4 GB)
  • D2v3 (2 cores, 14 GB)
  • sysprep'ped/non-sysprep'ped images

Nothing helped, I always have 1 GB usable memory out of 14 GB or 4 GB. An Internet search suggests it might have something to do with BIOS but I don't have access to BIOS of Azure VMs. Is there any resolution or at least explanation to this problem?

P.S. Please do not suggest using 64-bit Windows or nested virtualization as an answer to this question.

Update: Thanks for the pointers about dynamic memory. But I was still unsuccessful with resolving the issue. I emulated high memory consumption with testlimit (from Sysinternals) and made sure I have dmvsc.sys (Dynamic Memory) driver running but the RAM amount never grew for me.

enter image description here

4
+25

Welcome to the quirks of Hyper-V and dynamic memory.

Hyper-V vm's in azure are all using dynamic memory (except for reserved instances). That means, Hyper-V will be constantly monitoring the demand (as reported by the local kernel) and assign the required physical RAM to the vm. Therefore you will see "1 Gb useable" [at this very moment]. That is the actual ammount of the "real" physical ram mapping (plus a buffer for fast growing apps).

enter image description here

A Windows 10 virtual machine needs (surprisingly) little RAM to function well. In your screenshot, the memory usage is idle at the moment (I would assume). The Memory "demand" is very small, so the buffer assigned to the VM (usually around 15%) to the Hyper-V Machine config is using around 1Gb of the assigned maximum.

The buffer is important: When using dynamic memory and the demand suddenly increases for example due a resource heavy application being launched, it takes time for Hyper-V to assign more RAM to the vm. It is possible that this is very slow (depending on the demand of other machines on this host). The bigger the buffer, the better the vm reacts to increased demand. You see the "minimum" buffer there.

Hint: Dynamic memory should not be used when installing Windows, it can make the time needed for installation somewhat longer. I bet you waited a lot longer for thins to complete than on your local machine.

Generally speaking, Windows 10 x32 uses max 4GB of static RAM for default applications. PAE can expand this, but the only widespread apps that do that are Exchange Server (which does not run under Windows 10) and SQL Server (Enterprise).

| improve this answer | |
  • 1
    A 32-bit application can use 2 GB RAM. PAE could be used to maybe get ~3GB (have to leave some for the OS, because Windows 10 32-bit only supports 4 GB RAM), but yeah most people that code 32-bit apps usually observe the 2 GB limit and almost no-one uses a 32-bit OS any longer. 32-bit applications are still quite common. I think you're right and there really isn't a problem here if their application isn't hitting an out of memory exception and can't use 2 GB. – Greg Askew May 19 at 12:46
2

It must be because OS is not using more than 1 GB and dynamic memory is configured for VM. As soon as you run more programs which require more RAM the size of available memory will grow. Btw, there is no need to get VMs of more than 4 GB of RAM for 32-bit OS. The operating system itself can't address more than 4 GB.

Please note that this is just an assumption. I have not tested it myself.

Sample code to allocate memory:

$dictionary = new-object "System.Collections.Generic.Dictionary[[Guid],[int]]"
while ($true) { 
    $dictionary.Add([guid]::NewGuid() , 0) 
}
| improve this answer | |
  • 1
    I was going to make the same suggestion about the 4 GB limit. Also, seems like it would be easy to test the memory allocation by writing some code that continuously creates objects and allocates more memory. – Greg Askew May 16 at 19:43
  • You can use more than 4 GB of physical memory with PAE: docs.microsoft.com/en-us/windows/win32/memory/… – Mircea Vutcovici May 16 at 20:30
  • Thanks for this recommendation. I'm the bounty-poster and not the OP, but when I run software that I am attempting to test, once the RAM hits 1 GB, the process stops running saying that the server is out of memory. So the memory allocation is not growing. – Garrison Neely May 18 at 21:07
  • 2
    @GarrisonNeely making sure you have large enough page file might help with "out of memory" errors from apps. But I was still unsuccessful with resolving the original issue. – vkrzv May 19 at 12:16
  • 1
    @vkrzv I've got a support ticket open with MS and will definitely update if they provide a solution. Hoping we can find a resolution since AWS doesn't even let you try spinning up a Windows Embedded VM. – Garrison Neely May 19 at 16:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.