vcenter

Upload to Datastore failure – Self Signed Certificate Error

When uploading file to Datastore you receive: The operation failed for an undetermined reason.  Typically this problem occurs due to certificates that the browser does not trust….

1

In most corporate environments you will be using an Internal or External Certificate Authority and so you will be looking to use that, however in my lab I haven’t set one up.

When you connect to your vCenter (I have tested with Chrome and IE) you receive: There is a problem with this websites security certificate

2

Select Continue to this Website (not recommended)

Your vCenter page will load.  At the Bottom Right there is an option to Download trusted root CA certificates

NOTE: I only saw and tested this with vSphere 6.5 and with the VCSA – I have read this option is only available with VCSA and in 6+

3

Select this and save the ZIP file

Open the file and navigate to the Certs folder – there will be a Linux, Mac and Windows folder – open the appropriate folder4

There are two files, we want the file ending in 0 (NOT r0)

Extract this file by dragging to an appropriate directory

Rename the file by changing the extension from .0 to .cer

5

Open a Command Prompt with Administrator rights and select Yes at the Prompt6

Type: certmgr.msc

7

And press Enter – this will bring up the Certificate Manager

Navigate to Trusted Root Certification Authorities and expand this

Right click on Certificates and select All Tasks > Import

8

Select Next and Browse to the Certificate you just renamed and select Next

9

Leave the Defaults and Finish

Select Yes at the Security Warning

10

And you should see: Import Successful

Close your Browser and then Re-open and try to access vCenter again

11

After this I was able to upload files to my datastores

VIRTUAL LAB – PART 7 – Adding Shared Storage

Now we have the Networking in place, we need some Shared Storage.  Im going to refer to a few older posts of mine to set this up with FreeNAS which works really well.  I may look at other solutions at some point but for now this does exactly what I need.

Installing FreeNAS into VMware Workstation Pt1
Installing FreeNAS into VMware Workstation Pt2
Installing FreeNAS into VMware Workstation Pt3 (iSCSI)

This should be enough to get going (May add some NFS Later)

(more…)

VIRTUAL LAB – PART 6 – ESXi and vCenter Networking

This post will cover the setup of the Hosts networking.  I plan to simulate (as much as possible) a real world deployment, so separating all traffic over different networks.  This will mean adding a few additional Interfaces to each Host and deploying a few Virtual Switches to them also.

The first thing I need to do is add a few Network Interfaces to each of my Hosts, Im going to add 3 Interfaces; 1 for Shared Storage, 1 for FT and 1 for vMotion.

Open up Virtual Machine Settings and select Add

Screen Shot 2017-03-22 at 11.12.03.png

Select Yes if the User Account Control appears (more…)

VIRTUAL LAB – PART 5 – vCenter Setup

So my VCSA is now up and running, I just need to go into vCenter and do some config

  • Licenses
  • Create Datacenter, add Hosts etc..

First thing to do is log in using URL structure: https://<IP of vcsa>//vsphere-client/?csp

NOTE: If you just go to the IP of your vCenter it will give you options to use either HTML5 or Flash

Screen Shot 2017-03-21 at 10.45.53.png

I selected the Flash client which uses the URL above

(more…)

VCSA (vCenter) Log Locations

Here are a few log files I found useful when deploying the VCSA (vCenter Appliance)

  • /var/log/firstboot
    • rpmInstall.json – A JSON formatted file containing status messages.  Contains progress information, and error messages.
    • cloudvm.log – Log messages created throughout the vCenter Server Appliance installation process.
    • firstbootStatus.json –  A JSON file containing the current status of the installation process. 

Installing Nested ESXi VM Tools

Ensure SSH / Port 22 is open and the Services are started as per previous post Enabling SSH

Download the relevant VIB File from the Flings Website here:

https://labs.vmware.com/flings/vmware-tools-for-nested-esxi

Open up your SFTP / FTP Application; In my lab I am using WinSCP

Copy the VIB to a Datastore on the ESXi Server

1

PuTTy onto the host and run:

esxcli software vib install -v /vmfs/volumes/[DATASTORE]/esx-tools-for-esxi-9.7.1-0.0.00000.i386.vib -f

2

After a short while you should receive the following Successful message:

3

Summary – From the Official FLINGs Website: https://labs.vmware.com/flings

Note:  See Instructions tab for downloads.

