Guest customization runs on every boot

In our vSphere 5.1 update 2 environment we found that some of our Windows virtual machines were running guest customization every time they boot. This was causing them to loose their static IP address and take an additional 5 minutes to boot.

vmware-image-customization

To fix this issue, boot to Windows and open regedit. Navigate to to the following location:

HKLM\System\CurrentControlSet\Control\Session Manager\

Regedit Key

Edit the BootExecute key and remove all sysprepDecrypter.exe lines. We had some VMs with up to 10 entries!

Regedit - edit key

Your key should now look like this:

Regedit - correct key

Click OK. Now the VM will not perform the guest customization on every boot.

To prevent future VMs you deploy from gaining this issue update your vSphere environment to at least 5.1 Update 5.

Authorize Exception Error when logging into vCenter

If you get the following error when logging into vCenter(5.1U5): “A general system error occurred: Authorize Exception”

vCenter - Authorize Exception error

 

Restarting the Single Sign On service on your vCenter should resolve the issue. In my case the cause of this was due to the LDAP connection pool being exhausted. To confirm this check the ssoAdminServer.log found here:

C:\Program Files\VMware\Infrastructure\SSOServer\log

Do a search for the following error: No ManagedConnections available within configured blocking timeout

If you find that around the time when you was logging in then your LDAP connection pool was exhausted. This issue is resolved in vSphere 5.5.

The VMware KB article for this issue 2055448:

http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2055448

 

The VMRC console has disconnected…attempting to reconnect

This morning I received an error I haven’t seen before when trying to open the console of a VM in our ESXi 5.5 environment….  “The VMRC console has disconnected…attempting to reconnect.

VMRC Console Disconnected Error

There are two ways to fix this. The easy way is to reboot your computer 🙂 If you would want to avoid a reboot you can do the following:

Close out all of your VMware vSphere Clients and open Task Manager. You will want to make sure all processes named “vmware-vmrc.exe“, “vmware-remotemks.exe“, and “vpxclient.exe” are not running. If they are go ahead and end all those processes.

Task-Manager-vmware-vmrc Task-Manager-vpxclient

Now open up the vSphere Client, console should now work:

Yay its fixed

 

Comment below and let me know what worked for you!

 

Multi-NIC vMotion

In vSphere 5 a new feature was added that many people may be overlooking. It is called Multi-NIC vMotion. If you have a environment where you have 2 or more dedicated uplinks reserved for vMotion you can double the total bandwidth available by using this option. Do I have your attention? 🙂

Normally you would have 1 port group with both of your vMotion uplinks set to active like this:

A Normal vMotion Port Group

What if I told you when you are vMotioning a VM, the VMkernal is picking one of those uplinks and basicly ignoring the other? According to the VMware KB article 2010877, “The VMkernel TCP/IP stack uses a single routing table to route traffic. If you have multiple VMkernel network interfaces (vmknics) that belong to the same IP subnet, the VMkernel TCP/IP stack picks one of the interfaces for all outgoing traffic on that subnet as dictated by the routing table.” If you want to use both uplinks for vMotion traffic and double your total bandwidth you have to create two vMotion VMkernals and assign each one a uplink. There was some issues with multi-NIC vMotions if you were running ESXi version before 5.0U2. As always try this out in your test enviroments first 🙂

Here is VMware KB2007467 walking you through these steps that compliment my steps below.

First we will create a new port group and rename the current vMotion port group to show them apart. In my case I will name one “vMotion-uplink3” and the other “vMotion-uplink4”.

New vMotion PortGroups

Now right click a port group, go to Edit Settings, then click on Teaming and Failover. You will take one of the uplinks and move it to standby so you do not loose redundancy. Do the same thing for the second vMotion port group but flip the uplinks. See screen shots below:

vMotion-uplink3
vMotion-uplink3
vMotion-uplink4
vMotion-uplink4

Now the port groups are set for the next step.

Go to Hosts and Clusters, click on a host, click on Configuration tab -> Networking -> vDS -> and Manage Virtual Adapters.

I have only 1 vMotion VMkernal configured using vMotion-uplink3. I want to add another VMkernal set for vMotion that will use vMotion-uplink4. Click Add:

Manage Virtual Adapters

Chose New virtual adapter and click Next:

