Recently I upgraded my environment to VMware 7u3c, but I had concerns about the issue with the i40enu VIB. Some of my hosts were running the version of ESXi that were listed as having the renamed VIB. So I really didn’t want to have to mess with downloading the python script, transferring it to the vCenter to run it.… Continue reading
Tag: Get-VMHost
How to Recovery VMs on a Defective Host?
How to recover from a host failure when DRS didn’t help because it wasn’t enabled, that is a good question. Normally HA will kick in and move the workload from one host to another upon failure. This morning, our HA agent must have slept in. SMH. When I got into the office virtually this morning, I found that I had a host failure, and 57 VMs went down with the ship thinking they were the captains.… Continue reading
PowerShell to Rename Datastores
At work we recently had a health check performed on our virtual environment. When the results came back, and I noticed a trend with our legacy VM hosts. Particularly where we didn’t follow the same standards as we did on the newer hosts. The issue I’ll be talking about, is renaming the local datastores. So now is the time to apply the same standards across the entire environment.… Continue reading
PowerCLI to list Template Info
We are starting to decommission the legacy VMware hosts in my work environment. Normally not a big deal or script for a task like this, but give me enough time I found a need. Templates. So you can easily find templates either using the H5 client or PowerCLI.
Get-Template
This cmdlet displays a list of the template VMs that are in the environment, but it doesn’t say where they are located.… Continue reading
Cisco UCS PowerTools and PowerShell
Cisco UCS PowerTools and PowerShell
As I mentioned in a previous post, we are upgrading our infrastructure and we are using Dell EMC VxBlock. So far this upgrade is going fairly smooth, but we are still at the very beginning of the process. So once I found out that the VxBlock was configured to contain UCS hardware, I began looking to see what Cisco had to offer for PowerShell modules to help manage the new hardware that we are getting. … Continue reading
PowerCLI to get Virtual to Physical CPU Ratio
PowerCLI to get Virtual to Physical CPU Ratio
I was in a meeting today, and was asked, “What is the current virtual to physical CPU ratio?” I didn’t have an answer for this question, so I asked PowerCLI for the answer.
[PS]
(get-cluster $ClusterName | Get-vm | Where Powerstate -eq “PoweredOn” | Measure NumCpu -sum).sum / (((Get-cluster $ClusterName | Get-vmhost).extensiondata.summary.hardware… Continue reading
PowerCLI to Update VMHost Name
What’s your (host)name?
While digging through Log Insight on a problem, I found a new one. A large majority of VMhosts were not configured with a proper hostname. This was also backup by the vCheck report that gets generated weekly. The hosts were configured with ‘localhost’ as the hostname, which makes this a huge pain when trying to follow the logs.… Continue reading
PowerCLI to Change Default Multipathing Policy
PowerCLI to Change Default Multipathing Policy
As it would seem in my environment the default multipathing policy changes with the seasons. We have become very accustom to making these changes based on the newest whitepaper from the storage vendor.
To change the default multipathing policy, you will need to know the name of the Storage Array Type Plugin (SATP) that you need to change the Native Multi-Pathing (NMP) policy for.… Continue reading
Enable SSH on VMhost with PowerCLI
How to Enable SSH for VMhost with PowerCli
To enable SSH:
To disable SSH:
– Stuart… Continue reading
PowerShell to gather Lenovo Warranty information
Lenovo Warranty Information Lookup
To continue with the theme of my last post, I’m going to show how to gather the warranty information for Lenovo Servers. This was a bit tricky as this isn’t an API call, but more of a website parsing.
Getting the Lenovo Server information
To be able to perform this warranty lookup, the server information will need to be retrieved, and what a better way than getting it from the VMhosts themselves.… Continue reading