A virtual machine (VM) is defined as a representation of a physical machine by software that has its own set of
virtual hardware on which an operating system and applications can be loaded. With virtualization, each virtual machine is provided with consistent virtual hardware regardless of the underlying physical hardware that the host server runs. Consider your car. Even if you're aware that the car needs oil changes and regular tune-ups, you're much better off if you understand the mechanics. This tip series is designed to help a VMware system administrator better understand the inner workings of a virtual machine, which should help in daily infrastructure management tasks.
When you create a VM, a default set of virtual hardware is assigned to it. You can further customize a VM as shown below by adding or removing additional virtual hardware as needed by editing its configuration.
Most virtual hardware can only be added or removed while the VM is powered off, with the exception of hard disks. The following table contains a list of the virtual hardware that can be added to a VM on a VMware ESX 3.5 host. The table includes the maximum number of devices that a VM can have, as well whether or not you can add, remove or modify the hardware while the VM is powered on or off.
If you choose a virtual device node ID that is not on an existing controller (i.e. 1:0), a new controller will be added. You will only see IDs available for the amount of SCSI controllers that can be added based on the number of free PCI slots. If you only have one NIC in your VM then you can add up to four, if you have two NICs in your VM then you can only add up to three. Virtual device node IDs can also be changed on existing drives when a VM is powered off, just be careful when doing this as it may change your drives around in your operating system and cause the VM to fail during the boot process.
One thing to note about memory is that you can assign a VM more memory than a host physically has present, up to the maximum of 64 GB. For example, a host with 16 GB of memory can have a VM with 32 GB of memory running on it. You might wonder how this is possible. What happens is that a .vswp disk file is created when the VM is powered on equal to the size of memory assigned to the VM (minus any memory reservations). When the VMs use all the physical memory a host has, it starts using the .vswp file on the host for additional memory. Of course there is a big performance penalty when this happens, so if you do over commit memory on your hosts, be careful that you do not exhaust all your physical memory.
Now that we know a VM has virtual hardware, you may want to know what kind of hardware is presented to it by the host server. Below is the hardware that a VM will see on an ESX 3.5 host server. Note that some of the hardware may be slightly different depending on your physical host system hardware and VM operating system. This information was obtained by looking at Windows Device Manager and using System Information utilities as shown below.
System Manufacturer: VMware
BIOS: Phoenix 6.0
Processor: This will vary based on the processor in the host server. AMD hosts will present (an) AMD processor(s) to a VM of the actual type in the host server, and Intel hosts will present (an) Intel processor(s) to a VM of the actual type in the host server. A VM will only see the number of processors that is assigned to it regardless of the amount the host has. Also, all processors presented to VMs are single-core processors, even if the host has multicore processors.
Motherboard: Intel 440BX
Memory: Four memory slots that can be populated with memory of the speed and type (not size) of the memory in the host server. This is not configurable and happens automatically. For example, a VM with 512 MB of memory will typically see one slot configured with a 512 MB DIMM and a VM with 4 GB of memory will typically see two slots configured with 2048 MB DIMMs.
Video controller: VMware Standard VGA Graphics Adapter with 4 MB video memory
CD-ROM: NEC VMware IDE CDR00
Network Controller (NIC): This will depend on the operating system that you choose when configuring the VM. The most commonly used NIC in most 32-bit VMs is based on the AMD PCnet physical NIC and is used with the flexible or vlance adapter types. Additional NICs include ones based on Intel's e1000 (64-bit VMs and 32-bit Vista VMs) and also VMware's own vmxnet (no physical counterpart, used in ESX 2.x).
IDE Controller: Intel 82371 AB/EB PCI Bus Master IDE Controller
SCSI Controller: Can be either an LSI Logic PCI-X Ultra320 or a Buslogic BA80c30 PCI-SCSI MultiMaster depending on the operating system chosen when creating a VM. LSI Logic is the preferred choice and offers better performance. The BusLogic is typically used by older operating systems; you can manually select the SCSI controller type if you choose the Custom wizard type instead of Typical when creating a VM. Additionally, you can change the type later on by editing the VM configuration. Again, you want to be careful because some operating systems do not have both drivers and may not boot when changed.
That covers the hardware that makes up a virtual machine. Stay tuned; in part two of this series we will cover the actual components that make up a VM on an ESX host. The components are the various files that are associated with a VM and are located in the VM's directory on the host.
ABOUT THE AUTHOR: Eric Siebert is a 25-year IT veteran with experience in programming, networking, telecom and systems administration. He is a guru-status moderator on the VMware community VMTN forums and maintains VMware-land.com, a VI3 information site.