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 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!
 
 

May 29 2009

Creating a Windows Server 2003 or 2008 Cluster within Hyper-V using iSCSI shared storage

Shared disk options when trying to create a cluster using virtualized nodes within Microsoft Hyper-V are very limited – in fact, only iSCSI will work! You can no longer use a shared SCSI device as you could with older Microsoft virtualization product or like you can with products from VMWare.

I was happy to find that StarWind offers a free iSCSI Target Server (http://www.starwindsoftware.com/) – it’s very simple to install and share out storage and best of all it is free – great for test / dev environments.

Gavin McShera has a fantastic step-by-step guide on how to set up a 2008 cluster in a Hyper-V environment over here –> http://blogs.technet.com/pfe-ireland/archive/2008/05/16/how-to-create-a-windows-server-2008-cluster-within-hyper-v-using-simulated-iscsi-storage.aspx

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