Q: With a Linux virtual machine (VM) running on Hyper-V, why is the amount of memory available to Linux less than the amount I have configured for the VM?

How to see the memory allocation of a Linux virtual machine.

John Savill

June 17, 2012

1 Min Read
ITPro Today logo in a gray background | ITPro Today

A:It isn't actually less memory: The Linux kernel takes some of the memory, so it doesn't show that. If you run the command

top

or

cat /proc/meminfo

the memory total is displayed, but with some of the memory missing. For example, on a VM with 2048MB configured, I see the following:

MemTotal: 2069808 kB

This is less than the expected amount of kilobytes (2048 * 1024 is 2097152 kB). If, however, I use this command:

sudo dmidecode --type 17 | more

I see the full memory assigned to the VM, which the screen shot shows.


Linux VM memory display

Get more help at John Savill's FAQs page.

About the Author

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like