This VIB package provides a VMware Tools service (vmtoolsd) for running inside a nested ESXi virtual machine. The following capabilities are exposed through VMware Tools:

    • Provides guest OS information of the nested ESXi Hypervisor (eg. IP address, configured hostname, etc.).
    • Allows the nested ESXi VM to be cleanly shut down or restarted when performing power operations with the vSphere Web/C# Client or vSphere APIs.
    • Executes scripts that help automate ESXi guest OS operations when the guest’s power state changes.
    • Supports the Guest Operations API (formally known as the VIX API).

VCSA – Failed to execute, during Setup Wizard

When running through the Setup Wizard in the vCenter Server Appliance  version 5.5

1

you receive:

Failed to execute ‘/usr/sbin/vpxd_servicecfg ‘db’ write’…..

2

 

This occurs for SSO and the Database Setup

Connect to the VCSA via Console and Stop the vmware.vpxd service

3

Once this is down – go back to the GUI and re-run the Setup Wizard

Removing Unwanted Plugins from vCenter

Some of the plugins for vCenter don’t offer an uninstaller.

To unregister a plugin from vCenter follow this method provided by a VMware KB:

Open a web browser and go to http://vcenterserver/mob

Click on Content

Click on ExtensionManager

Copy the name of the plugin you want to unregister

extensionList[“com.emc.EMCStoragePlugin”]

Click on UnregisterExtension

In the text field paste the text into the box and delete all but the part in quotes(e.g.com.emc.EMCStoragePlugin)

click InvokeMethod

 

Refresh the browser and the plugin should be gone from the list

Reconnect to vCenter using the client and the plugin should be gone from Plug-ins-> Manage Plugins list.

Performance Data is currently not available for this entity on a single ESXi Host

When no performance data is available on a single host, restart the hostd and vpxa services

From the Local Console or SSH:

  1. Log in to SSH or Local console as root.
  2. Run these commands:/etc/init.d/hostd restart
    /etc/init.d/vpxa restart

    Note: In ESXi 4.x, run this command to restart the vpxa agent:

    /etc/opt/init.d/vmware-vpxa restart

  3. Alternatively, to restart all management agents on the host, run the command:services.sh restart

Another Day, Another SQL Express issue with VMware vCenter Database

As the title says – another issue with the vCenter Database becoming full on SQL Server

Go into the SQL Management Studio and navigate the vCenter Database

First check the Size of the DB – Right Click on the DB and select Properties – you see that the DB space available is too low

4

Now close this and stop the VMware vCenter Service (more…)

Display what is filling up SQL Express Database on vCenter

Run this in SQL Management Studio to see what is taking up space on vCenter SQL Express Database:

 

SELECT [Table Name],
(SELECT rows FROM sysindexes s WHERE s.indid < 2 AND s.id = OBJECT_ID(a.[Table Name])) AS [Row count], [Total space used (MB)] FROM ( SELECT QUOTENAME(USER_NAME(o.uid)) + ‘.’ + QUOTENAME(OBJECT_NAME(i.id)) AS [Table Name],
CONVERT(numeric(15,2),(((CONVERT(numeric(15,2),SUM(i.reserved)) * (SELECT low FROM master.dbo.spt_values (NOLOCK) WHERE number = 1 AND type = ‘E’)) / 1024.)/1024.)) AS [Total space used (MB)] FROM sysindexes i (NOLOCK) INNER JOIN sysobjects o (NOLOCK) ON i.id = o.id AND ((o.type IN (‘U’, ‘S’)) OR o.type = ‘U’) AND (OBJECTPROPERTY(i.id, ‘IsMSShipped’) = 0) WHERE indid IN (0, 1, 255) GROUP BY QUOTENAME(USER_NAME(o.uid)) + ‘.’ + QUOTENAME(OBJECT_NAME(i.id))

) as a
ORDER BY [Total space used (MB)] DESC

vCenter Server Services Not Starting / Stopping

Recently came across an issue where a customers vCenter Server Services wouldn’t start.  I read up on a few KB article stating to Start / Restart the SSO Service, this didn’t fix the problem.  Even a couple of reboots of the vCenter Server failed.

After looking in the logs, found at  C:\ ProgramData\VMWare\VMware VirtualCenter\Logs the latest Log Entry contained this:

Image

 

(more…)