May 17 2013

Powershell WMI query for virtual machine

There have been many times when I need to query a machine to see if it is virtual or physical. This quick Powershell WMI query will do the trick:

 

$Result = $null
$bios = gwmi Win32_BIOS -computername computername | Select-Object "version","serialnumber"
$compsys = gwmi Win32_ComputerSystem -computername $DC.Name | Select-Object "model","manufacturer"
if($bios.Version -match "VRTUAL") {$DCVM = "Virtual - Hyper-V"}
elseif($bios.Version -match "A M I") {$DCVM = "Virtual - Virtual PC"}
elseif($bios.Version -like "*Xen*") {$DCVM = "Virtual - Xen"}
elseif($bios.SerialNumber -like "*VMware*") {$DCVM = "Virtual - VMWare"}
elseif($compsys.manufacturer -like "*Microsoft*") {$DCVM = "Virtual - Hyper-V"}
elseif($compsys.manufacturer -like "*VMWare*") {$DCVM = "Virtual - VMWare"}
elseif($compsys.model -like "*Virtual*") {$DCVM = "Virtual"}
else {$DCVM = "Physical"}
write-host $Result


----------------------------------------------------------------------------
I use a maximum of one Google Ad per post to help offset some of my blog hosting costs.

----------------------------------------------------------------------------

September 17 2012

VMWare ESX support for Windows Server 2012

I found it quite hard to find this information so I figured I would share it. I was looking for an official line from VMWare on the versions of ESX that would Windows Server 2012 as a guest operating system.

Directly quoted from http://blogs.vmware.com/guestosguide/2012/09/windows-server-2012.html :

The release of vSphere 5.1 introduces support for Windows Server 2012 on ESXi 5.1, with the following support considerations:

  • Installation instruction can be found here http://partnerweb.vmware.com/GOSIG/Windows_Server_2012.html
  • Snapshots, checkpoints and VMotion actions for virtual machines with Windows 8 or Windows Server 2012 are incompatible between hosts running ESXi 5.0 Update 1 or ESXi 5.0 P03 with host running later versions of ESXi ( ESXi 5.0 Update 2, ESXi 5.1, etc.). Please refer to KB-2033723 for more information.
  • The Guest OS Customization feature in vCenter does not support Windows 8 or Windows Server 2012 in vSphere 5.1.
  • vSphere client will use EFI BIOS for VMs configured for Windows 8 or Windows Server 2012 with hardware version 9, however, EFI BIOS is not compatible with the Fault Tolerance feature. Therefore to use Fault Tolerance feature, it is recommended to use Legacy BIOS instead of EFI BIOS.

For more information about software support, please check the VMware Compatibility Guide

Also from http://kb.vmware.com/selfservice/microsites/microsite.do?cmd=displayKC&docType=kc&externalId=2006859&sliceId=2&docTypeID=DT_KB_1_1  I have extracted this one liner:

Windows 8 / Windows Server 2012 will not be supported on ESXi/ESX 4.0 or 4.1.

And finally, from http://partnerweb.vmware.com/comp_guide2/pdf/VMware_GOS_Compatibility_Guide.pdf (page 103) I read that supported releases are ESXi 5.1 or ESXi 5.0 U1.

More information:

Category: Windows | LEAVE A COMMENT
June 1 2011

SCCM report – count physical vs virtual servers

This report displays the number of servers in the environment and gives a breakdown and percentage view of physical vs virtual:


Declare @Total as int
Declare @Physical as int
Declare @Virtual as int
set @Virtual =
(Select distinct count (*)
From
v_R_System full Join
v_GS_COMPUTER_SYSTEM On v_GS_COMPUTER_SYSTEM.ResourceID =
v_R_System.ResourceID
where v_R_System.Operating_System_Name_and0 LIKE '%server%'
and v_R_System.Client0 = 1
and (v_GS_COMPUTER_SYSTEM.Manufacturer0 = 'Microsoft Corporation' or v_GS_COMPUTER_SYSTEM.Manufacturer0 = 'VMware, Inc.'))
set @Total =
(Select distinct count (*)
From
v_R_System full Join
v_GS_COMPUTER_SYSTEM On v_GS_COMPUTER_SYSTEM.ResourceID = v_R_System.ResourceID
where v_R_System.Operating_System_Name_and0 LIKE '%server%'
and v_R_System.Client0 = 1 )
set @Physical = (select @Total - @Virtual)
Select @Physical as 'Physical servers',
@Virtual as 'Virtual servers',
@Total as 'Total servers',
(select (@Virtual * 100) / @Total) as 'Percentage (%) that are virtual'

 
 

September 21 2010

Virtualization support for Microsoft products including SCCM, OCS, Exchange, ISA

For many years I’ve had to scour the interwebs to find out if hardware virtualization is supported by Mircosoft for a particular product.

I’m not sure how long it has been around but I’ve finally found the Windows Server Catalog site which will simply tell you if it is supported or not:

http://www.windowsservercatalog.com/svvp.aspx?svvppage=svvpwizard.htm

For example I can easily see that SCCM 2007 SP2 on VMWare ESX 3.5 Update 5 with Windows Server 2008 R2 x64 as the guest OS is SUPPORTED!

So simple and so overdue!
 
 

December 15 2008

VMWare Converter 4.0 beta program

Looks quite nice. New features include:

  • Support for Red Hat, SUSE and Ubuntu Linux distributions as source
  • Support for Microsoft Windows Server 2008 as source
  • Support for Parallels Desktop virtual machines as source
  • Power off source machine at the end of the conversion
  • Selection of the target virtual disk and virtual volumes configuration
  • Configuration of the target virtual machine
  • Incremental hot cloning (Converter now replicates any change happening to the source machine during the P2V migration)
  • Register at:

    http://www.virtualization.info/2008/11/vmware-opens-converter-40-beta-program.html