How to changing a forgotten password on ESXi

ESXi 5.x and ESXi 6.x

Reinstalling the ESXi host is the only supported way to reset a password on ESXi. Any other method can lead to a host failure or an unsupported configuration due to the complex ESXi architecture. An ESXi does not have a service console. This locking aims to improve the security of the host ski against security breaches and increase availability.

Very Important at the time of installation of ESXI select the installation preserving the datastore.

ESXi 3.x and 4.x
Note: This section does not apply to ESXi.

To change the password for the root user on an ESX 3.x or ESX 4.x host:

Reboot the ESX host.
When the GRUB screen appears, press the space bar to stop the server from automatically booting into VMware ESX.
Use the arrow keys to select Service Console only (troubleshooting mode).
Press the akey to modify the kernel arguments (boot options).
On the line presented, type a space followed by the word single.
Press Enter. The server continues to boot into single-user mode.
When presented with a bash prompt, such as sh-2.05b#, run the passwd command.
Follow the prompts to set a new root user password..
When the password is changed successfully, reboot the host using the reboot command and allow the ESX host to boot normally.

ESXi Server 2.x
Note: This section does not apply to ESXi.

To change the password for the root user on an ESX 2.x host, you must reboot into single-user mode. To do this, perform these steps:

Reboot the ESX host.
When the LILO screen appears, press the space bar to stop the server from automatically booting into VMware ESX.
At the LILO prompt select linux, adding the -s to the end of the line. For example: linux -s.
Press Enter. The system begins to boot. The server continues to boot into single-user mode.
When presented with a bash prompt, such as sh-2.05b#, run the passwd command..
Follow the prompts to set a new root user password.
When the password is changed successfully, reboot the host using the reboot command and allow the ESX host to boot normally.

When the system has finished booting, you can log in as the root user using the new password.

Additional Information in the VMware Knowledge Base Article.

Continue Reading

How to Install and Configure VMware vSphere Hypervisor 6.0 (ESXi 6.0)

1. Register with VMware.com and Download VMware vSphere Hypervisor 6.0

Open the following link in your web browser https://my.vmware.com/web/vmware/evalcenter?p=free-esxi6

Click the License and Download Tab

VMware60-DownloadCenter1

Click Create an Account, to Create an Account and Login to the VMware Download Center. VMware will email you an Activation link which needs to be opened to create the account.

The following page will be displayed when you have successfully logged into the VMware Download Center.

VMware60-DownloadCenter2

Pay special attention to the FREE License information which is displayed, and record this License Number, this will be required in a later article.

Click the download link for VMware vSphere Hypervisor 6.0 – Binaries ESXi ISO Image to download the software required to install ESXi 6.0 and also download the VMware vSphere Client 6.0. The VMware vSphere Client 6.0 software is the client software that allows us to connect and manage the ESXi 6.0 server, this will be required in a later article.

Either use the Download Manager or Manually Download button (which uses your web browser). The CD ISO is only 301MB so should not take too long to download. We have a very slow internet connection, at approx 350 kB/sec, and it takes us approximately 10 minutes to download.

2. Installing VMware vSphere Hypervisor 6.0 (ESXi 6.0)

