Like a physical server, a virtual machine needs to have an operating system installed to function and run applications. Although there are still dozens of different operating systems that can work on the x86 platform, the bulk of virtualization today is done on the more recent versions of Windows. Understanding how to install Windows and then optimize it for a virtual environment is crucial.
A Windows operating system can be loaded into a virtual machine in a number of ways. In the previous chapter, you saw that during the process of creating a virtual machine, VMware Workstation Player offers the option to install Windows as part of that effort. Most virtual machines are created through a template. Templates are virtual machines that already contain an operating system and often are already loaded with application software as well. These prebuilt VMs are stored in a nonexecutable state that allows an administrator to rapidly stamp out copies of the selected configuration. Once a copy is created, a few more personalization and system configuration steps, such as providing a unique system name and network address, will need to be completed before the new VM can be deployed. We will cover more about templates in Chapter 11, “Copying a Virtual Machine.”
Periodically, a virtual machine requires a pristine copy of Windows. Some administrators create a new template with every new major release, while others merely power on the existing template and apply the service packs. Some administrators prefer the new install because it forces them to look at the other pieces of software in the VM that might also need updates or refreshes. Others believe that loading a version of Windows with the service packs (SPs) already as part of the distribution is somehow intrinsically superior to applying the service packs separately. There is no incorrect choice here. Most people choose a path that works for them. Instructions for installing VMware Tools follow those for installing Windows 10. These steps are optional but highly recommended.
In order to install Windows, or any operating system, you need the source disks so that you can execute from them. These disks can take the form of actual CDs, DVDs, or image files of the software on other media. In the case of Microsoft Windows, you can purchase a copy at a retail store and come home with the disks, or buy it online and download the images to your computer. That image can be burned to a CD or DVD for backup or execution purposes. If you are using this text as part of a class, you may have access to a student version of Windows. Many universities have agreements with Microsoft to allow students to download Windows for educational use at little or no cost.
The steps that follow are not the only method you can use to create a Windows 10 virtual machine, but rather one of many possible options. For these examples, a 64-bit version of Windows 10 was used (see Figure 5.1). The ISO image is staged on the desktop for the VM to access.
.vmx
file, and clicking Open. Either method will work.
The Windows Setup screen appears, as shown in Figure 5.6. Notice at the bottom of the screen, outside of the virtual machine is an alert bar with some choices regarding the installation of VMware Tools. We will cover this separately after the installation. Select Remind Me Later and the alert bar disappears.
You have one more step left to complete before you can work in this virtual machine, and that is adding the VMware Tools. VMware Tools are a combination of device drivers and processes that enhance the user experience with the VM, improve VM performance, and help manage the virtual machine. Although installation of the VMware Tools suite is not mandatory, it is very highly recommended for VMs in any of the VMware environments.
Now that you have a working VM, let's take a closer look at what you've built. The first thing to observe is that the VM looks identical to the physical desktop, which is exactly what you want. If you select the Start icon, you'll see exactly what you would expect to see in a fresh install of Microsoft Windows 10, as shown in Figure 5.24. It is easy to tell that you are using a virtual machine by looking at the VMware Workstation Player application bar at the top of the VM window. However, most virtual machines are run on servers and are connected to by users who never see the physical or virtual servers with which they work.
If you were to connect to this VM via the network using the Remote Desktop Connection, could you determine if it was a physical or virtual server? The answer is yes. There are a number of key giveaways that you could quickly check to make that determination. First, by highlighting the hidden icons at the bottom right, you will see a VM logo. This indicates that VMware Tools has been installed on this particular VM. You can open the About VMware Tools window to verify that the service is running, as shown in Figure 5.25. Remember, though, that installing the VMware Tools is recommended, but not mandatory. This means that the absence of VMware Tools does not automatically indicate that it is a physical machine. Close the About VMware Tools window.
There are ways to more definitively determine what type of system you're using. Choose the Start icon and select Settings and then the Devices icon. Choose Connected Devices and scroll down on the right side of the screen to the bottom. Select Devices And Printers. You can instantly see that some of the devices do not match any physical vendor hardware. Figure 5.26 shows a VMware Virtual USB Mouse, a VMware Virtual S SCSI Disk Drive, and VMware Virtual USB Sensors; but even more telling is that when you select the machine icon on the top left of the devices window.
When you highlight the image, you can see preliminary information at the bottom of the window. It is fairly obvious that this computer is of the virtual variety manufactured by VMware. If you follow the same path on your physical computer, you should see the difference immediately. When you double-click the computer image, a properties window appears, and you can see that the VM is a virtual machine. Select the Hardware tab and scroll through the devices, as shown in Figure 5.27, to confirm that virtual devices compose the system. On your physical computer, obviously only physical devices would be present. Close the windows to continue.
Let's look at two more items that will help illustrate the differences between what the physical machine has and what the virtual machine thinks it has. Again, select Start &cmdarr; Settings &cmdarr; System &cmdarr; Storage. Here you can see the single disk drive that you created; the C: drive still has about 20 GB free out of the 30 GB it has. But what is the actual size of the storage on this physical system? By following the same steps for the physical system, as shown in Figure 5.28, you can see that the physical C: drive is considerably larger. We'll look closer at this in Chapter 9, “Managing Storage for a Virtual Machine.” Close both the physical and virtual Storage windows.
Now let's make one small adjustment to the VM just to experience the flexibility of changing the configuration. You've allocated 2 GB of memory to the VM, but if you look at the Microsoft Windows 10 system requirements, a 64-bit implementation, which is what is deployed, should have a minimum of 2 GB. You haven't done anything yet to stress the VM from a performance standpoint, so the 2 GB has been sufficient to operate without any ill effects.
The process we just executed is not very different from what system administrators go through as they deploy workloads onto a virtual platform. There are automation options and other methods of improving their operational efficiency available, and we'll cover some of these as we progress, but the basic template is here. This, however, is only the first step in creating an application's virtual machine. You have completed a fairly generic Microsoft Windows installation, but there are two more important steps you need to take to help the VM perform its very best for the application that will run there. The first is specific to virtual machines, while the second is just good practice for physical or virtual servers.
Many services that run as part of the Windows operating system help optimize how the physical environment runs. Some of these services don't optimize a virtual environment, so it makes good sense to just disable them. Many of the wireless networking services, for example, while perfectly reasonable for a Windows 10 implementation running on a local laptop, do nothing for a Windows 10 VM running on a host server because that physical hardware wouldn't normally have access to a wireless network. There are other physical world features that PCs have that don't translate to a virtual world. Administrators routinely disable power management features because they don't apply to a VM. Virtualized servers often have many of the personalization features removed or disabled because fancy fonts and customized sounds are not necessary for an application server. They also take up disk space and use CPU and memory resources.
Wallpapers are removed, as are screen savers. Various visual effects, such as Aero, are often disabled for virtual application servers. The intent of all of these modifications is to provide VMs that do not needlessly consume extra CPU cycles, memory blocks, I/O bandwidth, or disk space. On one virtual machine, all of these savings are small, but when you stack many multiple VMs on a physical server, they provide significant efficiencies—and virtualization is all about improving efficiencies. Administrators apply these optimizations into their templates so they can be replicated again and again to newly provisioned VMs.
The second step could apply to either physical or virtual machines. One of the best practices for moving physical application workloads to virtual machines is to ensure that enough resources are allocated to the virtual machine to provide equal or better performance on a virtual platform. So that you can understand what those resource requirements are, some type of performance metrics need to be collected while the application is still staged in a physical environment. There are professional services engagements as well as automated tools that can help gather this information and translate it into recommendations for virtual machine configuration sizes and even host server configurations.
However those metrics are acquired, the information is vital to properly configuring the virtual machine. Then there are certain applications that seem to have been created for virtualization. Very often web servers, which in the physical world typically each require their own server, can be densely packed onto a single host, because of memory optimization technologies available within certain hypervisors. We'll cover this in more depth in Chapter 8, “Managing Memory for a Virtual Machine.”
18.188.216.249