Add Virtual Adapter

Click Next:

Virtual Adapter Type

Select the new vMotion port group and check the vMotion checkbox. Click Next:

Connection Settings

Give this new vMotion kernal a new, unused IP address, click Next:

Virtual Adapter IP

Now click Finish:

Virtual Adapter Finish

That is it. You have have multi-NIC vMotion configured. You will have to do this for each host that you want to enable this on. Put a host in maintenance mode and see if you get a increase in speed. You can also turn on jumbo frames if your switch supports it for a further speed increase! In our test environment that has two 1 GB vMotion uplinks, it reduced the time it took for a host to enter maintence mode from 40 minutes down to low/mid 20’s. Please leave a comment and let me know your results!!

Installing VMware ESXi and vCenter 5.5 [Part 1]

Installing VMware vSphere 5.5 Series:

In this series I will be installing ESXi and vCenter using Microsoft Server 2012 R2 virtual machines.

Part 1: Introduction and ESXi Installation
Part 2: Microsoft SQL 2012 Installation
Part 3Creating the vCenter Database & ODBC Setup
Part 4: vCenter 5.5 Installation
Part 5: Initial Setup (Accessing vCenter, Configure Basic Permissions, Add Host)ESXi Hypervisor
Downloading ESXi: If you will be running ESXi from a physical server you will want to use the ESXi image provider by the hardware manufacture such as Dell, HP, Cisco. Their ESXi image has the drivers and software specific for the hardware. If you will be running ESXi in a nested environment, then the ESXi image from VMware is what you want. Here are the download links for each manufacturer:
HP: http://h18004.www1.hp.com/products/servers/software/vmware/esxi-image.html
Dell: http://www.dell.com/support/home/us/en/19/Drivers/DriversDetails?driverid=5YC4T
Cisco: http://www.cisco.com/c/en/us/td/docs/unified_computing/ucs/release/notes/OL_26617.html
VMware: http://www.vmware.com/go/download-vspherehypervisor

ESXi Installation: First boot your server from the ESXi ISO. Depending on your hardware you should mount the ISO using iLo/iDRAC/etc. Another nice way is to boot it from a USB thumb drive. You can make your USB bootable by using this tool: http://rufus.akeo.ie/ . Of course you can do it the old fashion way and burn the ISO to a disc. The first screen that pops up should look like this. It has a timer that will count down and automatically take you into the installer unless you hit a button on your keyboard.

Installing VMware ESXi and vCenter 5.5

ESXi Installer Load Screen:

2 ESXi Installer Load Screen

Welcome to the ESXi 5.5 Installation. Hit Enter:

3 ESXi Welcome

Accept the license agreement and hit F11:

4 ESXi License Agreement

Here you select where you want to install ESXi. You will have already configured your hard drives with a RAID if applicable (if not go do that and start over). The installation of ESXi is very small, you could use a thumb drive and install to it. Once you select your install location hit Enter:

5 ESXi Disk Selection

Pick your keyboard layout and hit Enter:

6 Keyboard Layout

Enter a password for the root account. Hit Enter:

7 Set Root Password

ESXi is ready to begin the installation. Hit F11:

8 Confirm Install

ESXi Install Progress Screen:

9 Install Progress Screen

Installation is complete. Hit Enter to reboot:

10 ESXi Installation Complete

11 Rebooting Server

Here is what the ESXi screen looks like after booting. Lets do some basic configuration such as setting a static IP, naming this host and ensuring the correct uplinks are selected. Hit F2 to bring up the login menu:

12 First Boot

Enter the password that was set during the install, hit Enter:

13 ESXi Login

Scroll down to Configure Management Network, hit Enter:

14 Configure Management Network

Go to Network Adapters and hit Enter:

Network Adapters Selection

This is where you can select what uplinks the management network has. This screen might be different depending on your environment. Hit space bar on the vmnics that you want to use, when finished hit Enter:

15 Network Adapter

Now scroll down to IP Configuration, hit Enter:

17 IP Configuration

In my lab I want to set a static IP address, once finished hit Enter:

18 Default Gateway

If you are not using IPv6, go to IPv6 Configuration and disable it:

19 IPv6

Now go to DNS Configuration and hit Enter:

20 DNS Configuration

Set your DNS information and host name, hit Enter:

21 DNS Configuration Entry

Now hit ESC to exit, you will be prompted to reboot thehost for the changed to take affect. Hit Y to reboot:

22 Reboot Host

Now your ESXi host is ready for use:

23 Ready for Use

Continue to Part 2: https://www.virtuallyboring.com/installing-vmware-esxi-and-vcenter-5-5-part-2/

Installing VMware ESXi and vCenter 5.5 [Part 2]

Installing VMware vSphere 5.5 Series:
Part 1: Introduction and ESXi Installation
Part 2: Microsoft SQL 2012 Installation
Part 3Creating the vCenter Database & ODBC Setup
Part 4: vCenter 5.5 Installation
Part 5: Initial Setup (Accessing vCenter, Configure Basic Permissions, Add Host)

I am installing Microsoft SQL 2012 on a Microsoft Server 2012 R2 virtual machine. In this walk through I am installing SQL and vCenter on separate virtual machines.

Microsoft SQL 2012 Installation:

1. Go to the Installation tab and click on the New SQL Server stand-alone installation:

SQL Install

2. Setup Support Rules – It will run a quick preinstall scan. Click Next:

Setup Support Rules

3. Product Key – You can proceed with an 180 day Evaluation, Express or enter your product key, click Next with your selection:
Product Key

4. License Terms – Check the box to accept the license terms, check the box if you want to send usage data to Microsoft (who wouldn’t? 🙂 ) now click Next:
4 License Terms

5. Product Updates – Go ahead and install the updates, click Next:
5 Product Updates

6. Setup Support Rules – It will run another test, click Next:
6 Setup Support Rules

7. Setup Role – Ensure SQL Server Feature Installation is selected, click Next:

7 Setup Role

8. Feature Selection – Check the following options:
     a. Database Engine Services
     b. Client Tools Connectivity
     c. Integration Services
     d. Management Tools – Basic
     e. Management Tools – Complete

Also on this screen you can change the install directory to a different drive. In this case I am installing it in my lab so I am leaving it to default. Click Next:
8 Feature Selection

9. Installation Rules – It will run another check, if everything looks good click Next:
9 Installation Rules

10. Instance Configuration – Here you can change the instance ID and instance root directory. Again in this instance I am leaving default. Click Next:
10 Instance Configuration

11. Disk Space Requirements – This is checking to ensure you have enough disk space. Click Next:
11 Disk Space Requirements

12. Server Configuration – Change the Account Name to the service account you created. Also change the Startup Type to Automatic. Click Next:
12 Server Configuration

13. Database Engine Configuration – Here you can set the authentication mode. Lock it down to suit your environment. Since this is my lab I am going to use Mixed Mode and add the service account and domain admins to make administration simplistic. Click Next:
13 Database Engine Configuration

14. Error Reporting – If you want to send error report to Microsoft check the box. Click Next:
14 Error Reporting

15. Installation Configuration Rules – It will run another test to ensure everything will go smoothly, click Next:
15 Installation Configuration Rules

16. Ready to Install – Here is a summary of the install, click Install to let the installation commence!
16 Ready to Install

17. Installation Progress – Grab some coffee, this will take around about 20 minutes on average:
17 Installation Progress

18. Complete – SQL 2012 is now installed! Now we are ready to setup the vCenter database in Part 3.
18 Complete

Continue to Part 3:
https://www.virtuallyboring.com/installing-vmware-esxi-and-vcenter-5-5-part-3/

Installing VMware ESXi and vCenter 5.5 [Part 3]

Installing VMware vSphere 5.5 Series:
Part 1: Introduction and ESXi Installation
Part 2: Microsoft SQL 2012 Installation
Part 3Creating the vCenter Database & ODBC Setup
Part 4: vCenter 5.5 Installation
Part 5: Initial Setup (Accessing vCenter, Configure Basic Permissions, Add Host)

Now that we have SQL installed its time to setup the vCenter database and ODBC connections.

Creating the vCenter Database

If you are experienced in SQL you can set the database up manually or use the provided schema SQL script from VMware vCenter installation media. In this install i’ll be using the VMware provided DB schema. This can be obtained in the \\vCenter Installation Media\vCenter-Server\dbschema\DB_and_schema_creation_scripts_MSSQL.txt  To make it easier below is a copy/paste of the script. You will have to change the database name, username, password and database location to match your setup.

