📜 ⬆️ ⬇️

Some features of using virtual machines for beginners

Virtual machines, such as Virtualbox, are used to emulate virtual hardware and run multiple operating systems on a computer. The better your CPU will be and the more RAM you have, the faster your virtual machines will run on your computer.
I offer a few tips that will help you save time during initial setup of virtual machines. It will be useful to work with virtual machines VirtualBox, VMware, Parallels, or any other.



Be sure to install the additions of the guest OS VirtualBox or VMware Tools


After installing the guest operating system in a virtual machine, the first thing to do is to install the virtual machine software - “Guest OS add-ons for VirtualBox” or VMware Tools for VMware. ”These packages include special drivers that will help your guest operating system work faster on using the hardware of your main machine.

Installing the package is simple - in VirtualBox, after loading the guest operating system, click the Devices menu button and select “Install Guest Additions”. If you are using VMware, select “Install VMware Tools” in the Virtual Machine menu. Follow the on-screen instructions to complete the installation — if you are using Windows as a guest operating system, it will be similar to installing any other application.

')
Make sure you have the latest version of Guest Additions - if you see a notification that an update is available for Guest Additions or VMware Tools, you should install it.

Creating a fixed disk size during initial setup


When creating a virtual machine, you can create two different types of virtual disks. By default, the program usually suggests using dynamically allocated disks that grow, along with the occupied space of the guest OS.

For example, if you create a new virtual machine with a dynamically allocated disk with a maximum size of 30 GB, it will not take up to 30 GB of hard disk space immediately. After installing the operating system and programs, the disk can only take up to 10 GB. As you add files to a virtual disk, it will expand to a maximum size of 30 GB.

This can be convenient - each virtual machine will not unnecessarily take up much space on your hard disk. However, this is slower than creating a fixed-size disk (a disk with a pre-allocated space). When creating a fixed-size disk, all 30 GB will be occupied immediately on your computer.

There is a trade-off - a fixed disk size takes up more space on the hard disk, but it works faster with a virtual hard disk. You will also get rid of file fragmentation - the place will be occupied by a large block instead of adding smaller pieces over the whole disk.


Exclude the directory of virtual machines in your antivirus


Your antivirus can scan virtual machine files when they are accessed, reducing performance. Anti-Virus will not be able to detect a virus inside a virtual machine running on your guest operating system, so this check only hurts.

To speed up the process, you can add your virtual machine directory to the list of exceptions of the anti-virus author. Once it is listed, your antivirus will ignore all files in this directory.


Allocate more memory


Virtual machines love a lot of virtual memory. Microsoft recommends 2 GB of RAM for 64-bit Windows 7, and this recommendation applies to Windows 7 x32 when running in a virtual machine. If you are running large applications in a virtual machine, you can allocate more than 2 GB of RAM.

You can allocate more RAM in the settings dialog of your virtual machine (the virtual machine must be turned off to do this). If your computer does not have enough memory to work comfortably with the virtual machine, you may notice a very large decrease in computer performance when using the page file on the hard disk.


Highlight more processors


If you have a computer with multiple processors or cores, you can select additional processors for your virtual machine from the VM settings window. A VM with a dual-core (or quad-core) processor will respond more quickly.

If you are going to install the MS-Windows OS and in the future so that you can use more cores during the installation, specify 2 cores in order to install the correct HAL, after installation you can turn off the machine and set 1 default core for everyday use. But for the future, you can always add kernels without uninstalling the OS. Linux VM can dynamically detect any number of kernels when booting an OS.


Adjust video settings


Tweaking video settings and allocating more video memory will also help improve the speed of your virtual machine. For example, enabling 2D acceleration in VirtualBox improves video playback in virtual machines; enabling 3D acceleration will allow you to use some 3D applications.


By and large, you need to minimize the use of 3D, such as Windows 7 - by disabling Aero.

Ensure that Intel VT-x or AMD-V features are enabled.


Intel VT-x and AMD-V are special processor extensions that improve the speed of virtualization. Newer Intel and AMD processors usually include these features. However, some computers do not automatically turn on VT-x or AMD-V — you will need to enable this setting in your computer's BIOS.

To determine if your Intel processor supports the Intel VT extension, use the utilities that show system information. If your processor supports this feature, but the option is not available in your virtual machine, you must enable this feature in your computer's BIOS. This option is usually enabled by default in motherboards with AMD processors.


Put the virtual machine files on another disk


Disk performance may limit the speed of your virtual machine. Placing the virtual machine files on a separate physical disk or not on the system disk can improve performance. Your virtual machine and system will not be competitively read and write from a single disk.


However, you should not start a virtual machine from an external disk (USB) - this will be much slower.

Some more helpful tips.


  1. Allocating additional processors is rarely a good idea. Use 1 CPU for desktop OS.
  2. Try not to use graphical hypervisors for server OS.
  3. Do not allocate working VMs More cores than are on your computer.

Source: https://habr.com/ru/post/167953/


All Articles