December 13, 2010 at 1:58 pm
Is there any way to find the server is Physical machine or Virtual machine
Thanks
John
December 13, 2010 at 2:04 pm
Given the way these packages work they try to insulate the OS from the HW so it is kind of hard to determine.
You could likely look in the registry to see if VM tools are installed, such as VMWare or Sun Virtual Box or Hyper-V. They all have tools installs, not 100% foolproof but a start.
Anybody done this successfully?
CEWII
December 13, 2010 at 3:06 pm
Along with VMWare tools you can open a command prompt and type in "systeminfo".
It will spit out a good many lines but go back to the start and you will see System Manufacturer and System Type. For a VMware environment this will show you "Vmware, Inc." for Manufacturer and "VMware Virtual Platform" for Model. I'm not sure what HyperV will show you, but I'm sure something similar.
Shawn Melton
Twitter: @wsmelton
Blog: wsmelton.github.com
Github: wsmelton
December 13, 2010 at 3:08 pm
Simple trick we used to use was to RDC into the box and check the TSR tray in the bottom right for the VM software.
Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.
For better assistance in answering your questions[/url] | Forum Netiquette
For index/tuning help, follow these directions.[/url] |Tally Tables[/url]
Twitter: @AnyWayDBA
December 13, 2010 at 3:19 pm
Craig Farrell (12/13/2010)
Simple trick we used to use was to RDC into the box and check the TSR tray in the bottom right for the VM software.
That's a trick I use as well.
Jason...AKA CirqueDeSQLeil
_______________________________________________
I have given a name to my pain...MCM SQL Server, MVP
SQL RNNR
Posting Performance Based Questions - Gail Shaw[/url]
Learn Extended Events
December 13, 2010 at 3:23 pm
This powershell resource might be of assistance as well.
http://powershell.com/cs/forums/p/3255/4443.aspx
Jason...AKA CirqueDeSQLeil
_______________________________________________
I have given a name to my pain...MCM SQL Server, MVP
SQL RNNR
Posting Performance Based Questions - Gail Shaw[/url]
Learn Extended Events
January 6, 2011 at 3:15 am
Shawn Melton (12/13/2010)
Along with VMWare tools you can open a command prompt and type in "systeminfo".It will spit out a good many lines but go back to the start and you will see System Manufacturer and System Type. For a VMware environment this will show you "Vmware, Inc." for Manufacturer and "VMware Virtual Platform" for Model. I'm not sure what HyperV will show you, but I'm sure something similar.
This is my way too... can also be part of an automated job that collects a lot more info about each server in a much large set 😀
January 6, 2011 at 8:43 am
Craig Farrell (12/13/2010)
Simple trick we used to use was to RDC into the box and check the TSR tray in the bottom right for the VM software.
Not that I have seen it anywhere yet, but that tray icon can be turned off. Again I don't know why you would want to, just an FYI.
Shawn Melton
Twitter: @wsmelton
Blog: wsmelton.github.com
Github: wsmelton
January 10, 2011 at 10:59 pm
It may have to do with, do you only want to know if it is a "virtual machine", or is it part of a Windows clustered environment. In both cases, the name of the physical server will not typically show up in the server name. In a TRUE virtual environment (i.e. non-clustered) you will have the virtual operating system be reported instead of the actual physical server. In a clustered environment, the physical server(s) are typically different than the SQL cluster resource group name.
Recall that instance names are : <logical server or cluster resource group name>/InstanceName
A logical server can be physical or virtual, but it will be a Windows operating system. The physical server hosting a virtual server can be (and in my experience typically is) non-Windows based. I have not found a way to "break-through" the virtual o/s to interrogate the physical o/s.
If someone can provide a programmatic way of determining this (as opposed to looking at a GUI), that would be great - as it is a question I have had for quite some time.
January 22, 2012 at 3:26 pm
tried using select @@version?
January 24, 2012 at 11:21 pm
Even I follow the same trick mentioned by Shawn to find machine type.
January 25, 2012 at 8:06 am
You can query the WMI class Win32_ComputerSystem and look at Manufacturer and Model.
This works against a Win 2008R2 and Win 2000. Which would mean that everything in between also works.
For a vSphere I got
Manufacturer: VMware, Inc.
Model: VMware Virtual Platform
For a Virtualbox I got:
Manufacturer: innotek GmbH
Model: VirtualBox
CEWII
February 28, 2012 at 8:33 pm
Does the same trick work for Hyper-V?
Jason...AKA CirqueDeSQLeil
_______________________________________________
I have given a name to my pain...MCM SQL Server, MVP
SQL RNNR
Posting Performance Based Questions - Gail Shaw[/url]
Learn Extended Events
February 29, 2012 at 9:27 am
Shawn Melton (12/13/2010)
Along with VMWare tools you can open a command prompt and type in "systeminfo".It will spit out a good many lines but go back to the start and you will see System Manufacturer and System Type. For a VMware environment this will show you "Vmware, Inc." for Manufacturer and "VMware Virtual Platform" for Model. I'm not sure what HyperV will show you, but I'm sure something similar.
For GUI use, I usually prefer something like Piriform's Speccy, but systeminfo comes built in to modern Windows.
Here's a little bit of information for IDing your platform, and a lot of open questions
Hyper-V guest:
System Manufacturer: Microsoft Corporation
System Model: Virtual Machine
MS Virtual PC guest:
System Manufacturer: Microsoft Corporation
System Model: Virtual Machine
VMWare ESXi with vCenter guest:
System Manufacturer: VMware, Inc.
System Model: VMware Virtual Platform
VMWare ESXi standalone guest:
?
VMWare Workstation guest:
?
VMWare Player guest:
?
VMWare Fusion guest:
?
Virtualbox Community guest:
?
Virtualbox paid edition guest:
?
Xen guest:
?
March 2, 2012 at 9:38 am
SQL 2008 R2 has an attribute in sys.dm_os_sys_info called virtual_machine_type. That field should give you the information you seek.
Jason...AKA CirqueDeSQLeil
_______________________________________________
I have given a name to my pain...MCM SQL Server, MVP
SQL RNNR
Posting Performance Based Questions - Gail Shaw[/url]
Learn Extended Events
Viewing 15 posts - 1 through 15 (of 25 total)
You must be logged in to reply to this topic. Login to reply