I'd like to point out that using DMI tables to detect available memory size is 
a fundamentally flawed idea. For one thing, I really doubt that the table is 
required to be present (or that VirtualBox is the only platform where it's 
not). "Works fine with real hardware" only means "works with the machines we 
happened to test with". The bigger problem is that physically installed RAM 
does not equal RAM available to the OS. There may be chipset limitations 
preventing all of the installed RAM from being used. Especially on 32-bit 
systems, the "PCI hole" can mean that a system with 4GB installed can actually 
use only 2GB, potentially even less, depending on installed hardware.

 Querying the available RAM from the OS running 'dmidecode' would provide much 
more realistic results because it will have taken any such hardware limitations 
into account.

     Regards,
       Michal

----- Original Message -----
From: [email protected]
To: [email protected]
Cc: [email protected]
Sent: Monday, November 12, 2018 2:53:00 PM GMT +01:00 Amsterdam / Berlin / Bern 
/ Rome / Stockholm / Vienna
Subject: Re: [vbox-dev] How to populate a Linux VM with the items requested by 
a dmidecode -t 17

Thanks, Mihal.

That worked perfectly! To answer your first question, the guest is used to test 
various software, including an installation ISO. Part of the installer uses 
dmidecode -t17 to detect the amount of RAM and indicate to the user if they 
have enough memory to complete the install. This works fine with real hardware, 
but the VM didn't report any of that, hence my problem.

Best regards,

Rodney

On 2018-11-09 06:34 PM, Mihai Hanor wrote:
Hi,

Why is it necessary for the guest?

Run this command and see if it does what you want:
VBoxManage setextradata "VM name" 
VBoxInternal/Devices/pcbios/0/Config/DmiExposeMemoryTable 1
Source: 
www.virtualbox.org/ticket/12017?cversion=0&cnum_hist=1#comment:5<http://www.virtualbox.org/ticket/12017?cversion=0&cnum_hist=1#comment:5>



Regards,
Mihai

On Fri, 9 Nov 2018 at 22:29, Rodney Lott 
<[email protected]<mailto:[email protected]>> wrote:
Hi, there.

First, my details:

Host machine:
rlott@rlott-brix:~$ uname -a; lsb_release -a
Linux rlott-brix 4.13.0-46-generic #51-Ubuntu SMP Tue Jun 12 12:36:29 UTC 2018 
x86_64 x86_64 x86_64 GNU/Linux
No LSB modules are available.
Distributor ID:    Ubuntu
Description:    Ubuntu 17.10
Release:    17.10
Codename:    artful
VirtualBox version: 5.2.6 r120293 (Qt5.9.1)
Guest VM: Custom Ubuntu version
root@magtestvm:/udata/home/etdev# uname -a; lsb_release
Linux magtestvm 4.4.0-116-generic #140~14.04.1-Ubuntu SMP Fri Feb 16 09:25:20 
UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

I was wondering if there was a way to populate the DMI information to simulate 
memory banks for a Linux-based VM. If I do a dmidecode -t17 on my guest, I see 
the following:

root@magtestvm:/udata/home/etdev# dmidecode -t17
# dmidecode 2.12
SMBIOS 2.5 present.

Upon further examination, I saw in the full dmidecode output that no such 
memory bank sections existed.

I found this section in the manual about setting DMI information: 
https://www.virtualbox.org/manual/ch08.html#idm5744

I saw in this piece of the source code that it does support DMI Memory (type 
17): 
https://www.virtualbox.org/svn/vbox/trunk/src/VBox/Devices/PC/DevFwCommon.cpp

So, is there such a call to set various things like this?

    VBoxManage setextradata <my_guest_vm> 
VBoxInternal/Devices/pcbios/0/Config/DmiMemory/<some_key> <some_value>

If so, would you point me to where a list of values for <some_key> would be?

Thanks very much!

Rodney


_______________________________________________
vbox-dev mailing list
[email protected]<mailto:[email protected]>
https://www.virtualbox.org/mailman/listinfo/vbox-dev

_______________________________________________
vbox-dev mailing list
[email protected]
https://www.virtualbox.org/mailman/listinfo/vbox-dev

Reply via email to