Quit worrying and love VMs and Containers

Did you ever wake up, look at your development box and wonder "when did that happen"?  I've started using Docker for deployed services like databases, messages brokers etc.  At the same time, I've been trying to use Kali Linux for hackathons and general security work.   Windows gaming, my pathetic mobile efforts and windows docker development are done using Windows 10.  Windows must run under a Hypervisor or as a dual boot. 

That is how you end up with three hypervisors, three operating systems and two docker environments on the same machine. The following diagram shows the underlying complexity of all this.


Hypervisors in action

  • HyperKit on OS/X: Docker for Mac desktop runs docker containers inside a HyperKit virtual machine that leverages the Mac OS/X Hypervisor.framework.  Docker named drives live inside this virtual machine.
  • VMWare Fusion on OS/X: VMWare Fusion can host Windows and Linux virtual machines. Fusion supports nested hypervisors which is one major advantage over Hyper-V.  This lets you run Hyper-V in windows running inside VMWare Fusion. The picture shows a Kali Linux VM and Windows 10.  It is possible to run both at the same time if you have enough cores and memory.  Parallels could substitute for for VMWare in this situation especially if you want DirectX 11 support.
  • Hyper-V in the Windows VM:  Docker for Windows runs best/only in Hyper-V.  Visual Studio mobile development uses Hyper-V to run Android and other mobile virtual machines and emulators.  This makes Hyper-V the virtualization platform of choice unless you enjoy the effort required to bend Docker and VS Studio systems to your will.  It really isn't worth the effort.

Weaknesses

Hardware device support can get confusing with the nested hypervisors.  Kali Linux works best with external network adaptors if they are directly attached.  This means it is sometimes better to use Kali running on bare metal.

Memory and cores can get scarce.  I run a combination of Elasticsearch, Kafka and MongoDB in Docker.  Docker can consume 13GB of memory when I set it at 8GB of container memory in this situation.  I try and run only one docker environment at a time.

Don't want to read?


Change Log

Created 2019-11-29
Last Edited 2019-11-29

Comments

Popular posts from this blog

Installing the RNDIS driver on Windows 11 to use USB Raspberry Pi as network attached

Understanding your WSL2 RAM and swap - Changing the default 50%-25%

Almost PaaS Document Parsing with Tika and AWS Elastic Beanstalk