VMware ESXi

From Leo's Notes
Revision as of 06:40, 18 June 2017 by Leo (talk | contribs) (→Keys)
This page was last edited on 18 June 2017, at 06:40.

Keys

The hypervisor keys are available for free. To obtain one:

The license key 'VMware vSphere Hypervisor 6 License' works on all 6.x hypervisors.

Installation

The easiest way is to just burn the iso image and install via CD/DVD.

But if your server doesn't have a CD/DVD reader, you can try getting a USB stick.

USB Stick

## Set up the USB drive
root@nas:/mnt/iso# fdisk /dev/sdk

Welcome to fdisk (util-linux 2.28.2).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.

Command (m for help): o
Created a new DOS disklabel with disk identifier 0xde56333a.

Command (m for help): p
Disk /dev/sdk: 14.7 GiB, 15720251392 bytes, 30703616 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xde56333a

Command (m for help): n
Partition type
   p   primary (0 primary, 0 extended, 4 free)
   e   extended (container for logical partitions)
Select (default p): p
Partition number (1-4, default 1):
First sector (2048-30703615, default 2048):
Last sector, +sectors or +size{K,M,G,T,P} (2048-30703615, default 30703615):

Created a new partition 1 of type 'Linux' and of size 14.7 GiB.

Command (m for help): t
Selected partition 1
Partition type (type L to list all types): c
Changed type of partition 'Linux' to 'W95 FAT32 (LBA)'.

Command (m for help): a
Selected partition 1
The bootable flag on partition 1 is enabled now.

Command (m for help): p
Disk /dev/sdk: 14.7 GiB, 15720251392 bytes, 30703616 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xde56333a

Device     Boot Start      End  Sectors  Size Id Type
/dev/sdk1  *     2048 30703615 30701568 14.7G  c W95 FAT32 (LBA)

Command (m for help): wq
The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.

## Format the drive
root@nas:/mnt/iso# mkfs.vfat -F 32 -n USB /dev/sdk1
mkfs.fat 4.1 (2017-01-24)

## Use the syslinux utility (from syslinux-nonlinux-6.04-0.1.fc25.noarch)
root@nas:/mnt/iso# syslinux /dev/sdk1
root@nas:/usr# cat /usr/share/syslinux/mbr.bin > /dev/sdk

## Copy the files
root@nas:/mnt# mount /dev/sdk1 usb
root@nas:/mnt# cp -r iso/* usb

## Edit the syslinux.cfg file
root@nas:/mnt/usb# mv isolinux.cfg syslinux.cfg

## Edit syslinux.cfg so that the APPEND line is 'APPEND -c boot.cfg -p 1'
root@nas:/mnt/usb# cat syslinux.cfg
DEFAULT menu.c32
MENU TITLE ESXi-6.5.0-20170104001-standard Boot Menu
NOHALT 1
PROMPT 0
TIMEOUT 80
LABEL install
  KERNEL mboot.c32
  APPEND -c boot.cfg -p 1
  MENU LABEL ESXi-6.5.0-20170104001-standard ^Installer
LABEL hddboot
  LOCALBOOT 0x80
  MENU LABEL ^Boot from local disk

## Unmount the image

Updating

6.0 to 6.5

Download the offline depot package and apply the update:

# esxcli software profile update -p ESXi-6.5.0-4564106-standard -d /vmfs/volumes/vol/VMware-ESXi-6.5.0-4564106-depot.zip

This package requires a subscription. If you're using the free license, either get the evaluation or install the update by booting with the ISO image.

5.5 to 6.0

To update a ESXi install from 5.5 to 6.0, download the ESXi 6.0 offline bundle and upload it to a datastore on the server.

Log in via SSH and execute

# esxcli software vib update -d /vmfs/volumes/datastore1/ESXi600-201504001.zip

Then reboot to apply the changes.

See Also:

Troubleshooting

IOMMU Hangs

If your ESXi server hangs while "Initializing IOV", disable IOMMU by appending 'noIOMMU' to the kernel immediately after the new kernel boots by hitting Shift-O (letter O, not zero)

To make the changes persistent, add it to the boot arguments in /bootbank/boot.cfg

See Also: