September 28, 2012 at 10:25 am
We have infrasctructure folks that setup and configure hardware when we need a new SQL Server for something.
Once the server team turns it over to us, they provide me a name and say "Here's your server name."
In turn, I use RDC to connect up to that machine and begin installing the SQL Server instance etc.
But once I get onto it, is there a way that I can easily tell if I've been provided a physical server or a VM shared amongst 5 other SQL Server instances?
We're seeing some strange stuff on one of our servers, and if I didn't know better, then I'd swear that the symptoms are more like those of a loaded-down VM.
Is there perhaps a DMV query that might yield this information?
Thanks for your thoughts.
Larry
September 28, 2012 at 11:09 am
With VMWare having the VMware Tools installed, or in systray is a pretty good indicator.
September 28, 2012 at 12:03 pm
I just opened Device Manager on a VM I use and saw "VMWare" listed in the descriptions for the Disk Drive, Display and DVD/CD-ROM devices.
September 28, 2012 at 12:06 pm
True dat Benjamin, but you can click an option to hide that VM Tool icon in the sys-tray.
I was hoping that there might be a DMV which might be able to detect it. A sneaky infrastructure builder could mask it if they wanted to conceal the fact that you might be running on a VM. We've put up several VMs with SAN-based storage, the C: drives even appear as Local drives.
Hmmm...way back when, I was a mainframe system programmer. We ran IBM's VM operating system, but we could easily spin up an MVS machine under a VM and neither the OS or users of it could tell that they weren't running under VM.
Thanks for the tip though.
September 28, 2012 at 1:24 pm
You could try:
SELECT SERVERPROPERTY('ComputerNamePhysicalNetBIOS')
If that doesn't work, there are SERVERPROPERTY parameters that aren't documented: you might try poking around for some of those and see if any of them help :-).
SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".
September 28, 2012 at 2:17 pm
ScottPletcher (9/28/2012)
You could try:
SELECT SERVERPROPERTY('ComputerNamePhysicalNetBIOS')
If that doesn't work, there are SERVERPROPERTY parameters that aren't documented: you might try poking around for some of those and see if any of them help :-).
That doesn't seem to work on my VMs. I don't think there is anything built into sql server that would give you that visability. I don't know that sql server would/should care that much at this point.
I did find from the following thread just typing systeminfo into a cmd line will tell you. But I'd imagine if a really clever admin could obscure basically anything about a machine, though I doubt they would as that usually means a lot more admin overhead.
http://serverfault.com/questions/109154/how-do-i-know-if-im-working-on-a-virtual-machine-or-not
September 28, 2012 at 3:52 pm
September 29, 2012 at 9:48 am
Larry Kruse (9/28/2012)
True dat Benjamin, but you can click an option to hide that VM Tool icon in the sys-tray.I was hoping that there might be a DMV which might be able to detect it. A sneaky infrastructure builder could mask it if they wanted to conceal the fact that you might be running on a VM. We've put up several VMs with SAN-based storage, the C: drives even appear as Local drives.
Hmmm...way back when, I was a mainframe system programmer. We ran IBM's VM operating system, but we could easily spin up an MVS machine under a VM and neither the OS or users of it could tell that they weren't running under VM.
Thanks for the tip though.
You can hide the icon from the system tray but the windows services will still be there
-----------------------------------------------------------------------------------------------------------
"Ya can't make an omelette without breaking just a few eggs" 😉
October 1, 2012 at 10:48 am
ScottPletcher (9/28/2012)
You could try:
SELECT SERVERPROPERTY('ComputerNamePhysicalNetBIOS')
This command returns the machine name for me. Interestingly, if you run it on a Named Instance or a multi-node clustered instance it returns the name of the machine that is currently running SQL, which might be useful.
As for determining if a maching you're RDP'ing on is virtual, looking at the Disks Drives in Device Manager makes it clear: "VMWare Virtual Disk." Don't know about Hyper-V or other platforms.
October 1, 2012 at 1:24 pm
You may find this link useful http://blogs.metcorpconsulting.com/tech/?p=40.
Viewing 10 posts - 1 through 9 (of 9 total)
You must be logged in to reply to this topic. Login to reply