Install VMware vCenter - 夜莺博客

Install VMware vCenter

原文:Install VMware vCenter — theDXT (Daniel Keer)

VMware vCenter is a wonderful application that lets you take full advantage of your ESXi hosts. If you have more than one ESXi host you should look at vCenter. The full name of vCenter is vCenter Server Appliance or VCSA.

In this post, I will show you step-by-step how to install vCenter 8. The process is broken up into two stages. Stage 1 is the deployment on the vCenter VM and Stage 2 is the final settings to the vCenter VM.

Why Run vCenter Instead of Managing Hosts Individually

Every ESXi host has its own embedded Host Client, and for a single lab host that is often enough. As soon as you have two or three hosts, the maths changes. vCenter Server — formally the vCenter Server Appliance, or VCSA — gives you one place to authenticate, one inventory tree, and the features that only exist at cluster level:

  • vSphere vMotion and DRS for live migration and automated placement.
  • vSphere HA so a failed host's virtual machines restart on a surviving host.
  • Clusters, resource pools and permissions applied once instead of per host.
  • Lifecycle Manager (vSphere Lifecycle Manager) for host baselines and firmware.
  • APIs and integrations. Backup products, monitoring tools and automation almost all expect a vCenter endpoint rather than a list of hosts.

The appliance is a prebuilt Photon OS virtual machine that ships as an ISO. There is no Windows Server to patch and no external database to size by hand: the PostgreSQL database and all services run inside the appliance.

What You Need Before You Start

Deployment is short, but almost every failed install traces back to something that should have been prepared on this list:

  • A supported target host. An ESXi host that the version of vCenter you are deploying supports, with enough free RAM and storage for the appliance. Deploying vCenter 8 onto an older host that is no longer on the compatibility matrix is a common first mistake.
  • DNS records. A forward (A) record and a reverse (PTR) record for the appliance FQDN. vCenter relies on name resolution for its own services and for the certificates it issues; a missing PTR record is a classic cause of a successful install that cannot be reached afterwards. If you have not set static addressing on the host yet, start with ESXi setting a static IP.
  • Network details. Static IP address, subnet mask, gateway and a resolvable NTP source. The appliance must reach a time source; Kerberos-based SSO authentication will fail if the clock drifts.
  • The ISO. Download the vCenter Server Appliance installer ISO from Broadcom's download portal.
  • A workstation. A machine with network access to the ESXi host, and with the ability to resolve the appliance FQDN once the VM is up — that includes the second stage of the installer, which talks to the appliance over HTTPS, not to the ESXi host.
  • Credentials and names. ESXi root (or an account that can create VMs), the root password you will set on the appliance, the SSO domain (usually vsphere.local) and the SSO administrator password.

Write the FQDN, IP, root password and SSO password down somewhere safe before you start. The appliance root password is what unlocks the management interface at port 5480, and it is the account you will use to fix the appliance when the vSphere Client is unreachable.

Deployment Sizing: Pick the Right Appliance Size

During Stage 1 the installer asks for a deployment size. The size sets the CPU and memory of the appliance, and it is a function of the inventory you expect — not of how many VMs you intend to run. The published vSphere 8 sizes are:

Size vCPUs Memory Suitable for
Tiny 2 14 GB Up to 10 hosts or 100 virtual machines
Small 4 21 GB Up to 100 hosts or 1,000 virtual machines
Medium 8 30 GB Up to 400 hosts or 4,000 virtual machines
Large 16 39 GB Up to 1,000 hosts or 10,000 virtual machines
X-Large 24 51 GB Up to 2,000 hosts or 35,000 virtual machines

Two practical notes. First, vSphere 8 raised the memory baseline for each size compared with vSphere 7 — Tiny moved from 12 GB to 14 GB — so do not downgrade the VM's memory after deployment to match an older template; services will become unstable. Second, the installer also offers a storage option. Most labs are comfortable with the default, while large inventories with heavy task and event history benefit from the larger database sizing. In my own lab I pick Small: it is noticeably more responsive than Tiny and leaves room to grow.

The Process

Stage 1

  • Using a system that has access to the ESXi host you plan to use to create the vCenter VM download the vCenter ISO from VMware.
  • Mount or extract the ISO. I’m going to mount it.

Image 2

  • Browse to \vcsa-ui-installer\win32 and run Installer.exe

Image 3

  • Select Install

Image 4

The next screen is the intro screen which lets you know that the process will be in two stages. The first stage is deploying the VM and the second stage is the final settings for the vCenter VM.

Image 5

  • Agree to the EULA

Image 6

  • Enter the IP or the FQDN of the ESXi host that you will be placing your vCenter on. I will be using an FQDN.
  • Enter the port that your ESXi is on and the username and password for a user who is allowed to create VMs. My setup is on 443 and I will be using the ESXi root account.

Image 7

  • Accept the Certificate Warning

Image 8

  • Name your vCenter VM. I will call mine vCenter8.

When you upgrade to a new major version of vCenter (for example going from vCenter 7 to vCenter 8) there will always be a new VM for vCenter. Due to this, I like to put the version number in the VM name.

  • Pick a root password for your vCenter.

The root password is used on the vCenter Server Management interface (it used to be called the vCenter Server Appliance Management interface (VAMI) ). This password can be very important in the future. Having this password has helped me fix many things with vCenter.

Image 9

  • Select your deployment size.

I like my vCenter to be a bit faster than tiny and I like to make a lot of VMs so I will select small.

Image 10

  • Select a datastore for the vCenter VM.

Image 11

  • Enter your network settings.

Image 12

  • Review everything if all looks good click Finish.

Image 13

The vCenter installer will now deploy the vCenter VM to the ESXi host. This part will take a while.

Image 14

Once Stage 1 is completed successfully we can continue to Stage 2.

Image 15

Stage 2

The next screen is the intro screen for Stage 2 it lets you know that stage one is completed and it is time for stage two the final VM settings.

Image 16

  • Set your Time synchronization mode and SSH access as needed and click Next. (You can change this later if needed)

Image 17

  • Pick a name for your SSO (Single Sign-On) domain and a password for the administrator user. I like to use the SSO domain vSphere.local

Image 18

  • Select if you want to Join the VMware Customer Experience Improvement Program. I like to join it as the more data VMware has the better they can make their products.

Image 19

  • Review your settings, if all looks good click Finish.

Image 20

  • Acknowledge the warning that you won’t be able to stop the process once you start it.

Image 21

Wait for Stage 2 to complete.

Image 22

Once Stage 2 is completed we will finally be able to login to vCenter for the first time.

Image 23

  • Go to the vCenter web page and log in.

Image 24

That’s it vCenter is now installed.

After the Install: The First Five Tasks

The deployment wizard ends at a login page, but the appliance is not finished. Do these five things before you start putting workloads on it:

  1. Log in to both interfaces. The vSphere Client on port 443 with administrator@vsphere.local, and the appliance management interface (VAMI) on port 5480 with root. The second one is for appliance-level settings only.
  2. Add your ESXi hosts. Create a datacenter, then a cluster, then add hosts and move them into the cluster so HA and DRS can be enabled. The host name must be resolvable from vCenter. The workflow is covered in Adding a host to VCSA.
  3. Sort out licensing. vCenter gives you a 60-day evaluation of the full feature set. Apply your vCenter and ESXi licences from the Licensing page before that expires, otherwise you drop to the restricted evaluation feature set. Our VMware home lab licensing notes cover the options for a lab.
  4. Configure backups. File-based backup is built into the appliance and can write to an SMB share, an NFS share or an FTP server. Configure it in the VAMI under Backup, and keep a copy of the encryption password — without it the backup is unusable. If you already back up your ESXi host configuration, extend that habit to the appliance itself.
  5. Check time sync. Confirm the appliance is synchronising with NTP and that nothing has drifted. Authentication failures and certificate warnings are frequently clock problems in disguise.

From here, the sensible extras are replacing the self-signed certificate with a trusted one (see VMware vCenter OVA certificate trust) and standardising your virtual networking on the host side so that new port groups have a home — ESXi vSwitch, port groups, VLAN IDs and teaming is a good refresher.

Keeping the Appliance Current

vCenter 8 patches through the appliance itself, by attaching an ISO to the VM and running the update from the VAMI. That is a two-line summary of a process with a few traps, including the pre-update checks and the difference between a patch and a major upgrade: Install VCSA updates walks through it. Before any major version change, take a file-based backup and a VM snapshot, and remember that each major version produces a brand-new appliance VM — which is why naming the VM with its version number from the start pays off.

Common Problems and How to Avoid Them

Symptom Usual cause Fix
Stage 1 fails with a connection error to the host Wrong port, a username that cannot create VMs, or an unsupported ESXi version Verify the host address, port 443 and credentials; check the compatibility matrix
Install succeeds but the UI is unreachable Missing DNS A or PTR record for the appliance FQDN Add both records, then retest from the client
Stage 2 times out The workstation running the installer cannot resolve or reach the new appliance Fix DNS or routing on the workstation, then resume Stage 2
Services fail or the UI crawls Memory reduced below the minimum for the chosen size Raise memory to the documented baseline for that size
Certificate warning cannot be accepted The target host's own certificate has expired Regenerate the host certificate, then restart the install
Cannot log in after weeks of operation Clock drift breaking SSO, or root password unknown Fix NTP via the VAMI; use the documented root password recovery procedure

Most of these are avoidable with one habit: verify name resolution from somewhere other than the appliance itself before you press Finish. If a client on the management network can resolve and reach the FQDN, the install will almost always complete cleanly.

Related Reading

If you want to read more about installing VMware vCenter here is VMware’s documentation on it.