This URL is the public root folder for all versions of VMware tools for each OS that is supported by that version. Bookmark it. This is very handy when you don’t have the media, access to ESXi, ability to mount an ISO, or whatever problem you may have.
This post demonstrates how to add your server vendor’s (in this case HP) VMware VIBs to VMware vSphere Update Manager. This allows you to apply drivers, patches and updates specific to your server platform directly to ESXi. You use the same workflow as you would a VMware patch: scan for updates and remediate host. Its that simple.
Many server vendors release OEM Customized Installers for ESXi5. Its a good idea to use them because they include the necessary drivers and integration for ESXi. Ever wonder why you don’t have good detection of hardware on the Host’s Hardware Status tab (View: Sensors)? Use the OEM version of ESXi and you will. For this post I use ESXi5.1 on HP DL360G5 servers.
For reference, using the URL below, you go to the VMware ESXi download site, select your ESXi version, click the Custom ISO tab and then click >OEM Installer CDs to expand the category. Select your vendor and that’s the ISO you should use when you install or upgrade ESXi.
a) Note: as of the date of this post, Sept 2013 is the latest VIB update for ESXi 5.1. Using the root URL above (http://vibsdepot.hp.com/hpq/) you simply select the latest date in the directory for the version of ESXi you are running. That way you only download what you need.
4) Back on the Download Settings page, click Apply. This creates the Download source.
5) Click the Download Now button to start the download. Click OK on the Download Task pop-up window.
6) Select the Events tab. This is where you can see how many patches were downloaded.
7) On the patch repository page, sort by vendor and you can see the patches that were downloaded. Note that the patches are automatically added to the Critical and Non-Critical Host Patches baselines. Make sure they are attached to your Datacenter or Hosts.
8) Right-click your Cluster and select Scan for Updates. Select Patches and Extensions as well as Upgrades and click Scan to scan your hosts.
9) Since this process will update drivers and possibly the ESXi kernel (security and bug fixes), its a good idea to patch one host to verify stability. Place a Host into maintenance mode (right-click Host > Enter Maintenance Mode). When done right-click the host and select Remediate. Select Critical and Non Critical Baselines (on the right) and then complete the Wizard based on your shop’s patching practices.
10) After the host reboots and comes online in vCenter, make sure it’s functional. Verify vMotion, VMkernel Ports, Datastores, etc., check the Host’s Hardware Status tab and see if you notice that additional hardware sensors are now available. If everything is good, continue to remediate your Hosts.
As a side note, if you are in a secure location that does not allow internet access, you could download the patches and index file, stage them with HFS and and download them into Update Manager. For reference, see my HFS post for NetApp’s ONTAP upgrade here.
Sometimes you have to boot your VMs from the command line. This can happen when you have a power failure, or possibly as part of detailed start-up/shutdown procedures. No matter the reason getting familiar with, and documenting this option is a good best practice. In fact, creating a few dummy VMs to learn this process is even better.
Perform the following at either the ESXi console or via SSH Putty/xterm session.
1) To power on a VM from the command line, find the inventory ID of the VM. The first column is the VMID.
> vim-cmd vmsvc/getallvms |grep <name of your vm>
Or, if you just want to list them all, use getallvms.
> vim-cmd vmsvc/getallvms
2) Check the power state of the virtual machine you need to boot. In this case, I need to boot the Domain Controller first so I choose the Vmid 8 from the list above
> vim-cmd vmsvc/power.getstate 8
Retrieved runtime info
Powered off
3) Now that you have the Vmid and know the current state, boot the VM.
> vim-cmd vmsvc/power.on 8
Powering on VM
4) Check the process. Note that this command will only list your started and running VMs.
> esxcli vm process list
labdc01
World ID: 52680
Process ID: 0
VMX Cartel ID: 52669
UUID: 42 27 d6 f3 45 20 22 52-cb d2 b7 e1 c4 13 1a f4
Display Name: labdc01
Config File: /vmfs/volumes/9faff676-f7876623/labdc01/labdc01.vmx
4) Verify that the VM is up. Also verify on the VM Console or if Windows, RDP into the VM. Note that if your vCenter is not up, use the vSphere Client to login directly to the ESXi Host to check the VM console.
> vim-cmd vmsvc/power.getstate 8
Retrieved runtime info
Powered on
For reference, if you need to power off, reset or reboot a VM from the command line:
1) Get the Vmid from the output of getallvms.
> vim-cmd vmsvc/getallvms
2) Using the Vmid of the above command for the VM you want to control, choose the command below based on the action you want to take (reboot, shutdown or reset).
> vim-cmd vmsvc/power.reboot <vmid>
> vim-cmd vmsvc/power.reset <vmid>
> vim-cmd vmsvc/power.shutdown <vmid>
A new VMware Fling was release a few weeks ago and I missed it. You can now install VMware tools in your nested ESXi Hosts. It works with nested ESXi running 5.0, 5.1 or 5.5. I’m running 5.1u1 (1312873) with nested 5.1u1 for this post and it works great. I suppose this works with VMWare Workstation 10 but I haven’t tried it.
1) Login to the ESXi console and enable SSH or the ESXi Shell.
a) In vCenter, open a console on the nested ESXi VM.
b) Press F2 and login as root.
c) Scroll down to Troubleshooting Options and press Enter.
d) Select either Enable SSH (prefered) or Enable ESXi Shell and press Enter to enable.
e) If SSH, launch Putty or an Xterm and login as root. If ESXi Shell, press ALT+F1 and login as root at the console. Press ALT+F2 to get back to the ESXi DCUI.
2) Whether you logged into the Host with SSH or at the console, place the ESXi Host in maintenance mode.
> esxcli system maintenanceMode set -e true
Now, verify Maintenence Mode is enabled.
> esxcli system maintenanceMode get
Enabled
3) Launch vSphere Client and connect directly to the nested ESXi host as root.
a) On the Configuration tab , select Storage. Right-click the local datastore and select Browse datastore.
b) Click the Upload A File icon and select the esx-tools-for-esxi-9.7.0-0.0.00000.i386.vib file and click Open.
c) When done, close out of the vSphere client session.
4) Back in the ESXi Host, change to the volume (datastore) where you placed the VIB.
> cd /vmfs/volumes/<your local datastore name>
> ls -l esx-tools* (to verify that the file is there)
> esxcli software vib install -v /vmfs/volumes/<your local datastore name>/esx-tools-for-esxi-9.7.0-0.0.00000.i386.vib -f
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: VMware_bootbank_esx-tools-for-esxi_9.7.0-0.0.00000
VIBs Removed:
VIBs Skipped:
5) Reboot the Host and set the reason for the reboot action.
> esxcli system shutdown reboot -r “Hey, I just installed VMware Tools on nested ESXi”
6) In vCenter (Web or vSphere client), check the Summary page for the nested ESXi Host. Is should now show VMware tools installed and current. Reference images are shown below.
a) Before VMware tools (showing both Web and vSphere Client images):
b) And after VMware tools (showing both Web and vSphere Client images):
Need to add a disk to an ESXi 5x server and format as VMFS? Here is how you do it from the ESXi CLI. Enable ssh on the ESXi host in vCenter and login as root via xterm or putty. This was done on an HP DL360.
1) Find your disks.
> ls /vmfs/devices/disks/
-or
> esxcfg-scsidevs -c
The new disk is: mpx.vmhba1:C0:T1:L0
2) Create a partition.
> fdisk /vmfs/devices/disks/mpx.vmhba1:C0:T1:L0
Select: m
Select: l
Command (m for help): n
Command action
e extended
p primary partition (1-4)
Select: p
Partition number (1-4): 1
First cylinder (1-8920, default 1): Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-8920, default 8920): Using default value 8920
Command (m for help): p
Disk /vmfs/devices/disks/mpx.vmhba1:C0:T1:L0: 73.3 GB, 73372631040 bytes
255 heads, 63 sectors/track, 8920 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/vmfs/devices/disks/mpx.vmhba1:C0:T1:L0p1 1 8920 71649868+ 83 Linux
Command (m for help): w
The partition table has been altered!
Command (m for help): t
Selected partition 1
Hex code (type L to list codes): l
0 Empty 1c Hidden W95 FAT32 (LBA) a5 FreeBSD
1 FAT12 1e Hidden W95 FAT16 (LBA) a6 OpenBSD
4 FAT16 <32M 3c Part.Magic recovery a8 Darwin UFS
5 Extended 41 PPC PReP Boot a9 NetBSD
6 FAT16 42 SFS ab Darwin boot
7 HPFS/NTFS 63 GNU HURD or SysV b7 BSDI fs
a OS/2 Boot Manager 80 Old Minix b8 BSDI swap
b Win95 FAT32 81 Minix / old Linux be Solaris boot
c Win95 FAT32 (LBA) 82 Linux swap eb BeOS fs
e Win95 FAT16 (LBA) 83 Linux ee EFI GPT
f Win95 Ext’d (LBA) 84 OS/2 hidden C: drive ef EFI (FAT-12/16/32)
11 Hidden FAT12 85 Linux extended f0 Linux/PA-RISC boot
12 Compaq diagnostics 86 NTFS volume set f2 DOS secondary
14 Hidden FAT16 <32M 87 NTFS volume set fd Linux raid autodetect
16 Hidden FAT16 8e Linux LVM fb VMFS
17 Hidden HPFS/NTFS 9f BSD/OS fc VMKcore
1b Hidden Win95 FAT32 a0 Thinkpad hibernation
Hex code (type L to list codes): fb
Changed system type of partition 1 to fb (VMFS)
Command (m for help): w
The partition table has been altered!
VMFS5 file system creation is deprecated on a BIOS/MBR partition on device ‘mpx.vmhba1:C0:T1:L0:1’
Checking if remote hosts are using this device as a valid file system. This may take a few seconds…
Creating vmfs5 file system on “mpx.vmhba1:C0:T1:L0:1” with blockSize 1048576 and volume label “Datastore name”.
Successfully created new volume: 512bee4b-d5bd5128-568e-0015174b0172