ยท hands on
Docker Desktop: Hardware assisted virtualization
Docker containers make it easier to set up applications by providing pre-configured images in a virtual environment. To use virtualization extensions on your CPU, like Intel's VT-x or AMD's SVM, you need to enable them in your BIOS or UEFI settings.
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.
Contents
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:
- Turn off your computer
- Turn on your computer and when the startup screen appears, press the "Del" (Delete) key
- Press "F7" to switch into the "Advanced Mode" of "MSI Click Bios 5"
- Select the "OC" (Overclocking) settings
- Select "CPU Features"
- Switch "SVM Mode" to "Enabled"
- 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":
Run Linux
Once Hyper-V is enabled, you can easily run Linux distributions on Windows using the Windows Subsystem for Linux (WSL 2):