How-To

How to Pass Host Hardware Information to a VMware Workstation VM

There are various reasons why you may want to reflect the actual hardware the VM is running on rather than as a VM; by adding these three lines to the VMware configuration file, you can easily reflect this.

If you've followed my series of articles on using VMware Workstation on an Intel NUC 13 Pro Desk Edition PC (starting here), you could probably tell I was impressed with the styling and power of the NUC 13 and the flexibility of Workstation. I currently use this combination in my job to host various OSes for demonstrating, testing and development work.

I got a request from my boss when he noticed that the virtual machine (VM) reported the manufacturer (correctly) as VMware Inc., and the model as VMware Virtual Platform on our software.

This is how our software reports it.

[Click on image for larger view.]

This is how Linux reports it using the dmidecode command:

[Click on image for larger view.]

He asked if we could have it report something more interesting, like the manufacturer and model of the system that Workstation was running on.

After a bit of searching around, I found that you can add a few lines to the VMX file, which is used to describe the VM.

To get the location of the VMX file in Workstation, I right-clicked the VM, selected Settings and then selected the Options tab. I selected Advanced and copied the information in the Configuration text box. The location was: C:\Users\user01\Documents\Virtual Machines\lateu2304-b\lateu2304-b.vmx.

[Click on image for larger view.]

I powered off the VM and used Notepad to add these three lines to the end of the VMX file:

SMBIOS.reflectHost = "TRUE"
SMBIOS.noOEMStrings = "TRUE"
smbios.addHostVendor = "TRUE"

[Click on image for larger view.]

When I powered on the machine, our software reported it as Manufacturer: Intel(R) Client Systems Model: NUC13VYKi7, which was the host's hardware.

[Click on image for larger view.]

Dmidecode reported the same information.

[Click on image for larger view.]

I needed to verify that this worked on Windows as well. I made the same changes to the VMX file, powered it on, and looked at System Information, which showed it as a NUC 13 machine.

[Click on image for larger view.]

After doing this, the VMs reflected the underlying hardware, and I had a happy boss. He then asked if I could do the same thing to the VMs on ESXi.

ESXi VMs
I logged in to the vSphere Web Client, powered off the VM, right-clicked it, and selected Edit Settings. I selected the VM Options tab and expanded Advanced.

[Click on image for larger view.]

To the right of Configuration Parameters, I clicked Edit Configuration and Add Configuration Parameters. Then, I entered:

smbios.addHostVendor TRUE
SMBIOS.reflectHost TRUE
SMBIOS.noOEMstrings TRUE

I found that it failed when I tried to cut and paste these values into the text box, so I had to enter them manually.

After I booted the system, the VM reported the host hardware, a gently used Google Search Appliance.

[Click on image for larger view.]

Dmidecode reported the host hardware as well.

[Click on image for larger view.]

As I had many VMs to change, I found it easier to SSH into the ESXi host and add the following lines directly to the VMX file:

smbios.addHostVendor = "TRUE"
SMBIOS.reflectHost = "TRUE"
SMBIOS.noOEMstrings = "TRUE"

I have browsed VMware's documentation and can't locate where it states what these values do, but they do work. There are various reasons why you may want to reflect the actual hardware the VM is running on rather than as a VM; by adding these three lines to the VMware configuration file, you can easily reflect this.

It does need to be noted that some software is not licensed for use on VMs, and they have other ways to check the hardware, so these settings will not work on them.

About the Author

Tom Fenton has a wealth of hands-on IT experience gained over the past 30 years in a variety of technologies, with the past 20 years focusing on virtualization and storage. He previously worked as a Technical Marketing Manager for ControlUp. He also previously worked at VMware in Staff and Senior level positions. He has also worked as a Senior Validation Engineer with The Taneja Group, where he headed the Validation Service Lab and was instrumental in starting up its vSphere Virtual Volumes practice. He's on X @vDoppler.

Featured

  • What's New in VMware vSphere Foundation 5.2

  • What's New in vSAN 8 U3

  • Copilot in Azure

Subscribe on YouTube