"Wrong" total memory in VM

free, /proc/meminfo etc. only show the memory actually available to user space; the kernel sets aside some memory for its own use. If you look for a Memory: line in your boot logs (/var/log/dmesg.0 or some such, or journalctl), you’ll see something like

Memory: 32818828K/33439808K available (5612K kernel code, 1083K rwdata, 1896K rodata, 1264K init, 832K bss, 620980K reserved, 0K cma-reserved)

The amount of memory available after boot will typically be slightly larger than the amount indicated here, because some of the memory used for initialisation is returned to the system, and the amount of reserved memory can change (e.g. if it’s reserved for an integrated GPU); in my case, MemTotal shows 32062 MiB instead of the 32049 MiB given above.

In your case, only 62MiB are reserved (2048 – 1986); that is quite sufficient to cover the kernel code and data, plus some reserved memory. The boot logs will also include details of the system’s memory map, which should account for most of the reserved memory (it’s reserved for the firmware, ACPI etc., even in a VM).

MemTotal never corresponds to the amount of installed physical memory, or allocated memory for a VM, and that’s perfectly normal.