use [master]
go
CREATE DATABASE [VCDB] ON PRIMARY
(NAME = N'vcdb', FILENAME = N'C:\VCDB.mdf' , SIZE = 3000KB , FILEGROWTH = 10% )
LOG ON
(NAME = N'vcdb_log', FILENAME = N'C:\VCDB.ldf' , SIZE = 1000KB , FILEGROWTH = 10%)
COLLATE SQL_Latin1_General_CP1_CI_AS
go
use VCDB
go
sp_addlogin @loginame=[vpxuser], @passwd=N'vpxuser', @defdb='VCDB', @deflanguage='us_english'
go
ALTER LOGIN [vpxuser] WITH CHECK_POLICY = OFF
go
CREATE USER [vpxuser] for LOGIN [vpxuser]
go
CREATE SCHEMA [VMW]
go
ALTER USER [vpxuser] WITH DEFAULT_SCHEMA =[VMW]
go

Open SQL Server Management Studio and login using an account that has access:

1 SQL Connect to Server

Now click on “New Query” and enter the database script from above. You will need to change the following:

  • Add the location of your SQL data directory. I used defaulted install so below is my path./
  • Change the initial size of the MDF to 4096KB, if you leave it at the default 3000KB you will get an error when you execute.
  • This script will create a user and give it  DBO permissions, rename the vpxuser with your own username. Make sure it matches all the way through the script.

Click Execute. You should receive a message saying “Command(s) completed successfully. You will now have a VCDB DB under Databases.

2 SQL Execute

Next right click on your VCDB database and go to Properties:

3 DB Properties

Go to the Options page and change the Recovery model to Simple. Click Ok:

4 Recovery Mode

Before we leave SQL Management Studio as a best practice right click your SQL server name and go to Properties:

5 SQL Properties

On the Memory page we will want to limit the amount of memory SQL can use. I am running this in my home lab on a VM with 4 GB of RAM. I will give SQL 2 GB which leaves 2 GB for the OS. Click Ok:

6 SQL Memory Settings

Skip this part if vCenter and SQL are running on the same box: You will need to modify the TCP/IP settings for SQL. Open the SQL Server Configuration Manager, go to SQL Server Network Configuration, then Protocols for MSSQLSERVER. Right click on TCP/IP and click Properties. Make sure to change Enabled to Yes and TCP Dynamic Ports to 0 (zero). Click OK:

7 SQL TCPIP Properties

It is a good time to reboot your SQL server for the settings to take effect.

ODBC Setup:

Next parts are to be done on your vCenter server. Now we get to setup the ODBC connection for vCenter to use.

Go to Start -> Administrative Tools -> and open ODBC Data Sources (64 Bit):

8 ODBC 64bit

Click on the System DSN tab and click Add:

9 ODBC Administrator

Click on SQL Server Native Client 11.0 and click Finish. Note: You will not have this option if SQL was installed on a separate server. To install it proceed to the next step:

10 ODBC SQL Server Native Client

Skip this if you had the SQL Server Native Client as an option: The easiest way to install this is by downloading it from the Microsoft website. Under “Install Instructions” find the section that is shown in the screenshot below. Download and install the x64 version. It’s a straight forward install. Now perform the step above.

http://www.microsoft.com/en-us/download/details.aspx?id=29065&fa43d42b-25b5-4a42-fe9b-1634f450f5ee=True

11 ODBC SQL Native Client MS Download

Direct Link to X64 Package: http://go.microsoft.com/fwlink/?LinkID=239648&clcid=0x409

 

Now you will want to name this connection, give it a description and enter your SQL server name. If you are going to run vCenter and SQL on the same server use localhost. Otherwise use the FQDN. Click Next:

12 ODBC SQL Server Data Entry

Enter the username and password you created during the database setup, click Next:

13 ODBC SQL Creds

Change the default database to your created vCenter DB. Click Next:

14 ODBC Default DB

Change your language to your preference. Now click Finish:

15 ODBC SQL Language

Click on Test Data Source. You should get test completed successfully. Click Ok:

16 ODBC Test Data Source 17 ODBC Data Source Test Results

You now have your ODBC connection setup for vCenter:

18 ODBC Completed

Now it is time to install vCenter!

Continue to Part 4:
https://www.virtuallyboring.com/installing-vmware-esxi-and-vcenter-5-5-part-4/

Installing VMware ESXi and vCenter 5.5 [Part 4]

Installing VMware vSphere 5.5 Series:
Part 1: Introduction and ESXi Installation
Part 2: Microsoft SQL 2012 Installation
Part 3Creating the vCenter Database & ODBC Setup
Part 4: vCenter 5.5 Installation
Part 5: Initial Setup (Accessing vCenter, Configure Basic Permissions, Add Host)

Now we are ready to start installing vCenter!

VMware vCenter 5.5 Installation:

A simple install will install all components on the same box. On our install we will have everything running on the same box however we will run through each component manually just to see the full install process.

1 Simple Install Overview

There is a specific order in which vCenter needs to be installed. The order is as follows:

  • Single Sign-On
  • Web Client
  • Inventory Service
  • vCenter Server

First we will start out with Single Sign-On (SSO), click Install:

2 SSO Overview

Click Next:

3 SSO Setup

Accept the terms and click Next:

4 SSO License Agreement

This will perform a check, if the server is on a domain check the box, click Next:

5 SSO Check

Since this is our first vCenter installation, use the first option and click Next:

6 SSO Deployment Mode

Enter a password for the SSO admin account. Make sure you don’t lose this password! Click Next:

7 SSO Set Password

Enter your site name, click Next:

8 SSO SIte Name

Port 7444 will need to be open on the Windows Firewall, click Next:

9 SSO HTTPS Port

Change directories/drive if you need to, click Next:

10 SSO Install Directory

Review Install Options – Once you are satisfied click Install:

11 SSO Review Install Options

SSO is now installed. Click Finish:

12 SSO Finish

Next we will install the Web Client, take note of the prerequisites, click Install:

13 Web Client Overview

Web Client Install – Click Next:

14 Web Client Setup

Accept the terms and click Next:

15 Web Client License Agreement

Change directories/drives and click Next:

16 Web Client Install Directory

Highly recommend leaving the ports to default, click Next:

17 Web Client HTTP Ports

Enter the SSO password you set during the SSO install, click Next:

18 Web Client Enter SSO Password

Click Yes to accept the SSO certificate:

19 Web Client Certificate Accept

Click Install Certificates to continue:

20 Web Client Install Certificates

Ready to Install – Click Install to start the web client install process.

The Web Client is now installed. Click Finish:

21 Web Client Finish

Next we will install the Web Client, take note of the prerequisites, click Install:

22 Inventory Service Overview

Click Next:

23 Inventory Service Setup

Accept the terms and click Next:

24 Inventory Service License Agreement

Change directory/drive is needed, click Next:

25 Inventory Service Install Directory

Ensure your FQDN is correct, click Next:

26 Inventory Service FQDN

Highly recommend to use default ports, click Next:

27 Inventory Service Configure Ports

Pick a option that fits your environment. Since this is my home lab a small inventory size will work. Click Next:

28 Inventory Service Inventory Size

Enter the SSO password you entered during the SSO install, click Next:

29 Inventory Service Enter SSO Information

Click Yes to accept the SSL certificate:

30 Inventory Service Certificate

Click Install:

31 Inventory Service Install

Inventory Service is now installed. Click Finish:

32 Inventory Service Finish

Now to install vCenter Server. Take note of the prerequisites and click Install:

33 vCenterServer Overview

Click Next:

34 vCenterServer Setup

Accept the terms and click Next:

35 vCenterServer License Agreement

Can enter a license now or click  Next to continue with evaluation mode:

36 vCenterServer License Key

We will be using the SQL database we created earlier instead of SQL Express, on the drop down should be your ODBC connection we created earlier, select it and click Next:

37 vCenterServer ODBC Selection

Enter your SQL database password we created earlier and click Next:

38 vCenterServer SQL DB Creds

Change the user account to the one we created earlier and make sure the FQDN is correct, click Next:

39 vCenterServer Service Account

If you get the following error, just add your service account into local admin group:

40 vCenterServer User Account Check

Since this is our first vCenter installation, select the standalone and click Next:

