It might seem odd at this stage to have section introducing virtual machines. Ideally, this something you already know something about – or else why would you be here? But its perhaps worthwhile taking a little history lesson about the development of the virtual machine since VMware became to gain mass recognition in the 2003/4 period. Back then the hardware capabilities of the VM were more modest. The maximum number of vCPUs was just two, and the maximum amount of memory was just 3GB. On the virtual disk side of the house, the VMDK maximum size was a merely 2TB. Fast forward to the current period the scale of the VM has increased massively – to the degree that the only barrier to virtualization is whether it is economic. Nowadays, a VM can have up to 64 vCPUs, 1TB of RAM, and 62TB virtual disks. Advancements have also introduced the ability to give the VM direct access to hardware, where IO performance demands require it.
Upload Operating System ISOs to a Datastore (Web Client)
Perhaps the most common way of installing a Guest Operating System to a VM is using the original CD-ROM/DVD .iso that is used to distribute it. Being able to download .ISO images of Operating Systems has become the norm in the period of high bandwidth internet, and certainly beats having to order physical media deliveries. A VM can optionally boot to PXE, and therefore other OS deployment tools are available such as the Ultimate Deployment Appliance (UDA), Windows Deployment Services and third-party tools. However, it remains the case that most virtualization admins use a DVD .iso
1. In the Web Client browse to >>Storage, Select the datastore, and Manage tab
2. Select the File column
3. Click the Datatore icon with the “up arrow” to upload a file
4. Browse to the .ISO image and click OK
Note: You can watch the progress of the upload from the bottom of the Web Client datastore view
Creating a Virtual Machine (Web Client)
Creating a virtual machine is as simple as following a wizard and answering the configuration options. This requires knowing what resources your VM will need for its applications. This is difficult to know upfront, so most virtualization administrator initially specify quite small resources allocations initially. This is because its always easier to grant more resources if they are needed, than try to reclaim unused resources from a disgruntled application owner. Application owners being what they are will always demand more resources than they will potentially need under normal conditions. Often they are following guidelines from the software vendor or from past experience in the physical world – where the specification was excessive and limited by the inflexibility of physical servers. Some virtualization administrators build VMs based on different sizes – small, medium, large, x-large with progressively more and more vCPU and memory allocated. At the very least the first VM with a given OS is likely to act as the template or “Gold Master” for all subsequent VMs made of that type.
Creating a Virtual Machine
1. The New Virtual Machine wizard can be invoked in almost any part of the vCenter inventory. A logical place to begin might be either which Host/Cluster you wish to run on, or in which VM folder you would like it reside. A right-click will expose the New Virtual Machine option in the menu like so:
2. The New Virtual Machine wizard exposes a number of different ways of creating a new VM including – however, for them to all to be available you must initially Create a new virtual machine to enjoy the benefits of cloning and templates.
3. Next type in a name for the VM, as this is going to be our “source” VM for templates, we have opted to use a generic name “Win2012R2”. Select a VM folder location for the VM.
Note: The VM’s name can be 80 characters long and must be unique to its folder location. Many virtualization administrator opt to use the same name as the hostname or NETBIOS name. If this is the case for you, remember that NETBIOS names are limited 15 characters.
4. Next select a Host/Cluster/Resource Pool for the location of the VM. A compatibility check will take place to confirm that the Host/Cluster/Resource Pool has the neccessary features to allow the VM to function
Note: Clusters and Resource Pools will be covered later. They are included here for virtualization admins working in environments where clusters and resource pools have already been created.
5. Next select a datastore location for the VM. In this case we selected the datastore that will be used to hold our current templates.
Note: Storage Policies are way of classifying storage by different capabilities, and assists the administrator select the right type of storage for the VM’s needs. These policies will be covered later.
6. Next select a compatibility level for the VM. Virtual Machine come with hardware or “compatibility levels” which define their functions. This often closely tied to the edition of VMware ESX that you are running. The most current level if 10 which is only available on VMware ESX 5.5 or higher. It is possible to run older editions of VMware ESX with vCenter 5.5, and as such you may need to select the right “compatibility level” to suit the generation of VMware ESX host software you are currently running.
7. Next select the Guest OS Family (Windows, Linux, Other), together with the version of OS within that family. VMware vSphere boast one of the largest array of guest operating systems, including ones not even supported by the vendors. This makes it a great choice for running legacy applications that cannot be ported to new operating systems. Setting the correct Family/OS type is important as this controls what type of “VMware Tools” is installed, and can also influence the defaults and settings made available to the VM.
8. The Customize Hardware page presents many, many options for greater changes. The most important/popular ones will be covered later. For now the focus should be on ensuring the that the right number of CPU, Disk Type and Network is correctly configured
Under >CPU select the right number of vCPUs for your workload
Expand >New Hard Disk – notice that the default creates a full-allocated “Thick Provision Lazy zeroed disk”. This means that 40GB virtual disk will take up 40GB of actual disk space despite there being only 7GB of actually data consumed. Thin Provisioned disks are much more space efficient. Although 40GB in size, the on disk penalty will be the actual amount of disk space consumed within the guest operating system
Expand >New Network – and select which portgroup/VLAN us wish to use, and change the Adapter Type to be VMXNET3. Many guest operating systems support different types of network adapter types. VMXNET3 is specific to VMware, and requires the “VMware Tools” package to be installed to Windows for it to work. It offers the best performance. The adapter types are there for backwards compatibility (VMXNET2) or general compatibility (e1000) or to grant the VM direct access to physical hardware (SR-IOV)
Note: Portgroups on Standard Switch present themselves as just text label
Note: Whereas portgroups on Distributed Switches present both the portgroup name, but also the Distributed Switch name. Optionally, its possible assign specific port number on the Distributed Switch rather than using methods that automatically allocate ports.
9. Next to >New CD-Rom Device, from the pull-down list select Datastore ISO and browse to the datastore that holds your .ISO images.
10. Next, ensure the CD-Rom Device is Connected and Connected at Power On
11. Finally click Next and Finish to complete the creation of the VM.
First Power on and Remote Console
At first power on the VM’s BIOS settings default to CD-ROM first, with subsequent power on’s this is placed a lower priority in the VM’s boot order. So as long as you attach a bootable DVD .ISO and ensure the CD-ROM Device is connected then – at first power on the VM should boot from the ISO.
1. Right-Click the VM, and select Power On
2. To open a Remote Console window on a VM, right-click and select Open Console or Launch Console from the VMs Summary tab.
This should launch a separate tab in your Web Browser showing the console of the VM. You can send the Control+Alt+Delete keystoke to the VM using the provided button, and toggle from Window to Full-Screen. The keystoke Ctrl+Alt can be used to release the keyboard and mouse focus from the VM, if you need to interact with your local desktop or move back to the Web Client. Despite this ILO/DRAC/RAC style access to the VM most administrator enabled SSH to allow administrative access to Linux VMs and Microsoft Remote Desktop Protocol for Windows VMs. In virtual desktop environments the PCoIP Protocol is enabled and the Horizon View client used to access the desktop for best performance and functionality.
From this point onwards the installation of the operating system happens – as is – without modification.