[SOLVED] Guest memmory size differs from what is configured

aasami

Renowned Member
Mar 9, 2016
56
11
73
25
HI, I have set up a VM with 2GiB of memory
Code:
[node6@09:31 ~]# qm config 108|grep mem
hotplug: disk,network,usb,memory,cpu
memory: 2048
[node6@09:32 ~]#
But the guest claims it has only 1GiB memory
Code:
Handle 0x1000, DMI type 16, 23 bytes
Physical Memory Array
        Location: Other
        Use: System Memory
        Error Correction Type: Multi-bit ECC
        Maximum Capacity: 1 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: 1024 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

Handle 0x1300, DMI type 19, 31 bytes
Memory Array Mapped Address
        Starting Address: 0x00000000000
        Ending Address: 0x0003FFFFFFF
        Range Size: 1 GB
        Physical Array Handle: 0x1000
        Partition Width: 1
Could you please give me an advice what could be wrong? The guest is Debian 9.9. Thank you beforehand.
 
What's the output of `free -h` on your guest? Do you have ballooning active (although that shouldn't matter)?

I also see that you have memory hotplugging enabled, have you maybe started with 1 GB and then hotplugged another? Have you tried rebooting the guest and/or host?
 
Hello Stefan,
Code:
[unifi@07:53 ~]# free -h
              total        used        free      shared  buff/cache   available
Mem:           931M        840M         62M        272K         28M        6,7M
Swap:          3,0G        2,2G        852M
[unifi@07:53 ~]#
Balooning is active, but I have tried to turn it off and rebooted the guest with every change I made with no change.
I haven't tried rebooting the host though. Bu I've tried to move it to other node int the cluster to no avail.
Are there any other options which I can try?
 
Have you also disabled memory hotplug? That feature could definitely cause issues like that.

Also, check your log files in your Guest ('journalctl -b' and 'dmesg' for example). Does the guest kernel report any errors on boot?
Maybe try attaching a live OS disk to your guest and boot from that, see if it also has this issue.

It none of this works, could you post your full vm config?

Edit: 'lsmem -a' could also provide some more info maybe.
 
Last edited:
  • Like
Reactions: aasami
Thank you Stefan.
Disabling memory hotplugging solved this.

Code:
[unifi@16:09 ~]# free -h
              total        used        free      shared  buff/cache   available
Mem:           2,0G        666M        1,2G        3,1M        143M        1,1G
Swap:          3,0G          0B        3,0G
[unifi@16:09 ~]#

Thanks again for you help.
 
On the top of the thread, on the right side there's a "Thread Tools" drop down menu, as Thread creator you should be able to see "Edit Thread" there, if you click on that "button" a dialog should open where the "solved" tag can be set.