Unable to create docker virtual machine
I was using boot2docker previously and everything was working fine. Now when I upgraded to using Docker Toolbox, I am unable to create a new virtual machine.
I am even unable to import the virtual machine that was used with boot2docker.
I get this error when trying to create a new machine:
C:\Program Files\Docker Toolbox\kitematic\resources\resources\docker-machine.exe -D create -d virtualbox --virtualbox-memory 2048 default returned non zero exit code. Stderr: Converting from raw image file="stdin" to file="C:\Users\disk.vmdk"... Creating dynamic image with size 20971520000 bytes (20000MB)... Error creating machine: exit status 1 You will want to check the provider to make sure the machine and associated resources were properly removed.
And I get this when trying to import the old vm that boot2docker used:’
C:\Users\pmandayam>docker-machine create -d virtualbox --virtualbox-import-boot2 docker-vm boot2docker-vm docker-vm Creating VirtualBox VM... Error creating machine: exit status 1 You will want to check the provider to make sure the machine and associated reso urces were properly removed.
Assistance, is greatly appreciated.
4 Solutions collect form web for “Unable to create docker virtual machine”
I fixed this by reinstalling the Docker Toolbox, make sure you install all the components of the Oracle VM VirtualBox.
I think you have not installed kernel driver.
You can run this:
yum -y install kmod-VirtualBox-$(uname -r) kmod-VirtualBox
yum -y install akmod-VirtualBox kernel-devel-$(uname -r) akmods
systemctl restart systemd-modules-load.service
and you should make sure that your firewall have been stopped.
Installing the latest test build of Virtual Box solved the problem for me!
The correct answer is actually
docker-machine rm DOCKERHOST
DOCKERHOST is the machine name (e.g.
boot2docker-vm in the original post above).