Skip to content

Instantly share code, notes, and snippets.

@Fartomy
Last active March 24, 2024 15:44
Show Gist options
  • Save Fartomy/5c88e797cb9aecfa5fd36a4188e52cf4 to your computer and use it in GitHub Desktop.
Save Fartomy/5c88e797cb9aecfa5fd36a4188e52cf4 to your computer and use it in GitHub Desktop.
Another Virtualization in the Container Inside Virtual Machine

🧫 Another Virtualization in the Container Inside Virtual Machine

It may be desired to perform virtualization once again within a virtual machine.
By Qemu-docker.

Requirements

  1. Docker
  2. Maybe docker-compose

Setup

  1. Enable nested virtualize feaure in VMware Workstation Player
    right click corresponding VM --> Settings.. --> Processors --> Virtualize Intel VT-x/EPT or AMD-V/RVI
  2. I redirect to my KVM setup and config gist for install kvm installation
  3. pull qemu-docker
docker pull qemux/qemu-docker
  1. Run the image
docker run -it --rm --name qemu -e "BOOT=https://download.freebsd.org/releases/amd64/amd64/ISO-IMAGES/14.0/FreeBSD-14.0-RELEASE-amd64-bootonly.iso" -p 8006:8006 --device=/dev/kvm --cap-add NET_ADMIN qemux/qemu-docker
  1. Connect to container from on browser
https://<ip_address>:8006

That's it.

Source

  1. Qemu-docker Doc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment