I have a couple of the HP NL40 Microservers in my lab, they are little low powered servers (dual core AMD 1.5Ghz) but make quite decent little virtualisation hosts for a lab environment. Officially they support 8GB RAM, but there are a number of reports of them working with 16GB. In fact a good UK supplier ships them with 16GB
n ECC kits (about half the price), but unfortunately on boot the servers only register 16GB of usable RAM about 1/3 or 1/5 boots in my experience (even with the various modified bios FYI). If they boot registering only 8GB they work quite happily, but with only 8GB addressable, if they boot with 16GB all appears to work fine too (had them running for more than a week consistently with Hyper-V VM’s using all the RAM), that being said, this isn’t supported, your mileage may vary etc..
For reference I’m using Patriot G2 Series PC3-10600 Main Memory 16 GB 1,333 MHz 240-Pin 2x 8 GB DDR3-RAM Kit (PGD316G1333ELK) and G.Skill 16GB (2x 8GB) Dual Channel Ares Series Memory Kit (DDR3 1333, 9-9-9-24, 1.5v, Intel XMP Extreme Memory Profile Ready) (F3-1333C9D-16GAO).
So, I have a server that can work with 16GB, but I can only tell if I’m in front of it watching POST when it boots, that’s not much use as I often start the servers remotely/run them headless. Fortunately a little PowerShell comes to the rescue.
When booted with 8GB we get this
Get-WmiObject -Class Win32_ComputerSystem
But with 16GB:
So, I can run a script to check the amount of RAM and reboot if it’s not 16GB, but I’ll want a get out, in case it decides it’s jut not registering 16GB anymore and I get stuck in an endless loop
# If mem is 16GB it reports 17179009024
# If mem is 8GB it reports 8589074432$mem = Get-WmiObject -Class Win32_ComputerSystem
$mem.TotalPhysicalMemory
If ($mem.TotalPhysicalMemory -lt 8589074433)
{
Write-Host “Memory is only 8GB”
Restart-Computer
}
If ($mem.TotalPhysicalMemory -gt 8589074433)
{
Write-Host “Memory is over 8GB”
}
So, if the server reports less than 16GB it will reboot and try again.
Let’s create some files in the c:\Check-Memory folder to simulate more than 100 unsuccessful boots, here is a little loop to create the files
We run the script
Nothing happens as there are more than 100 files in the C:\Check-Memory folder
If we delete some of the c:\Check-Memory files, to bring it below 100
The script runs fine, since I’m running booted on 16GB, the server isn’t rebooted and the log files are deleted out of C:\Check-Memory.
So, now when I boot my servers remotely or via WOL, it will check the memory and reboot itself until the memory registered is 16GB, unless it loops 100 times then it gives up.
[…] 16GB RAM in HP NL40 Microserver and Using PowerShell to Check System RAM at Startup […]
Cool script, to bad I’m running vmware and not Hyper-V and just noticed the same issue (my vmware cluster is never rebooted but just did and both my servers N40 and N54 showed up with 8G :( bummer
Great script! thanks!
thanks for the comment!
Tom
Hi Tom,
This is just what I was looking for! I have modified it as my HP Microserver is running ESXi as a OS.
I`m just having a bit of trouble setting it up to not to loop if it reboot 100 times. Which part of the script checks for a log file as i cant see it?
Cheers
Jon
hi Jon,
I’m not sure how you would do this in ESXi, I’m relying on Windows to run the PowerShell script. I suspect you could use PowerCLI, but you need something to run it from