VMware vSphere

From Leo's Notes
Revision as of 00:21, 9 January 2019 by Leo (talk | contribs)
This page was last edited on 9 January 2019, at 00:21.

vSphere is a server virtualization platform from VMware. It is not an operating system or application per se. The name covers a range of technologies under the VMWare Infrastructure umbrella since version 4.

Overview

Software Defined Data Center is where all infrastructure (network, machines, storage) is virtualized.

Virtualization is the process of creating a software-based representation of physical machines, networks, or storage. VMs itself is a running program that represent a physical machine and its properties can be configured programatically (such as storage, network, cpu, memory, etc).

Other benefits include:

  • Isolated from other VMs, and
  • Sheltered from physical hardware changes/faults.
  • Files can be provisioned into VMs, or snapshotted, or moved, etc.
  • ACLs can be made to limit user access to certain VMs or resources.

Core resources managed by the vmkernel:

  • CPU
  • Memory
  • Disk
  • Network


ESXi Host

A ESXi host (also called vmkernel, hypervisor) can run a total 1024 VMs per host with a maximum of 4096 Virtual CPUS per host. Minimum/Maximum requirements are:

  • 2 - 768 CPUs per ESXi host
  • 4GB-16TB memory limit
  • 32 Gigabit ports, or 16 10Gbit adapters, or 4 25/40/50/100Gbit adapters.

Hosted Architecture - using a generic OS (such as windows, linux) to run VMs. Compare this to Bare Metal Architecture - using an actual minimal hypervisor built for running VMS such as ESXi, or HyperV.

hostd is a process that runs on every ESXi host that is responsible for most operations on the host as well as communicating with the vmkernel. Clients communicate witht hostd to control the host. vpxa is the agent that uses hostd to control the ESXi host.


Storage

Storage on ESXi are also known as datastores and is the location where virtual machine data is stored. There are serveral different backing methods that can be used for datastores:

  • Local, vmfs
  • SAN
    • Fibre Channel (FC)
    • Fibre Channel over Ethernet (FCoE)
    • iSCSI
  • NAS via NFS
  • vSAN (vSphere 5.5) vsphere san
  • VVOLS (vSphere 6.0) virtual volumes

Virtual machine data is stored as virtual disks (vmdk).

Files representing a virtual disk:

  • vmdk - contains disk directory info, adapter type, geometry information
  • flat.vmdk - the actual disk data

These virtual disks can also be made to link/map to another file or physical device using Raw Device Mapping:

  • Virtual: vdm 62TB, a mapping/pointer to another vmdk file
  • Physical: vdmp 64TB, a mapping/pointer to a physical disk/lun

Disk allocation can be set as:

  • Thin: Allocates blocks as they are written
  • Thick : Allocates all blocks up front
    • Lazy: Writes 0s when requested
    • Eager: Writes 0s when disk is initialized


vCenter

vCenter Server allows central management over multiple ESXi hosts and their virtual machines. The vCenter server package can be installed on Windows/Linux (up to 6.7), but is now a virtual appliance (VCSA, vCenter Software Appliance). vCenter can orchestrate features such as Distributed Resource Scheduler (DRS), HA, Fault Tolerance, vMotion, Storage vMotion.

There are two groups of services:

  1. vCenter Server services
    • vSphere Client, vSphere Server, the vSphere Web Client, Update Manager, auto deploy, esxi dump collector
    • cannot have multiple servers but vCenter can be set up in a HA arrangement (active-passive, witness) mode if using the appliance version
  2. Platform Services Controller (PSC)
    • New service group starting from vSphere 6 that handles infrastructure security, certificate management, server reservation
    • vCenter single sign-on, vmware directory services (VMware's implementation of LDAP), license server, lookup service, vmware CA, certificate store
    • Can be load balanced with multiple controller servers from different regional locations


Limits:

  • 25k powered on vms, 65k vm inventory, 2000 ESXi hosts
  • 64 hosts per cluster, 8000 VMs per cluster

The embedded database bundled with Windows vCenter shoudln't be used with more than 20 ESXi hosts or 200 VMs.

The appliance version includes both the vCenter Server and Platform Services Controller services and runs on VMware Photon OS with PostgreSQL.


Virtual Provisioning X Agent (VPXA) gets installed on the ESXi host when it is added to the vCenter inventory. The agent is the intermediary between vCenter and hostd. vCenter controls the ESXi host using this agent with the Virtual Provisioning X Daemon (VPXD) on the vCenter Server. The free version of ESXi does not include the vpxa agent.

vCenter uses a user 'vpxuser' to control the ESXi host. It does not need the root or dcui administrator accounts.


When vCenter shares a single vCenter Single Sign-On server, they can be linked using Enhanced Linked Mode. This allows vMotion across vCenters, management of other vCenters from one location. It's enhanced because it can link vCenters on different platforms (appliance and Windows, for example).

The PSC should be load balanced on external servers if it is used by multiple vCenters to avoid a single point of failure for multiple vCenters.

vCenter exposes an API to automate tasks.


Clients

  • vSphere (host) Client - Deprecated windows client
  • vSphere Web Cleint (based on Adobe Flex/Flash)
  • HTML5 - has 97% of features. vsphere advanced configuration not there yet. next version should be feature complete

ESXi Shell via SSH Use vSphere Power CLI

Always use vSphere to manage ESXi hosts.


Permissions

Permissions defines what user or group has access to what role and on what object. Users and groups can be local, or from an identity source.


VAMI VMware Appliance Management



Migration

  • vMotion across ESXi hosts, across datacenters, encrypted.

vRealize Orchestrator

vSphere Distributed Resource Scheduler (DRS)

  • Across 64 ESXi hosts

Patch management using VMware vSphere Update Manager



Networking

  • vSphere Distributed Switches (VDS)
 - virtual switch for an entire data center, up to 2000 hosts 
 - switch itself is saved on vCenter, and is created on each ESXi host as required
  • vSphere Standard Switches (VSS)
 - configuration only on one ESXi host.


VMPG - virtual machine port group vmkernel - management traffic, used by the hypervisor

port ID is vmk0

uplink



Snapshots

vmsd - snapshot descriptor file vmem - snapshot memory vmsn - memory snapshot -$delta.vmdk - disk delta


Templates

OVF - Open Virtualization File OVA - Open Virtualization Appliance

An existing VM that is used as a source copy for new VMs. The .vmx file gets renamed to a .vmtx file.


Content Library

A feature since 6.5 that allows VM templates to be shared across different vSphere.