Book Image

VMware vSphere 5.5 Essentials

Book Image

VMware vSphere 5.5 Essentials

Overview of this book

Table of Contents (20 chapters)
VMware vSphere Essentials
Credits
Foreword
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Introduction to virtual infrastructure – virtual machines, disks, CPUs, memory, switches, network, and storage


Let us get a better understanding of what a virtual machine is, and how ESXi interacts with the four major components: CPU, memory, network, and storage.

Virtual machines

A virtual machine (VM) is a set of virtual hardware on which a supported guest operating system and its applications run.

A VM is also a set of discrete files. Following are some of the files that make up a virtual machine; except for the log files, all the VM files start with the VM's name (<VM-Name>):

  1. A configuration file (.vmx).

  2. One or more virtual disk files. The first virtual disk has files <VM_name>.vmdk and <VM_name>-flat.vmdk.

  3. A file containing the virtual machine's BIOS state and configuration (.nvram).

  4. A VM's current log file (.log) and a set of files used to archive old log entries (#.log).

  5. Swap files (.vswp) used to reclaim memory during periods of contention.

  6. A snapshot description of files (.vmsd). This file is empty if the virtual machine has no snapshots.

  7. If the virtual machine is converted into a template, a virtual machine template configuration file (.vmtx) replaces the virtual machine configuration file (.vmx).

A virtual machine can have other files, for example, if one or more snapshots were taken or if raw device mappings (RDMs) were added. A virtual machine has an additional lock file if it resides on an NFS, iSCSI, or Fibre-channel data store. This mechanism is very important when running a cluster, to avoid VM reboots in case of network failures. In such a case, a special heartbeat connection is implemented on a datastore basis. A virtual machine has a Changed Block Tracking (CBT) file (x-ctk.vmdk), if it is backed up with the VMware vSphere Data Protection (VDP) appliance or compatible products. Using this technology, it is possible to detect the changed virtual hard disk blocks, and only include those in the backup processes. This speeds-up the backup dramatically, while also reducing the storage consumption of backup archives.

CPU virtualization

CPU virtualization emphasizes performance and runs directly on the available CPUs whenever possible. The underlying physical resources are used whenever possible and the virtualization layer runs instructions only when needed, to make virtual machines operate as if they were running directly on a physical machine. When multiple virtual machines are running on one ESXi host, the physical resources are shared equally by default. We will later have a look at more complex resource setups, which enable a kind of prioritization per VM basis.

vSphere's virtualization architecture is invisible to the guest operating system. There is no need to customize it to support being virtualized. Virtual CPUs can be set on a core and thread basis (for example, 2 vCPUs with 2 cores, each resulting in 4 threads available).

Memory virtualization

In a non-virtual environment, the operating system assumes that it owns all physical memory in the system. When an application starts, it uses the interfaces provided by the operating system to allocate or release virtual memory pages during the execution.

In vSphere, the ESXi kernel (VMkernel) owns all the memory resources and implements its efficiency management. VMkernel reserves some of the memory for itself; the remaining memory is available to virtual machines (including some overhead for each VM). Virtual memory is grouped into pages that are mapped into physical memory or data store resources, if the ESXi host runs out of physical memory. To avoid this scenario, vSphere offers the Ballooning functionality, which forces powered-on virtual machines to free up unneeded memory (for example, memory caches).

We will later have a deeper look at advanced memory resource management, including reservations and limitations.

Physical and virtual networking

The key virtual networking components in virtual architecture are virtual Ethernet adapters and virtual switches. A virtual machine can be configured with one or more virtual Ethernet adapters. Virtual switches allow virtual machines on the same ESXi host to communicate with each other using the same protocols that would be used over physical switches, without the need for additional hardware.

Virtual switches also support VLANs that are compatible with standard VLAN implementations from other vendors, such as Cisco. To enable more complex setups, VMware also offers distributed virtual switches that enable advanced features like Link Layer Discovery Protocol (LLDP) and 40GB NIC support. Distributed switches are managed centrally by vCenter Server, which reduces time and effort for network configuration.

We will have a look at more advanced network setups in later chapters.

Physical and virtual storage

Conventional file systems allow only one server to have read-write access to a file at a given time. VMware vSphere VMFS enables a distributed storage architecture that allows multiple ESXi hosts, concurrent read and write access to the same shared storage resources. VMFS is a high-performance cluster file system designed for virtual machines. VMFS uses distributed journaling of its file system metadata changes. As a result, VMFS can easily recover data in the event of a system failure. VMFS allows virtual disks to have up to 62TB capacity and also expanding storage capacity online without downtime.