Guest OS does not see all memory

plastilin

Renowned Member
Oct 9, 2012
99
5
73
Ukraine
Hey. I noticed a strange one. Added 8 GB of RAM to the virtual machine. And inside she sees only 7.8 GB. What could be the problem? Virtual Machine is Ubuntu 16.04

Machine configuration
Code:
agent: 1
boot: c
bootdisk: scsi0
cores: 4
cpu: host
hotplug: disk,network,usb
machine: q35
memory: 8192
name: msschool
net0: virtio=D2:50:97:EB:86:B4,bridge=vmbr1,queues=2
numa: 1
ostype: l26
parent: Install_BBB
sata0: none,media=cdrom
scsi0: raid:vm-121-disk-0,cache=writeback,size=50G
scsihw: virtio-scsi-single
smbios1: uuid=d4ecd719-c7dd-4a1d-8c02-11daa663419b
sockets: 2
vmgenid: da393c41-f2d0-47cf-859c-584654cc5251

In VM

Code:
              total        used        free      shared  buff/cache   available
Mem:           7.8G        2.4G        4.2G         24M        1.2G        5.0G
Swap:          1.9G          0B        1.9G
 
Hi,

a little bit gets taken by the firmware and a little bit by the graphic adapter (IIRC), like my real system should have 64GiB, but adds up to a bit over 62 in free or /proc/meminfo

Check with dmidecode -t 16,17 if all virtual DIMMs are present and show the size you'd expect.
 
Ok. Result is:

Code:
root@msschool:~# cat /proc/meminfo
MemTotal:        8174008 kB
MemFree:         2665916 kB
MemAvailable:    3061892 kB
Buffers:           17952 kB
Cached:           747312 kB
SwapCached:            0 kB
Active:          4866376 kB
Inactive:         411264 kB
Active(anon):    4524696 kB
Inactive(anon):   108456 kB
Active(file):     341680 kB
Inactive(file):   302808 kB
Unevictable:        3652 kB
Mlocked:            3652 kB
SwapTotal:       1951740 kB
SwapFree:        1951740 kB
Dirty:             11692 kB
Writeback:             0 kB
AnonPages:       4516196 kB
Mapped:           383148 kB
Shmem:            118236 kB
Slab:              99792 kB
SReclaimable:      45552 kB
SUnreclaim:        54240 kB
KernelStack:       31808 kB
PageTables:        35012 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:     6038744 kB
Committed_AS:   14323628 kB
VmallocTotal:   34359738367 kB
VmallocUsed:           0 kB
VmallocChunk:          0 kB
HardwareCorrupted:     0 kB
AnonHugePages:         0 kB
CmaTotal:              0 kB
CmaFree:               0 kB
HugePages_Total:       0
HugePages_Free:        0
HugePages_Rsvd:        0
HugePages_Surp:        0
Hugepagesize:       2048 kB
DirectMap4k:       94032 kB
DirectMap2M:     4100096 kB
DirectMap1G:     6291456 kB

Code:
# dmidecode 3.0
Getting SMBIOS data from sysfs.
SMBIOS 2.8 present.

Handle 0x1000, DMI type 16, 23 bytes
Physical Memory Array
        Location: Other
        Use: System Memory
        Error Correction Type: Multi-bit ECC
        Maximum Capacity: 8 GB
        Error Information Handle: Not Provided
        Number Of Devices: 1

Handle 0x1100, DMI type 17, 40 bytes
Memory Device
        Array Handle: 0x1000
        Error Information Handle: Not Provided
        Total Width: Unknown
        Data Width: Unknown
        Size: 8192 MB
        Form Factor: DIMM
        Set: None
        Locator: DIMM 0
        Bank Locator: Not Specified
        Type: RAM
        Type Detail: Other
        Speed: Unknown
        Manufacturer: QEMU
        Serial Number: Not Specified
        Asset Tag: Not Specified
        Part Number: Not Specified
        Rank: Unknown
        Configured Clock Speed: Unknown
        Minimum Voltage: Unknown
        Maximum Voltage: Unknown
        Configured Voltage: Unknown
 
Last edited:

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!