ESX

Tech Short: Enable SNMP on ESXi 6

Now that you are on or you have just started using VMware ESXi 6 and would like to do some monitoring via SNMP here is a way to enable this and set the community string in the process.

By default, remote clients are prevented from accessing services on host, unless configured to start automatically.

While you can simple set SNMP to start it does not set the community name and this is where we drop into the cli to do this.

Connect to the ESXi 6 host terminal or via SSH and issue the following commands:

By doing the following you have set the community strong value and started the service.

Finished

 

Quest to automate snapshots in ESXi

I am looking for a way to run a instance and have it revert back to its snapshot every 24 hours. I started toying around with the idea to use the vim-cmd features however there doesn’t seem to be a way to set a task for this.

So far here are the steps I used

Looked up the ID of the VM in question by running:

vim-cmd vmsvc/getallvms

View your VM’s snapshot tree by passing its ID to this command (this example uses the VM with ID 50):

vim-cmd vmsvc/get.snapshotinfo 80

And issues the command to revert the snapshot

vim-cmd vmsvc/snapshot.revert VM_ID 0 SNAPSHOT_ID suppressPowerOff

 

The output looks something like this in my testing

This works and now all I need is to somehow automate and schedule this.

Get the 3ware 9650SE working with ESXi 5.x

At the office we recently built two white box, built it yourself servers (lego’s). I called them Lego’s due to the fact they are build your own types and not OEM. For each of these powerhouse systems we got 3ware 9650SE RAID controllers (3ware 9650SE-4LPML PCI Express Lanes: 4 SATA II Controller Card RAID Levels 0, 1, 5, 10, Single Disk, JBOD, KIT).

After getting ESXi 5.x installed to a USB Stick to boot from I encountered an issue where the 3ware controller was not recognized by the system. Well this could only be one thing. Drivers.

This is where installing of the controller driver fun begins.

I first navigated to the LSI website and their support page to download the drivers for these controllers. Where I was able to find drivers for VMware ESXi 5.0 update 1 driver for 9650SE/9690SA

After downloading the zip archive of the driver, I extracted and used WinSCP to upload the drivers to the /tmp directory of my ESXi 5.x hosts.

I then logged into the ESXi 5.x using SSH with Putty.

After changing my directory to /tmp I ran the following command:

esxcli software vib install -v /tmp/scsi-3w-9xxx-2.27.08.036-1OEM.500.0.0.472560.x86_64.vib

Soon after I got the following messages:

Installation Result
Message: The update completed successfully, but the system needs to be rebooted for the changes to be effective.
Reboot Required: true
VIBs Installed: LSI_bootbank_scsi-3w-9xxx_2.27.08.036-1OEM.500.0.0.472560
VIBs Removed:
VIBs Skipped:

After the install I followed the instruction to reboot and after the systems were up and running again I was able to see the controller and create my new data-stores.

Link(s):

https://my.vmware.com/web/vmware/details?productId=242&downloadGroup=DT-ESXi50-SAS-3w9xxx-22708036

Goodbye Configuration Issues Warning

So you are running VMware ESXi 5 and enabled remote and local shell access.
What you have found by doing this is a nice warning screen like the screenshot below waiting for you each and every time you are logged in.

Getting rid of this is simple.

Go to your host, click the configuration tab, click “advanced settings”, go to UserVars” and scroll all the way down to “UserVars.SuppressShellWarning” change the value from 0 to 1.

 

Upgrade Install of ESXi 5.0 Update 1

I wrote some steps on this in a previous post.  I am back again to take you for my ride in upgrading to update 1 for ESXi 5.

Direct download update link: https://hostupdate.vmware.com/software/VUM/OFFLINE/release-328-20120312-212851/update-from-esxi5.0-5.0_update01.zip

Once you have the upgrade zip, you will wan to SCP this over to the ESXi 5 server.
I use my datastore as it has the most space aviable.
Issue the following command:
esxcli software vib update –depot=/vmfs/volumes/datastore1/…  *path to zip file*
This may take a few minues to return some results.
When it does you will know and it may look something like this:
Reboot you server (just type reboot)
That’s it, you are done.

