Table of contents

  1. 1. Enable Hardware assisted virtualization
    1. 1.1. Enable AMD Secure Virtual Machine (SVM)
    2. 1.2. Enable Microsoft Hyper-V

There are TypeScript projects, such as @nestjsx/crud, which use Docker container images. Docker containers simplify application setups (like databases, caches, etc.) by providing pre-configured images in a virtual environment. Virtualization takes a lot of computing power and can be accelerated by hardware-assisted virtualization.

Enable Hardware assisted virtualization

Intel and AMD have added virtualization extensions to their CPU line-up. According to the CPU used, the virtualization features are named differently: Intel calls it VT-x (Virtualization Technology) and AMD names it SVM (Secure Virtual Machine).

To make use of the virtualization extensions of your CPU, you have to enable these in the BIOS or UEFI of your motherboard and in the settings of your operating system. Docker Desktop will report the following error, if you don’t enable the virtualization features:

An error occurred
Hardware assisted virtualization and data execution protection must be enabled in the BIOS.

Screenshot

Enable AMD Secure Virtual Machine (SVM)

When you have an AMD processor with Zen 2 architecture (i.e. AMD Ryzen 7 3700X), then you can enable SVM on an AMD X570 chipset motherboard (i.e. MSI MEG X570 Unify) the following way:

  1. Turn off your computer
  2. Turn on your computer and when the startup screen appears, press the “Del“ (Delete) key
  3. Press “F7” to switch into the “Advanced Mode“ of “MSI Click Bios 5”
  4. Select the “OC“ (Overclocking) settings
  5. Select “CPU Features
  6. Switch “SVM Mode“ to “Enabled”
  7. Exit the BIOS and save your settings

Screenshot

Enable Microsoft Hyper-V

After enabling hardware-assisted virtualization, you need to activate Hyper-V when using Microsoft Windows (i.e. Microsoft Windows 10 Professional). The Microsoft Hyper-V feature can be activated in the “Control panel” by selecting “Turn Windows features on or off”: