Tag: esxi
Posts
Recovering from lockdown mode, a corrupt vCenter, and no DCUI
One of the worst case scenarios when securing an ESXi host is disabling the DCUI, enabling lockdown mode, and then losing vCenter for some reason. If your vCenter database is corrupt then you have lost the ability to manage the host. The official answer at this point is to rebuild the host. While I hope you have an automated build process that would make this easy, there is at least one other option to recover your system.
Tag: lockdown
Posts
Recovering from lockdown mode, a corrupt vCenter, and no DCUI
One of the worst case scenarios when securing an ESXi host is disabling the DCUI, enabling lockdown mode, and then losing vCenter for some reason. If your vCenter database is corrupt then you have lost the ability to manage the host. The official answer at this point is to rebuild the host. While I hope you have an automated build process that would make this easy, there is at least one other option to recover your system.
Tag: perl
Posts
VMware vCLI “persistent login”
Here is a short convenience script that will simulate a persistent login to a VMware host system when using the vCLI on Windows. Typically you have to specify a lot of parameters that include login information or a session file. With this method you just run the script and provide the hostname, username, and password for the connection.
After running this script you can run commands like “vicfg-mpath.pl –list” without additional parameters.
Tag: powercli-powershell
Posts
Export and Import Customization Specs Using PowerCLI
Here are a couple of functions to help you export and import OS customization specs in vCenter. Be aware that if you do this between vCenters or the certificate changes then you will have to set any encrypted passwords to their correct value after the import.
These functions and the standard *-OSCustomizationSpec cmdlets should allow you to replicate your customization specs between multiple vCenters fairly easily.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 Function Export-OSCustomizationSpec { param ( [string]$specName, [string]$exportFile = "$specname.
Tag: powershell
Posts
VI Toolkit Install Script – PowerShell
Here is a script I wrote to install the VI Toolkit Extensions on my systems. The VITKE team decided to go with a cmd file in case PowerShell was not installed and I think that makes perfect sense. I am posting this code just in case it will be useful to someone else.
InstallVitkEextensions.ps1
Tag: powershell-compression
Posts
Gzip creation in PowerShell – Gzip-FileSimple.ps1
I have a need to compress some of the data I am exporting using PowerShell so I figured why not use PowerShell to do it? I did not want to have a dependency on the Community Extensions even though they have solved this problem already. Luckily in newer versions of .Net there is the System.IO.Compression class.
Here is my code which is based off of the Microsoft example for the class.
Tag: security
Posts
Recovering from lockdown mode, a corrupt vCenter, and no DCUI
One of the worst case scenarios when securing an ESXi host is disabling the DCUI, enabling lockdown mode, and then losing vCenter for some reason. If your vCenter database is corrupt then you have lost the ability to manage the host. The official answer at this point is to rebuild the host. While I hope you have an automated build process that would make this easy, there is at least one other option to recover your system.
Tag: ssh
Posts
Using clusterssh to admin multiple service consoles
We have our service consoles set up to disallow root logins and use sudo (with password) for access. Every once in a while this causes us some pain. How do you update file /etc/filex or run some command across a cluster or a bunch hosts when root privileges are needed?
There are multiple ways to approach this type of issue, but one I have not seen much of in the VMware blogosphere is clusterssh.
Tag: updatemanager
Posts
VMware Update Manager: Different non-critical host updates for Nexus
I have 5 difference vCenter servers installed over various timeframes and I am seeing different counts for the Non-Critical Host Updates across them. After some digging it appears that this is due to the Nexus 1000v updates.
We have not deployed the Nexus to production yet so this was a little confusing for me. It appears that when Update Manager is installed it downloaded the patches for the Nexus 1000v, but they are not included in the updates that are downloaded because we have none running in the environment and Update Manager was not configured to download them.
Tag: vcli
Posts
VMware vCLI “persistent login”
Here is a short convenience script that will simulate a persistent login to a VMware host system when using the vCLI on Windows. Typically you have to specify a lot of parameters that include login information or a session file. With this method you just run the script and provide the hostname, username, and password for the connection.
After running this script you can run commands like “vicfg-mpath.pl –list” without additional parameters.
Tag: vitkextensions
Posts
VI Toolkit Install Script – PowerShell
Here is a script I wrote to install the VI Toolkit Extensions on my systems. The VITKE team decided to go with a cmd file in case PowerShell was not installed and I think that makes perfect sense. I am posting this code just in case it will be useful to someone else.
InstallVitkEextensions.ps1
Tag: vmkernel
Posts
Understanding VMware VMkernel Traffic Routing
As a basis for an upcoming post on splitting vmkernel traffic across over layer 3 boundaries I wanted to describe how vmkernel traffic is routed on an ESX host. There seems to be a lot of confusion in this area and hopefully this will help to clear it up.
If you need a refresher on IP addresses, network masks, or subnets check out this Cisco article.
Directly Connected Networks
If a host is directly connected to a subnet it will use that interface to talk to devices in that subnet.
Tag: vmware
Posts
VMware Update Manager: Different non-critical host updates for Nexus
I have 5 difference vCenter servers installed over various timeframes and I am seeing different counts for the Non-Critical Host Updates across them. After some digging it appears that this is due to the Nexus 1000v updates.
We have not deployed the Nexus to production yet so this was a little confusing for me. It appears that when Update Manager is installed it downloaded the patches for the Nexus 1000v, but they are not included in the updates that are downloaded because we have none running in the environment and Update Manager was not configured to download them.
Posts
Understanding VMware VMkernel Traffic Routing
As a basis for an upcoming post on splitting vmkernel traffic across over layer 3 boundaries I wanted to describe how vmkernel traffic is routed on an ESX host. There seems to be a lot of confusion in this area and hopefully this will help to clear it up.
If you need a refresher on IP addresses, network masks, or subnets check out this Cisco article.
Directly Connected Networks
If a host is directly connected to a subnet it will use that interface to talk to devices in that subnet.
Posts
VMware vCLI “persistent login”
Here is a short convenience script that will simulate a persistent login to a VMware host system when using the vCLI on Windows. Typically you have to specify a lot of parameters that include login information or a session file. With this method you just run the script and provide the hostname, username, and password for the connection.
After running this script you can run commands like “vicfg-mpath.pl –list” without additional parameters.
Posts
Using clusterssh to admin multiple service consoles
We have our service consoles set up to disallow root logins and use sudo (with password) for access. Every once in a while this causes us some pain. How do you update file /etc/filex or run some command across a cluster or a bunch hosts when root privileges are needed?
There are multiple ways to approach this type of issue, but one I have not seen much of in the VMware blogosphere is clusterssh.