Linuxのdmidecodeで取得できる情報を仮想マシン環境ごとに比較する
Linuxでdmidecodeというコマンドを実行するとハードウェア情報を取得できますが、仮想マシン環境で実行すると取得できる情報がそれぞれ微妙に異なります。
そこで dmidecode -s keyword と実行した場合の内容を VirtualBox, VMware, Paralles で比較してみることにします。
| keyword | VirtualBox | VMware | Parallels | 
|---|---|---|---|
| bios-vendor | innotek GmbH | Phoenix Technologies LTD | Parallels Software International Inc. | 
| bios-version | VirtualBox | 6 | 15.1.4 (47270) | 
| bios-release-date | 12/01/2006 | 02/27/2020 | 04/13/2020 | 
| system-manufacturer | innotek GmbH | VMware, Inc. | Parallels Software International Inc. | 
| system-product-name | VirtualBox | VMware Virtual Platform | Parallels Virtual Platform | 
| system-version | 1.2 | None | None | 
| system-serial-number | 0 | VMware-56 4d 3a e5 f7 88 6e c2-15 ee 88 43 f1 a0 ba c7 | Parallels-AA 5F 1C 74 31 88 44 58 AB A2 62 89 43 BD 94 EB | 
| system-uuid | E148D4BE-3BDA-614D-9FB8-0D54BA38B37B | E53A4D56-88F7-C26E-15EE-8843F1A0BAC7 | 741C5FAA-8831-5844-ABA2-628943BD94EB | 
| baseboard-manufacturer | Oracle Corporation | Intel Corporation | Parallels Software International Inc. | 
| baseboard-product-name | VirtualBox | 440BX Desktop Reference Platform | Parallels Virtual Platform | 
| baseboard-version | 1.2 | None | None | 
| baseboard-serial-number | 0 | None | None | 
| baseboard-asset-tag | Not Specified | Not Specified | Not Specified | 
| chassis-manufacturer | Oracle Corporation | No Enclosure | Parallels Software International Inc. | 
| chassis-type | Other | Other | Notebook | 
| chassis-version | Not Specified | N/A | |
| chassis-serial-number | Not Specified | None | |
| chassis-asset-tag | Not Specified | No Asset Tag | |
| processor-family | Unknown | Core i5 | |
| processor-manufacturer | GenuineIntel | GenuineIntel | |
| processor-version | Intel(R) Core(TM) i5-4288U CPU @ 2.60GHz | Not Specified | |
| processor-frequency | 2600 MHz | 2600 MHz | 
このように比べてみると、system-product-name を取得すればOSが実行中の仮想マシン情報を取得できそうですね。