If you use VMware workstation or VMware Player to host several virtual machines, then this post will be helpful to improve the VM performance. Most of the time, your first few VMs will perform well on a single host computer. Once you keep adding many VMs and powering on them together, then you will see the slowness of virtual machines. Here I show the few tweaks and settings to improve virtual machine performance in VMware.
Most of the users miss configuring the basic requirements for VM to perform well. Few essential elements and settings can be done to improve the performance of a virtual machine. Remember, the performance of VM mainly depends on the physical computer hardware features and capabilities. For example, if you have an old Pentium computer with less RAM, then obviously you can’t have many VMs or even the performance of a single VM going to be poor.
We will assume that you have a latest and decent physical computer, either it can be a laptop or desktop to use several virtual machines. Most of the below steps are applicable on server hardware also, but I assume you do not use VMware workstation or Player on the server hardware.
Improving the performance of a VM in VMware can be done mainly in two ways.
1) Configuring and setting up the Virtual machine properly in VMware
2) Fine-tuning the guest VM in Operating System level such as Windows disk defragmentation, remove startup programs…etc. We are not talking about any guest OS level tweaking in this post.
We will discuss the possible steps you can take in VMware settings or on the host computer to improve virtual machines performance.
Simple Steps to Improve Virtual machine performance in VMware
1) Increase the Hardware Allocation
This is the central part of improving the performance of a slow VM. If a VM is working slow inside VMware, increase the RAM and processor cores. For this to work well, your physical computer should have enough free resources.
If you are serious about running multiple VMs on a single host, even you can upgrade the RAM of the physical computer. Recently I upgraded my desktop computer RAM to 16GB.
2) The hard disk is another main Speed Factor
Hard drive plays a significant role in the performance of a computer, either physical or virtual. It is also applicable here in our scenario when we want to improve the performance of virtual machines.
Here are a few major points:
2.1) Host the VMs on Solid-state drive (SSD). SSD disks greatly improve the I/O performance compared to the standard mechanical hard disk (HDD). To enhance the performance of VM, add a new SSD to your physical computer and move the virtual machines to SSD. You will notice the huge speed improvement of VMs after this.
In my case, I have two dedicated SSD disks, mainly to run VMs in my test lab.
2.2) Keep VMs on the disks which are different from the host OS and another disk I/O hungry programs. Keeping the virtual machine hard disk files on the same C drive (in most of the cases) of the host computer OS is not a good idea. The host computer OS and its application will be accessing the C drive frequently, so it impacts the performance of VM negatively. Always, move the VM hard disk files to a different partition or even the different physical hard disk (if you have more than one physical hard drive).
2.3) Allocate virtual hard disk Space Now
If you frequently transfer data to the guest machine then better to allocate all disk space now. As VMware suggests, allocating the full capacity while creating the VM can enhance the performance, but it requires much physical disk space. Hence, you can configure this option for critical VMs, or you do not have any disk space issue on the physical computer.
If you do not select this option, the virtual hard disk will dynamically expand in real-time whenever you add more data to the VM. It can impact the performance since the virtual hard drive need extend on physical hard disk while the VM is working
3) Install Latest VMware Tools
Have you installed the latest VMware Tools in the workstation or VM Player? VMware tools increase the network speed, display performance and overall working experience inside the virtual machine. Also, it allows smooth file transfer between host and guest, Mouse integration and unity view that will boost the performance.
VMware recommends running a virtual machine in full-screen view to get better performance.
4) Suspend and Use
Instead of shutting down (Power Off) and starting a VM every time, you can Suspend (save the current state) and resume the VM next time. Resuming a VM works faster than starting a virtual machine from the beginning.
5) Defrag the virtual hard disk file
This is not like running defragmentation inside the guest OS, like Windows OS disk tool. This method does the defragmentation of the virtual hard disk file (VMDK) by VMware. If the VM hard disk is having plenty of data and the disk size is keep increasing, it is recommended to defrag the virtual hard drive in VMware console as shown below. It can reduce the degree of fragmentation of particular VMDK disk file and consolidate the free space. This can improve the performance of the VM.
6) Disable CD/DVD and Floppy Drive
Once you have installed the OS from a CD/DVD or ISO file, disconnect the CD/DVD drive from the VMware settings. If you keep it connected and attached, then every time the VM will be trying to access this resource while booting up. Disabling them in VM settings can save some time. It is applicable for the floppy drive also if you attached it earlier.
7) Split Virtual hard disks across different physical disks
If you are going to have several partitions inside the guest VM for a specific application (let’s say, Exchange Server), then usually you partition the guest VM disk. So, the guest VM will have C, D and E (for an example) partitions, but they will be on the same single VMDK file which is located on a single physical hard disk. The idea of splitting virtual hard disk is to add three different hard disk (VMDK) files to particular VM and keep these all three files across multiple physical drives (if it is supported on the host computer).
Then use these three hard disks to make C, D and E drives inside the VM. If you compare the earlier usual method like three partitions from single VMDK file from same physical disk and now 3 partitions from 3 different VMDK files from the various physical drives, your VM and its applications will perform much better.
8) How about 64Bit OS?
If the host computer supports 64bit architecture, then do not install 32Bit OS or software inside guest OS. Install the 64-bit version of OS as guest VM and even the 64-bit versions of applications such as Microsoft Office 64 bit or Adobe Photoshop 64bit inside the guest OS VM. 64Bit guest VMs work well in VMware workstation and VM Player.
9) Access via Remote Display
For me, this helped a lot. I felt comfortable by accessing virtual machines via Windows remote desktop instead of direct console view. Moreover, you can start guest OS in headless mode and access via the remote display from other networked computers. This will reduce the resource load on host and guest machines.
10) From Guest OS
Finally, use the all methods you know to improve guest OS performance from inside the VM. If it is Windows OS, try the all possible ways to make Windows OS faster such as disabling visual effects, remove startup programs, defrag OS disks…..etc.
If the anti-virus on the host computer keeps scanning the files, better give an exception for the virtual hard disk files of VMware. If the Antivirus tries to access, open and scan these VMDK or any relevant files of a VM, it can impact the performance of VM negatively. Giving an exception for the virtual machine folder on the host computer is the ideal way to load the balance between host and guest computers.
I combined all the above steps from my experience and how it worked for me. If you have any more methods to speed up VMs in VMware, share it here. Also, I will be happy to listen from you if these steps work for you.