41 vCenterServer Linked Mode Options

Recommend not changing the ports, click Next:

42 vCenterServer Configure Ports

Since this is being installed in my home lab, a small inventory size will be selected. Pick an option for your environment and click Next:

43 vCenterServer Inventory Size

Enter the SSO password we created in a earlier step and click Next:

44 vCenterServer SSO Information

Click Yes to accept the SSL certificate:

45 vCenterServer Certificate Accept

Sets administrator account in vCenter. Click Next:

Click Next:

47 vCenterServer Inventory Service URL

Change path/drive letter if needed, click Next:

48 vCenterServer Install Directory

Now we are ready to install vCenter Server. Click Install:

49 vCenterServer Install

vCenter is now installed! Click Finish:

50 vCenterServer Finish

Lastly in this walk through we will install the VMware vSphere “Thick” Client, click Install:

51 ThickClient Overview

Click Next:

52 ThickClient Setup

Accept the terms and click Next:

53 ThickClient License Agreement

Change the directory/drive letter if needed and click Next:

54 ThickClient Install Directory

Click Install:

55 ThickClient Install

Thick Client is now installed.

56 ThickClient Finish

Now we are ready to connect and configure vCenter!

Continue to Part 5:
https://www.virtuallyboring.com/installing-vmware-vsphere-part-5/

Installing VMware ESXi and vCenter 5.5 [Part 5]

Installing VMware vSphere 5.5 Series:
Part 1: Introduction and ESXi Installation
Part 2: Microsoft SQL 2012 Installation
Part 3Creating the vCenter Database & ODBC Setup
Part 4: vCenter 5.5 Installation
Part 5: Initial Setup (Accessing vCenter, Configure Basic Permissions, Add Host)

Here is how you access your vCenter using the web client or install the thick client. I will show you how to access the web client but will continue configuration of vCenter using the thick client.

Accessing and Configuring vCenter:

To access your web client, go to the following address in your browser:

https://[vCenterServerNameorIPAddress]:9443

1 Web Client Web Page

In the bottom left corner there will be a “Download the Client Integration Plug-In”, go ahead and click that link and install. The plugin enabled certain functions such as mounting OVA files and viewing VM consoles.

2 Client Integration Plugin

To login enter the username and password we created during the install, click Login:

3 Web Client Login

To access vCenter using the thick client, enter the vCenter server name and the username/password we created during the install, click Login:

4 Thick Client Login

First we will set permissions do you can log in with a domain account or local user. Click on Hosts and Clusters:

5 vCenter Home

Now click on the permissions tab, right click in the white and click Add Permission:

6 vCenter Permissions

You can add users from domain if available and the local users of the vCenter server. I have a domain and created a group for VMware Admins. Once you add your users/groups click Ok:

7 Users and Groups

I want this group to have administrator privileges, on the drop down menu click Administrator then Ok. Now you can log into vCenter using a user account in the Vmware Admin group. Click Ok:

8 User Permissions

Last thing we will cover is adding a host. First we will need to create a datacenter. Right click your vCenter name and click New Datacenter:

9 New Datacenter

Name your datacenter:

10 Named Datacenter

Now right click your Datacenter and click Add Host:

11 Add Host

Enter the IP address or DNS name of your ESXi host, enter the login information and click Next:

12 Add Host and Login Info

Click Yes to accept the certification:

13 Certificate Accept

It will give you a summary of your host showing all virtual machines that will be added to vCenter, click Next:

[Note: My host is running 5.1, it is the same concept for hosts running 5.5]

14 Host Information

You can enter a license key or proceed with an evaluation trial period, click Next:

15 License

Here you can enable lockdown mode. Since this is a home lab I am not going to enable that, click Next:

16 Lockdown

Click Next:

17 VM Import Location

Click Finish:

18 Finish

Now you have configured the basics and can start deploying virtual machines!

19 vCenter Overview

VMware vSphere Beta Program

VMware announced on their blog that they are launching the vSphere beta program. While this is open for anyone to sign up it is still a closed beta, meaning NDA (Non Disclosure Agreement). For full details check out the link below:

http://blogs.vmware.com/vsphere/2014/06/now-open-vmware-vsphere-beta-program.html

%d bloggers like this: