Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linux::getVirtualization() Inaccurate #11

Closed
rotexdegba opened this issue May 30, 2020 · 1 comment
Closed

Linux::getVirtualization() Inaccurate #11

rotexdegba opened this issue May 30, 2020 · 1 comment
Assignees

Comments

@rotexdegba
Copy link

Linux::getVirtualization() is giving inaccurate results. I am running the package on a CentOS7 VirtualBox instance and expected the method to return VirtualBox but it was returning VMWare because the method was checking for VMWare first, but the later check for VirtualBox also evaluates to true but is never executed because the method returns earlier because of the VMWare check that passed first.

if (Common::anyInArray(['vmw_balloon', 'vmwgfx', 'vmw_vmci'], $modules)) {

Below is the output of print_r($modules)

Array
(
    [0] => tcp_lp
    [1] => binfmt_misc
    [2] => nls_utf8
    [3] => isofs
    [4] => fuse
    [5] => xt_CHECKSUM
    [6] => ipt_MASQUERADE
    [7] => nf_nat_masquerade_ipv4
    [8] => tun
    [9] => devlink
    [10] => ip6t_rpfilter
    [11] => ip6t_REJECT
    [12] => nf_reject_ipv6
    [13] => ipt_REJECT
    [14] => nf_reject_ipv4
    [15] => xt_conntrack
    [16] => ebtable_nat
    [17] => ebtable_broute
    [18] => bridge
    [19] => stp
    [20] => llc
    [21] => ip6table_nat
    [22] => nf_conntrack_ipv6
    [23] => nf_defrag_ipv6
    [24] => nf_nat_ipv6
    [25] => ip6table_mangle
    [26] => ip6table_security
    [27] => ip6table_raw
    [28] => iptable_nat
    [29] => nf_conntrack_ipv4
    [30] => nf_defrag_ipv4
    [31] => nf_nat_ipv4
    [32] => nf_nat
    [33] => iptable_mangle
    [34] => iptable_security
    [35] => iptable_raw
    [36] => nf_conntrack
    [37] => ip_set
    [38] => nfnetlink
    [39] => ebtable_filter
    [40] => ebtables
    [41] => ip6table_filter
    [42] => ip6_tables
    [43] => iptable_filter
    [44] => sunrpc
    [45] => ppdev
    [46] => joydev
    [47] => iosf_mbi
    [48] => crc32_pclmul
    [49] => ghash_clmulni_intel
    [50] => snd_intel8x0
    [51] => aesni_intel
    [52] => snd_ac97_codec
    [53] => lrw
    [54] => gf128mul
    [55] => ac97_bus
    [56] => glue_helper
    [57] => snd_seq
    [58] => sg
    [59] => ablk_helper
    [60] => snd_seq_device
    [61] => cryptd
    [62] => snd_pcm
    [63] => i2c_piix4
    [64] => snd_timer
    [65] => snd
    [66] => parport_pc
    [67] => parport
    [68] => soundcore
    [69] => vboxguest
    [70] => video
    [71] => pcspkr
    [72] => ip_tables
    [73] => xfs
    [74] => libcrc32c
    [75] => sr_mod
    [76] => sd_mod
    [77] => cdrom
    [78] => crc_t10dif
    [79] => crct10dif_generic
    [80] => ata_generic
    [81] => pata_acpi
    [82] => vmwgfx
    [83] => drm_kms_helper
    [84] => syscopyarea
    [85] => sysfillrect
    [86] => sysimgblt
    [87] => fb_sys_fops
    [88] => ttm
    [89] => ahci
    [90] => drm
    [91] => libahci
    [92] => ata_piix
    [93] => e1000
    [94] => libata
    [95] => crct10dif_pclmul
    [96] => crct10dif_common
    [97] => crc32c_intel
    [98] => serio_raw
    [99] => drm_panel_orientation_quirks
    [100] => dm_mirror
    [101] => dm_region_hash
    [102] => dm_log
    [103] => dm_mod
    [104] => agpgart-intel
    [105] => agpgart-sis
    [106] => agpgart-via
    [107] => ahci
    [108] => ata_generic
    [109] => ata_piix
    [110] => e1000
    [111] => ehci-pci
    [112] => intel-lpss
    [113] => intel_ish_ipc
    [114] => ioapic
    [115] => iosf_mbi_pci
    [116] => langwell_gpio
    [117] => ohci-pci
    [118] => parport_pc
    [119] => pata_acpi
    [120] => pci-stub
    [121] => pcieport
    [122] => piix4_smbus
    [123] => serial
    [124] => shpchp
    [125] => snd_intel8x0
    [126] => thunderbolt
    [127] => uhci_hcd
    [128] => vboxguest
    [129] => vmd
    [130] => vmwgfx
    [131] => xen-platform-pci
    [132] => xhci_hcd
)
@Gemorroj Gemorroj self-assigned this Jun 7, 2020
Gemorroj added a commit that referenced this issue Jun 7, 2020
@Gemorroj
Copy link
Owner

Gemorroj commented Jun 7, 2020

tnx to report!

@Gemorroj Gemorroj closed this as completed Jun 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants