Learn about the benefits of a software-defined datacenter and virtual machines.
- [Instructor] Before we begin building a lab environment, let's take a look at what a virtual machine is and why we would want to use one. A virtual machine is a software-defined computer that runs inside of another computer. A physical computer is defined by the hardware we place inside of it: how many CPUs, how much memory, and any other devices that are installed on that physical system. A virtual machine, in contrast, is encapsulated in a set of files. This allows for us to rapidly modify the configuration of the virtual machine without having to make physical changes. In addition, because the virtual machine consists of a set of files, anything that we can do with a file, we can do with a virtual machine, including making a backup, copying or cloning it, and sending it across the country or across the world.
VMs can have largely the same hardware as physical computers, including network interface cards, hard drives, USB devices, and SCSI devices. Virtual machines use the same operating system and applications as a physical computer. From the point of view of the operating system, it can't tell whether it's running in a virtual machine or on physical hardware. So why would we want to use a virtual machine? A common reason for using a virtual machine is server consolidation. A physical computer is typically using about 5-15% of its CPU.
By running multiple virtual machines inside of the same physical host, we can increase the CPU utilization up to closer to 60-80% and get better utilization of the other resources as well. Another reason for using a virtual machine is hardware independence. Because a virtual machine abstracts the underlying physical hardware, the same virtual machine can be run on multiple hardware types without having to make any changes inside of the virtual machine. Because the virtual machines are encapsulated as a set of files, they provide for better mobility and duplication.
Virtual machines also help to reduce downtime, because we can move a live running virtual machine from one host to another host. This means that hardware maintenance operations no longer require machine downtime. Finally, virtual machines allow for automation of development and production environments. The platform that a virtual machine runs on top of is called the hypervisor. The hypervisor is the core of the VSE environment. It's responsible for scheduling the CPU. All of the virtual machines running on a host run directly on the CPU, but the hypervisor manages scheduling to ensure that each virtual machine gets the CPU that it's entitled to.
The hypervisor is also responsible for sharing the physical memory among all of the running virtual machines. Other types of hardware are emulated by the hypervisor, including SCSI controllers, network interface cards, and USB controllers. There are two types of hypervisors that are available: a bare-metal hypervisor and a hosted hypervisor. A bare-metal hypervisor has less overhead and better performance because it's running directly on top of the physical hardware. Examples of a bare-metal hypervisor include ESXi and Citrix ZenServer.
A hosted hypervisor, while it has less performance because it is running on top of an operating system, does provide for more flexibility and easier management. Examples of a hosted hypervisor include VMware Workstation, and VMware Fusion. Most production environments run on top of a bare-metal hypervisor, such as ESXi, while many lab environments run on top of a hosted hypervisor, such as VMware Workstation. In this course, I'll be running ESXi on the bare-metal. On top of that I will install a control-center VM that provides for basic services like DNS and NFS.
And then I'll use a script written by William Lamb to install three nested ESXi hosts in vCenter Server. Finally, I'll install three small test virtual machines inside of the nested ESXi host.
- Virtual machine benefits
- Building a lab environment with a mini PC
- Working with ESXi and vCenter Server
- Installing a control center VM
- Using the HTML5 client and the web client
- Adding an ESXi host and use Remote Console
- Configuring vSAN and storage profiles
- Adding NFS datastore
- Deploying a virtual machine from OVA
- Performing a cloning operation
- Using templates
- Performing a vMotion migration
- Working with snapshots