Unsupported Console and SSH on ESXi 4

I haven done this in a long time and took a short while to remember.  So I said why not list the steps here

alt-f1 (Note:  you will not see your typing on this screen).
unsupported
root pw (password)
vi /etc/inetd.conf
delete the “#” from ssh for the IPv4 and IPv6 (If your using it)
services.sh restart

Quick ESXi iSCSI configuration

Here is a quick walkthrough on connecting your ESXi host to an iSCSI target.
[Start Now]
Connecting to our ESXi server with the vSphere client is go into the configuration tab then storage adapters. Now we need to enable the iSCSI software adapter and click configure.
After enabling the software adapter we need to point it at our iSCSI target. Go to the dynamic discovery tab and “click add”.
Enter the IP address of the SAN and use port 3260
Click close and you will be prompted to rescan for storage, click yes
Our iSCSI disk will now show up under the software adapter
Go to the storage section of the configuration and click “Add Storage”
Select Disk/LUN and click “Next” then select the new iSCSI target and click “Next” and Click “Next” again
Enter a datastore name and click “Next”
Click “Next” unless you want to adjust the block size
Click “Finish”
Now your new iSCSI datastore is ready to use

Updating ESXi 5 – How To

So you are running ESXi5 standalone in my house or your office.  You have a need up patch this baby for the latest in driver support for guest and perhaps for Runing Windows 8 on vSphere 5

Here are a few things you might want to know and do to make this happen

 

Make sure you have ESXi Shell access on the ESXi 5 host.

Download the patch bundle directly from VMware Support. This download will be .zip file.  Do not extract it.

Upload the .zip file to a datastore that is accessible on the ESXi host you wish to update

Note:  In the examples below… Adjust accordingly.

Obtain local console access or ssh in.

Place your hose in maintenance mode and shutdown / pause all of your guest systems

To update the ESXi 5 host with the VIBs included in the depot, issue the following command:  esxcli software vib update --depot=/vmfs/volumes/datastore1/somepath/ESXi500-201109001.zip

When the update is complete reboot the ESXi 5 host

I could have also included other steps like verification of what is installed before and after, but why?  You should know how to do that and well there is always Google.

As always, thank you for reading this and I hope this helps.

Useful Link:  http://www.vmware.com/patchmgr/download.portal

 

Convert thick disks to thin provisioning | ESX

Got Space? I don’t

Seeing how it’s not possible to convert a VMWare Guest VM’s from ‘thick’ to ‘thin’. I will provide some simple info on how to clone the disk into a ‘thin’ disk. Once completed the original ‘thick’ disk can be deleted

# remote into your ESX Server
# service console can be used also
# change into your machine directory and type
vmkfstools -i <*thickDiskname.vmdk> -d thin <thintDiskname.vmdk>

 

Install VMWare Tools Ubuntu Server

This is a little short on how to install the ESX VMWare Tools on Ubuntu Server

If you are not running as the ‘root’ user you will need to change into super user

Lets start —

 

# if not running as ‘root’ change into super user
sudo su

# update your sources
apt-get update

# you will need to install the build tools
apt-get install build-essential
apt-get install linux-headers-server

# we can now install the tools from the virtual cd
# in esx click on the vm-guest and then select guest
# followed by install/upgrade VMWare tools
# you will need to mount the tools
mount /dev/cdrom /media/cdrom

# now copy the tools to the temp path of your server
# use tab completion to get the correct tools version
cp /media/cdrom/VMWareTools-.x.x.x-xxxx.tar.gz /tmp

# change into the tmp directory
cd /tmp

# extract the install files
# use tab completion to get the correct tools version
tar -zxf VMWareTools-.x.x.x-xxxx.tar.gz

# change into the extracted directory
# use tab completion to get the correct directory
cd vmware-tools-distrib

# now start the installing by typing the following
./vmware-install.pl

# you will see the following message
:: Installing VMware Tools. ::

# accept the defaults
:: Initializing… ::

 

– Done –