Josh Stone
Josh Stone

Reputation: 4448

How to use kvm in a Centos 6 docker container via docker machine

I'm trying to use kvm in a Centos 6 docker container, via docker machine. My docker machine vm (vmware fusion based) supports nested VMs, but in my docker container I'm seeing:

modprobe kvm
FATAL: Could not load /lib/modules/4.1.12-boot2docker/modules.dep: No such file or directory
modprobe kvm_intel
FATAL: Could not load /lib/modules/4.1.12-boot2docker/modules.dep: No such file or directory

Any idea what I'm missing?

Upvotes: 4

Views: 1994

Answers (3)

methadata
methadata

Reputation: 986

You can use KVM simple container in DockerHub. Source code is available on GitHub and has been tested in DockerHosts with Ubuntu 16.04, Centos 7, Centos-Atomic 7.2 and RancherOS.

Upvotes: 1

nagu
nagu

Reputation: 175

you may need to load the kvm and kvm_intel module on the docker host before trying to run the container

https://github.com/boot2docker/boot2docker/issues/1138#issuecomment-183199287

Upvotes: 1

Slawomir Jaranowski
Slawomir Jaranowski

Reputation: 8517

Docker isn't virtual machine. It is a way to package your application.

So I think that running KVM - Kernel Virtual Machine it is not possible inside docker container.

You can read about difference between Docker and other kind of virtualization on page: https://www.docker.com/what-docker

Upvotes: 2

Related Questions