Write (Burn) the VMware-VMvisor-Installer-6.0.0-2159203.x86_64.iso downloaded in Step 1, to a blank CDROM, using your favourite CD writing software. We use ISO Recorder (http://alexfeinman.com/isorecorder.htm). If you are using remote server utilities, e.g. HP iLo or Dell iDRAC,. you can attach the virtual CDROM drive in the server to the VMware-VMvisor-Installer-6.0.0-2159203.x86_64.iso ISO, so there is no requirement to write a CDROM.

This is a step which is often missed, ensure the BIOS BOOT order is set to BOOT from the CDROM Device or ATAPI device in the server, otherwise the computer will not BOOT from the CDROM.

Power on the Computer, the computer will BOOT from the CDROM, and the following BOOT screen will be displayed

ESXi6.0-CDROM-BOOT

The default option is to BOOT ESXi-6.0.0-2159203-standard Installer after 10 seconds, hit any key will pause the BOOT process.

ESXi6.0-CDROM-BOOT1

At the Welcome to the VMware ESXi 6.0.0 Installation screen Hit Enter to Continue the installation.

3

Press F11 (Function Key 11) to Accept the VMware End User License Agreement (EULA)

2015-01-03-13-39-16-Greenshot

The ESXi installer will scan the computer storage controller for available devices to install ESXi.

5

ESXi can be installed on a USB flash drive, SD card attached to the computer, local SATA, local RAID Array, or Fibre Channel or iSCSI LUN. All these are supported options. As the footprint for ESXi is very small only 1GB is required for the ESXi OS installation.

We have written an EE Article here on How to Backup an ESXi installation on an USB Flash Drive or SD card, for security or redundancy. After you have completed the ESXi 5.1 installation, shutdown the server, remove the USB flash drive or SD card, and duplicate it using our EE Article.

When prompted select a disk to install ESXi on, in the following example, we have two disks connected to this computer, a single 1GB disk, and a 120GB disk. We are going to use the small disk for the OS. (this simulates the USB flash drive!). The larger 120GB disk will be used later for the storage of virtual machines.

6

When prompted, select the keyboard layout and hit Enter to continue. The default keyboard layout is US Default.

7

When prompted enter a root password, confirm the password and hit Enter to continue

8

The following will be displayed

9

When prompted Confirm the Installation on the selected disk and press F11 (Install)
– Function Key 11
All data will be erase, as the disk will be repartitioned.

11

The Progress Bar will confirm installation progress.

22

33

The installation only takes approximately 5-10 minutes, depending upon speed of storage. When the installation has completed the following screen will be displayed.

44

Remove the CDROM installation disk before rebooting. Hit Enter to Reboot. After hitting Enter the follow screen will be displayed and the computer will reboot.

55

ESXi 6.0 will operate in evaluation mode for 60 days. This is the same mode as a FULLY LICENSED ESXi 6.0 server. If you wish to evaluate all the bells and whistles that ESXi 6.0 has to offer, do not register your FREE license. for 60 days, this will allow you to evaluate ESXi 6.0 server fully. On day 59/60, Apply your FREE license to continue using the product, or you will not be able to power on any virtual machines.

3. Configuring VMware vSphere Hypervisor 6.0 (ESXi 6.0)
The following screen is displayed when VMware ESXi 6.0 first boots1

2

3

The server is fully booted when it displays the following screen

4

The default server configuration is to use DHCP, if you do not have a DHCP server issuing IP Addresses on your network you will need to assign an IP Address. We recommend you use a static IP Address for your ESXi Host Server.

Press F2 to Customize System, you will be prompted to enter the root username and password.

5

Select Configure Management Network to change Network Parameters.
Select IPv4 Configuration

6

Set the Static IPv4 address and network configuration, Subnet Mask and Default Gateway, it’s important to set the correct Default Gateway, as this will be used later. Hit Enter to confirm and save the configuration.

7

Select DNS Configuration, enter the correct DNS information for your network, and enter a hostname for your server. Hit Enter to save the configuration.

8

Select Custom DNS Suffixes
Enter your DNS suffix (the domain name for your network). Make sure you have created a DNS A Record in your DNS, so that this server can be resolved correctly through forward and reverse lookups.

Hit Enter to save your configuration.

Press Escape, the following screen will appear, select Y(es) to apply changes.

9

Press Escape to Logout and return to the console screen.

You will notice on the console screen, the server now has a hostname configured, and correct static IP Address.

10

Congratulations you have successfully installed and configured VMware vSphere Hypervisor 6.0.

In the next article in the series, we will connect and continue to configure the VMware vSphere Hypervisor 6.0.

Continue Reading

Installing VMware Tools in a Linux virtual machine on Centos 7 and Red Hat 7

To install VMware Tools in a Linux guest operating system using Compiler:

1-Ensure that your Linux virtual machine is powered on.

2- If you are running a GUI interface, open a command shell.

Note: Log in as a root user, or use the sudo command to complete each of these steps.

3-Click VM in the virtual machine menu, then click Guest > Install/Upgrade VMware Tool

4-Click OK.

Note: In some cases, verify that the CDROM device is Connected from within the Edit Settings option of the virtual machine.

5-  To create a mount point, run:

mkdir /mnt/cdrom

6- To mount the CDROM, run:

mount /dev/cdrom /mnt/cdrom

7- To copy the Compiler gzip tar file to a temporary local directory, run:

cp /mnt/cdrom/VMwareTools-version.tar.gz /tmp/

Where version is the VMware Tools package version.

8-  To determine the version of VMware tools, run:

ls /mnt/cdrom

You see output similar to:

# VMwareTools-5.0.0-12124.tar.gz

9- To change to the tmp directory and extract the contents of the tar file into a new directory called vmware-tools-distrib, run:

cd /tmp
tar -zxvf VMwareTools-version.tar.gz

10- To change directory to vmware-tools-distrib and run the vmware-install.pl PERL script to install VMware Tools, run:

cd vmware-tools-distrib
./vmware-install.pl

Notes:
Complete the screen prompts to install the VMware Tools. Options in square brackets are default choices and can be selected by pressing Enter.
To compile VMware Tools successfully, you need gcc Compiler and Linux Kernel sources provided by your Linux distribution. Consult your Linux distribution documentation for details on methods to install these packages.
It is normal for the console screen to go blank for a short time during the installation when the display size changes.
Some warnings or errors are normal, like when a files does not exist.
Depending on the Linux distribution, your network service might restart after installation. VMware recommends that you invoke this command from the console and not remotely.

11- If you are running a GUI interface, restart your X Window session for any mouse or graphics changes to take effect.

12-  To start VMware Tools running in the background during an X Window session, run:

/usr/bin/vmware-toolbox &

13- Depending on your environment, you may need to unmount the CD-ROM. To unmount the CD-ROM, run:

umount /mnt/cdrom

14- Depending on your environment, you may need to manually end the VMware Tools installation. To end the VMware Tools install, click VM in the virtual machine menu, then click Guest > End VMware Tools Install.

15-To remove VMware Tools installation packages, run:

cd
rm /tmp/VMwareTools-version.tar.gz
rm -rf /tmp/vmware-tools-distrib

That is all

Continue Reading

How to set a static MAC address on VMware ESXi virtual machine

Question: I want to assign a static MAC address to a virtual machine (VM) on VMware ESXi. However, when I attempt to start a VM with a static MAC address, the VM fails to start and throws an error “The MAC Address entered is not in the valid range. Valid values are between “xx:xx:xx:xx:xx:xx” and “xx:xx:xx:xx:xx”.

When you create a VM on VMware ESXi, each network interface of the VM is assigned a dynamically generated MAC address. If you want to change this default behavior and assign a static MAC address to your VM, here is how to do it.

14726591627_338dc582dd_o

As you can see above, VMware’s vSphere GUI client already has a menu for setting a static MAC address for a VM. However, this GUI-based method only allows you to choose a static MAC address from 00:50:56:xx:xx:xx, which is VMware-reserved MAC address range. If you attempt to set any arbitrary MAC address outside this MAC range, you will fail to launch the VM, and get the following error.

3463018452_f3526cffda

Fortunately, there is a workaround to this limitation. The solution is, instead of using vSphere GUI client, editing .vmx file of your VM directly, after logging in to the ESXi host.

First, turn off the VM to which you want to assign a static MAC address.

Enable SSH access to your ESXi host if you haven’t done it already. Then log in to the ESXi host via SSH.

Move to the directory where your VM’s .vmx file is located:

# cd vmfs/volumes/datastore1/[name-of-vm]

Open .vmx file with a text editor, and add the following fields. Replace the MAC address field with your own.

#ethernet0.addressType = "static"
#ethernet0.checkMACAddress = "false"
#ethernet0.address = "00:0c:29:1f:4b:ac"

Now you should be able to launch a VM with the static MAC address you defined in .vmx file.

Continue Reading