Page 1 of 1 1
Topic Options
#205430 - 2012-06-27 10:15 AM Can someone run this code on VMware please?
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4673
Loc: The Netherlands
Hi guy's,

Can someone run the code below on a VMware virtual machine and let me know the results?
I do not have a VMware setup yet. It should return a VMware like manufacturer but I need to know the exact value.

 Code:
Break on

$wmiColl = GetObject("WinMgmts:root/cimv2").ExecQuery("Select * FROM Win32_BaseBoard ")

For Each $wmiObj in $wmiColl
	
	? $wmiObj.Manufacturer
		
Next

Sleep 5
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#205431 - 2012-06-27 03:03 PM Re: Can someone run this code on VMware please? [Re: Mart]
BradV Offline
Seasoned Scripter
****

Registered: 2006-08-16
Posts: 687
Loc: Maryland, USA
Hi Mart,

I got

Intel Corporation

The physical host is an HP DL380 (or maybe 580?).

Regards,

Brad

Top
#205432 - 2012-06-27 03:58 PM Re: Can someone run this code on VMware please? [Re: BradV]
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4673
Loc: The Netherlands
Hmmm.....d#mn not what I expected.
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#205433 - 2012-06-27 04:26 PM Re: Can someone run this code on VMware please? [Re: Mart]
BradV Offline
Seasoned Scripter
****

Registered: 2006-08-16
Posts: 687
Loc: Maryland, USA
Looking closer, Win32_BaseBoard returns information on the system board. Makes sense that it might be Intel. The virtual servers are running Windows 2008 R2 (64 bit). I changed it to:

 Code:
Break on

$wmiColl = GetObject("WinMgmts:root/cimv2").ExecQuery("Select * FROM Win32_ComputerSsystem")

For Each $wmiObj in $wmiColl
	
	? $wmiObj.Model
		
Next


and got back VMware Virtual Platform. Is that what you were looking for?

Regards,

Brad

Top
#205434 - 2012-06-27 05:56 PM Re: Can someone run this code on VMware please? [Re: BradV]
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4673
Loc: The Netherlands
Work great if I remove the extra S in ComputerSsytem

Would you mind running this and let me know the results?

 Code:
Break on

$wmiColl = GetObject("WinMgmts:root/cimv2").ExecQuery("Select * FROM Win32_ComputerSystem")

For Each $wmiObj in $wmiColl
	? $wmiObj.Manufacturer
	? $wmiObj.Model
Next

Sleep 5
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#205435 - 2012-06-27 07:13 PM Re: Can someone run this code on VMware please? [Re: Mart]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
what you mean with exact value?
what are you looking for that brad's code didn't yet provide?
_________________________
!

download KiXnet

Top
#205436 - 2012-06-27 07:29 PM Re: Can someone run this code on VMware please? [Re: Lonkero]
BradV Offline
Seasoned Scripter
****

Registered: 2006-08-16
Posts: 687
Loc: Maryland, USA
I get:

VMware, Inc.
VMware Virtual Platform

(sorry, none of my systems are connected to the Internet. So, I have to re-type everything and so can often make typoss) \:\)

Regards,

Brad

Top
#205437 - 2012-06-27 09:34 PM Re: Can someone run this code on VMware please? [Re: BradV]
Bryce Offline
KiX Supporter
*****

Registered: 2000-02-29
Posts: 3167
Loc: Houston TX
I get the same that BradV gets
Top
#205438 - 2012-06-28 09:00 AM Re: Can someone run this code on VMware please? [Re: Lonkero]
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4673
Loc: The Netherlands
 Originally Posted By: Lonkero

...
what are you looking for that brad's code didn't yet provide?


The name of the manufacturer.
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#205439 - 2012-06-28 09:01 AM Re: Can someone run this code on VMware please? [Re: Bryce]
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4673
Loc: The Netherlands
Thanks Bryce and Brad.

Exactly what I needed.
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#205444 - 2012-06-28 10:42 PM Re: Can someone run this code on VMware please? [Re: Mart]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
oh. But vmware doesn't manufacture computers.
_________________________
!

download KiXnet

Top
#205445 - 2012-06-28 11:25 PM Re: Can someone run this code on VMware please? [Re: Lonkero]
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4673
Loc: The Netherlands
I know. We have a project coming up that has among others a (small) requirement to detect if the system is a physical or virtual installation on MS or VMware virtualization systems. There is some time to spare but I'm trying to get the whole project done on time.
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#205446 - 2012-06-29 12:12 PM Re: Can someone run this code on VMware please? [Re: Mart]
Arend_ Moderator Offline
MM club member
*****

Registered: 2005-01-17
Posts: 1896
Loc: Hilversum, The Netherlands
Check for the HDD, it is always VMware, wether you are in ESXi, Workstation or Fusion.
Top
#205447 - 2012-06-29 05:16 PM Re: Can someone run this code on VMware please? [Re: Arend_]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
even direct access ones? Don't have my laptop with me, so can't check.
_________________________
!

download KiXnet

Top
#205448 - 2012-06-29 08:49 PM Re: Can someone run this code on VMware please? [Re: Lonkero]
Arend_ Moderator Offline
MM club member
*****

Registered: 2005-01-17
Posts: 1896
Loc: Hilversum, The Netherlands
No, iSCSI off course not \:\)
But in my Inventory I always use $obj.Model from Win32_ComputerSystem.
That returns "VMware Virtual Platform" on ESXi 3.5, 4.0, 4.1, 5.0 and 5.0u1 as well as on Workstation and Fusion. It is also the only thing I could find that would stil work after a P2V conversion.

But keep in mind, this of course gives a different value when using Xen, Hyper-V or RedHat's Hypervisor crap. Different Hypervisor different value.

Top
#205449 - 2012-06-29 10:02 PM Re: Can someone run this code on VMware please? [Re: Arend_]
Allen Administrator Offline
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4562
Loc: USA
I dont know if this will help or not, but imvirt supposedly does this.
http://micky.ibh.net/~liske/imvirt.html

Top
#205450 - 2012-07-04 01:55 AM Re: Can someone run this code on VMware please? [Re: Allen]
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11628
Loc: CA
Those appear to all be Linux based -
Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 793 anonymous users online.
Newest Members
M_Moore, BeeEm, min_seow, Audio, Hoschi
17883 Registered Users

Generated in 0.146 seconds in which 0.114 seconds were spent on a total of 13 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org