How to speed up virtual machines
How to speed up virtual machines has been a popular topic lately. A group of virtual machines, each machine having its own demands & quirks, can be very ‘hungry’ when it comes to resources. The VM host needs to provide environments (virtual hardware) for multiple operating systems to run simultaneously. If you abide by the following tips & tricks you should be able to make optimal use of your VM host, no matter whether you use Parallels, KVM, VMware, VirtualBox, or another platform.
Make sure that VIA VT, AMD-V or Intel VT-x is enabled.
VIA VT, AMD-V & Intel VT-x are processor extensions from which virtualization benefits. Most modern processors will have support for one of these extensions, but they’re not always enabled by default. Some VM hosts/guests will require you to enable it in the software as well, after enabling it in the BIOS.
Tell your antivirus program to ignore VM guest disk images.
There’s no point for antivirus programs on the VM host to scan the (huge!) disk images of your VM guests. It won’t be able to detect possible virii on a VM guest anyway. Some antivirus programs are smart enough to ignore the disk images of your VM guests automatically, but it doesn’t hurt to exclude them anyway.
(Oh, and do install antivirus on your VM guests! A virtual machine can just as easily get infected as a physical machine.)
Install more RAM in your VM host, and assign it to your VM guests.
The more RAM your VM host has, the smoother it runs. At the very least you should never ever allocate more RAM to your VM guests than your VM host has at its disposal.
To VM guests applies the same as to physical machines: try to meet the recommended system requirements given by the OS manufacturer. Here are some examples:
|Windows 7||1-2 GB|
|Windows 10||1-2 GB|
Use SSD for your VM guests.
This is pretty much a no-brainer: SSD’s are faster than HDD’s. Period.
Use preallocated disks instead of dynamically allocated disks.
Usually, you’ll have the choice between 2 kinds of disks when you create a VM guest: pre-allocated or dynamically allocated disks. If you have the disk space, always go for pre-allocated/fixed. Yes, this will take up more disk space on the host (a 100GB disk for your VM guest will occupy 100GB on the host straight from the get-go), but because all disk space is already allocated there will be less overhead when new files are added on the VM guest because the VM host doesn’t need to allocate more disk space.
Assign more cores/’CPU’s’ to your VM guest.
As an absolute minimum, you should always assign two or more cores/’CPU’ to each VM guest. Only the most ancient operating systems are single core. As soon as manufacturers began developing multicore processors, OS manufacturers began putting these to good use.
The first dual core processor dates back to 2001, so any VM guest with an OS made after that year should have multiple cores allocated.
Tune the video settings of your VM guests.
Some VM hosts, like VirtualBox, have options to enable 2D/3D video acceleration. Be sure to enable these if your VM guests support them.
Install the drivers & tools which come with your VM host.
One of the first things you should do after setting up a new VM guest is installing the tools & drivers which came with the VM host:
The drivers in these packages make your VM guest run more smoothly since they’re made especially by the makers of your virtual ‘hardware’.
Be sure to keep these drivers & tools up to date. It can make a huge difference in performance, especially if your VM guest supports dynamically allocated memory.
Tune your VM guests
Just because they’re virtual machines instead of physical ones doesn’t mean you have to treat them all that different. Just like you would disable certain programs from running at boot to speed up your physical machine, should you also disable these on your virtual machines.
There’s no clear winner when it comes to picking a VM host. Some people swear by VMware, others by VirtualBox, and yet others (including me) prefer a KVM-based host.
If you implement one, more or even all of the above, you will speed up virtual machines.3,933 views