• Skip to primary navigation
  • Skip to main content

jdgreen.io

The personal blog of James Green

  • Home
  • Technology
    • Announcements
    • Industry
    • Reviews/Guides
    • Tech Field Day
    • Interviews
  • Health
    • Food
    • Biohacking
    • Fitness
  • Faith
  • Book Notes
    • Business Books
    • Faith Books
    • Health Books
    • Technology Books
  • About
  • Show Search
Hide Search

VIB

Check VIB installation with PowerCLI

James Green · Feb 14, 2014 ·

This is super ugly, but I wanted as few lines as possible. Given a certain VIB name, this should give you a table of which hosts it is and isn’t loaded on. $True would indicate that it is installed. Maybe @alanrenouf can show me the PROPER way to do this 🙂

[code language=”powershell”] $VIBinstalled = @{}

Get-VMHost | Sort Name | %{
$VIBinstalled.Add($_,((Get-EsxCli -VMHost $_).software.vib.list() |
Where-Object {$_.Name -like ""}) -ne $null)}

$VIBinstalled
[/code]

Here’s a screenshot:

Screen Shot 2014-02-14 at 3.43.30 PM

[Read more…] about Check VIB installation with PowerCLI

Install/Uninstall plugins with vMA

James Green · Feb 14, 2014 ·

Sometimes you might run into a case (hopefully you don’t!) where a plugin needs to be installed on each ESXi host, but there’s no Update Manager instance handy to pass this out. I dealt with this situation recently by writing a couple of scripts to be run from a vMA that has targeted the vCenter server. It will go out and SCP the files to the host, then install the VIB. Sadly, the plugin didn’t get to stay. On the bright side, I got to generate an uninstall script as well! Below are both scripts. You run them in this fashion:

./install_vib.sh [vCenter server] [file with one host per line.txt]

They aren’t super robust, so make sure your inputs are right!

[code language=”bash”] #!/bin/bash

# run this script from vMA in this fashion: ./script.sh [vCenter Server] [file with on ESXi host on each line]

# validate that input has two parameters
if [ $# -ne 2 ]; then
echo "$0 [VCENTER] [HOSTS_FILE]"
exit 1
fi

# assign input args and username
VCENTER_HOST=$1
HOSTLIST=$2
export VI_USERNAME=root

# target vCenter server
source /opt/vmware/vma/bin/vifptarget -s ${VCENTER_HOST} > /dev/null 2>&1
echo -n "Now connected to: "
source /opt/vmware/vma/bin/vifptarget -d

# take inputs interactively
read -p "Enter VIB name: " VIB_NAME
read -p "Enter full .zip path on vMA: " VIB_PATH
read -s -p "Enter root password: " VI_PASSWORD ; export VI_PASSWORD

# show hosts to operate on
echo "Installing VIB on :"
cat $HOSTLIST

# SCP software, then install
if [ $? -eq 0 ]; then
IFS=$’n’ #one host to a line in the .txt file
for VI_HOST in $(cat ${HOSTLIST});
do
echo "Copying .zip files for ${VI_HOST}…"
echo "Enter password for ‘root’ to SCP file."
scp ${VIB_PATH} root@${VI_HOST}:/opt/$VIB_NAME.zip

echo "Installing VIB for ${VI_HOST}…"
esxcli –server ${VI_HOST} software vib install -n $VIB_NAME -d file:///opt/$VIB_NAME.zip
echo
done
unset IFS
else
echo "Unable to intialize installation.}"
fi

echo "Installation process complete."
[/code]

[Read more…] about Install/Uninstall plugins with vMA

Installing NetApp VAAI plugin for ESXi

James Green · Sep 23, 2013 ·

Often the storage offload capabilities of a storage array (VAAI in vSphere terms) need additional software to integrate with ESXi. This post will walk you through installing the NetApp plugin required to leverage VAAI on an NFS datastore. Good luck!

[Read more…] about Installing NetApp VAAI plugin for ESXi

Removing third-party drivers from ESXi

James Green · Sep 20, 2013 ·

Sometimes it will be necessary to uninstall a third-party driver that has been installed on an ESXi host. This is a simple process; however, it does require the host to be rebooted. Allow me to guide you through this process.

[Read more…] about Removing third-party drivers from ESXi

Copyright © 2023 · Monochrome Pro on Genesis Framework · WordPress · Log in

Posting....