My system is a home built one and as such the Mortheboard BIOS DmiSystemVendor? is an empty string. In order to avoid reactivation on Dual Native/VM boot, I therefore need my VM DmiSystemVendor? to be empty also. However in src/VBox/Devices/PC/DevPcBios.cpp we have
#define READCFGSTR(name, variable, default_value) \
do { \
rc = CFGMR3QueryStringAlloc(pCfgHandle, name, & variable); \
if (rc == VERR_CFGM_VALUE_NOT_FOUND) \
variable = MMR3HeapStrDup(PDMDevHlpGetVM(pDevIns), MM_TAG_CFGM, default_value); \
else if (VBOX_FAILURE(rc)) \
return PDMDevHlpVMSetError(pDevIns, rc, RT_SRC_POS, \
N_("Configuration error: Querying \"" name "\" as a string failed")); \
} while (0)
...
READCFGSTR("DmiSystemVendor", pszDmiSystemVendor, "innotek GmbH");
and in src/VBox/VMM/CFGM.cpp
CFGMR3DECL(int) CFGMR3QueryStringAlloc(PCFGMNODE pNode, const char *pszName, char **ppszString)
{
size_t cch;
int rc = CFGMR3QuerySize(pNode, pszName, &cch);
if (VBOX_SUCCESS(rc))
{
char *pszString = (char *)MMR3HeapAlloc(pNode->pVM, MM_TAG_CFGM_USER, cch);
if (pszString)
{
rc = CFGMR3QueryString(pNode, pszName, pszString, cch);
if (VBOX_SUCCESS(rc))
*ppszString = pszString;
else
MMR3HeapFree(pszString);
}
else
rc = VERR_NO_MEMORY;
}
return rc;
}
Hence
VBoxManage setextradata "My VM" "VBoxInternal/Devices/pcbios/0/Config/DmiSystemVendor" ""
results in DmiSystemVendor? being set to innotek GmbH if you specify "" !