ntp powershell (semi)

w32tm.exe /config /manualpeerlist:”0.us.pool.ntp.org 1.us.pool.ntp.org 2.us.pool.ntp.org 3.us.pool.ntp.org” /syncfromflags:manual /reliable:YES /update
w32tm.exe /config /update
Restart-Service w32time
w32tm /query /configuration | Select-String ‘type’
w32tm /query /peers

checking cluster enic fnic and driver vers

Get the enic and fnic and check for any drivers that are NOT the VMware ones.

$vmhs = Get-Cluster dc1-clv07 | Get-VMHost | sort Name
foreach ($vmh in $vmhs){
Write-Host $vmh.Name " - " $vmh.build -ForegroundColor Blue
#$vmh = Get-VMHost "ral-dev-esx27.rd.allscripts.com"
$esxcli = Get-EsxCli -VMHost $vmh
$face = $esxcli.software.vib.list()
$face | where {$_.Vendor -ne "VMware"} | ft Name,Vendor,Version
Write-Host ""

Oracle on VMware Lic and Support

This will hopefully be a good article for the SMB’s and all my COOP friends over something that is a pain point… Oracle Licensing, and support, first off let me state that there will be multiple links on this post. Some will explain and go to direct links and some will be to other blogs. This will cover Oracle Database Standard edition. That appears to be what is typically deployed in the COOP land

First, let’s talk about support:

VMware says they got your back if oracle tells you to reproduce on physical hardware (which I have NEVER, NEVER, EVER NOT ONCE seen)
Note you will need a support account to view above.
Now that we are all happy because Oracle is supported, let’s move on!
Oracle states max of 4 sockets; this is fine since mostly all servers in the SMB land are 2 socket.
Standard edition is licensed as follows:
“Standard Edition Per-socket licensing
If you use Standard Edition or Standard Edition One on a 2 processor system you simply need 2 licenses. However, if you use Enterprise Edition you need to take the number of cores into account as well.”
Oracle defines VMware as “Soft partitioning”
This states the following:
“Soft partitioning is not permitted as a means to determine or limit the number of software licenses required for any given server.”
So you have to License the Physical host based on the number of CPU sockets installed.…
Nowhere does oracle state that you have to license EVERY HOST in a cluster, just the ones where the application is installed,

“The OLSA does not say you must license every host where Oracle might possibly at some point in the future be installed and/or run, else you would have to license every host in your datacenter. Do you need to license all hosts connected into every SAN where Oracle is installed and/or run? NO! You must license the hosts were Oracle IS installed and/or run. As soon as a VM comes onto an unlicensed host, or Oracle is installed and/or run on an unlicensed host, then you must license that host, end of story.”
Now then, once you license a CPU, any VM can run that version of Oracle without the need for addition Licenses.. So let’s Simply create a DRS rule that states the oracle VMs HAVE to run on a host, this is easy. So now that is done, run as many Oracle Standard Edition, in as many VMs are you want too!
Knowing this will hopefully prevent my client from purchasing another piece of physical hardware, and it will cover them for DR.
They will get 4 or 6 licenses, this will cover 2 or 4 cpus at HQ, and 2 at dr, they will be fully covered on Oracle as I will have audit logs saved for vMotion and drs events. If customer decides to do 4 cpu at hq then we have maintenance without shutting down the guest VMs
This will allow them to be uber flexible with everything, and save some cash due to reduced hardware and all the other fun things virtualization brings, as well as adhere to their virtualization first policy!



“When a customer does not have enough Oracle application instances to justify creating a dedicated cluster
for those applications, only a subset of the hosts in the cluster are licensed for the Oracle application….
. At present, Oracle does not have any stated policy regarding clustering mechanisms or DRS Host Affinity. Customers can easily maintain records for compliance..”

Community Blogs:

powershell esxcli set psp

$face = Get-Cluster HQ | Get-VMHost | Get-ScsiLun -LunType disk | Where {$_.MultipathPolicy -ne “RoundRobin”}

Get-Cluster [ClusterName] | Get-VMHost | Get-ScsiLun -LunType disk | Where {$_.MultipathPolicy -ne “DELL_PSP_EQL_ROUTED ”} | Set-ScsiLun -MultipathPolicy “RoundRobin”

$face = Get-VMHost “esxi-hq-03*” | Get-ScsiLun -LunType disk | Set-ScsiLun -MultipathPolicy “Unknown”

$esxcli = Get-EsxCli -VMHost “esxi-hq-03*”

esxcli storage nmp device set –device naa.64ed2ac55694dea85e16f5d08d01e0dd –psp DELL_PSP_EQL_ROUTED

$meh = $esxcli.storage.nmp.device.list()

$meh2 = $meh | where {$_.Device -like “naa.64ed*”}

foreach ($ds in $meh2){
$esxcli.storage.nmp.device.set($null,$ds.Device, “DELL_PSP_EQL_ROUTED”)


how to make an iso with the latest image!

ever wanted to make an ISO with the latest stuff so no need to reinstall or reupdate the host?

Add-EsxSoftwareDepot https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml
Get-EsxImageProfile ESXi-5.1.0-20130304001-standard | Export-EsxImageProfile -ExportToIso -FilePath C:\AlanTemp\esx51latest.iso

SSH, suppress shell, syslog, firewall

making ssh and syslog and enabling via powercli

Get-VMHost atl* | sort name | Foreach {
Start-VMHostService -HostService ($_ | Get-VMHostService | Where { $_.Key -eq "TSM-SSH"} )
$_ | Get-VMHostService | Where { $_.Key -eq "TSM-SSH"} | Set-VMHostService -Policy on
$_ | Set-VMHostAdvancedConfiguration UserVars.SuppressShellWarning 1
$_ | Set-VMHostAdvancedConfiguration -Name Syslog.global.logHost -Value ""
$_ | set-vmhostAdvancedconfiguration -name Vpx.Vpxa.config.log.level -Value "info"
$_ | set-vmhostAdvancedconfiguration -name Config.HostAgent.log.level -value "info"
$_ | Get-VMHostFirewallException |?{$_.Name -eq 'syslog'} | Set-VMHostFirewallException -Enabled:$true