you can use systeminfo command to command prompt .check the image below

if you see System Manufacturer name as VMware, Inc.then it is a Virtual Machine

You can even use SQL Server to confirm that SQL Server is runing on Physical or Virtual Machine ,just run the below query in the SSMS

DECLARE @Result TABLE
(
LogDate DATETIME,
ProcessInfo NVARCHAR(MAX),
Text NVARCHAR(MAX)
)

INSERT  @Result
EXEC    sys.xp_readerrorlog 0, 1, ‘System Manufacturer’, ‘VMware’

IF EXISTS (SELECT * FROM @Result)
SELECT ‘Virtual Server’ AS Msg
ELSE
SELECT ‘Physical Server’ AS Msg

check the image below

Leave a Reply

Your email address will not be published. Required fields are marked *