machine-drivers / docker-machine-driver-qemu Goto Github PK
View Code? Open in Web Editor NEWDocker machine driver for pure qemu/kvm - no libvirt
License: Apache License 2.0
Docker machine driver for pure qemu/kvm - no libvirt
License: Apache License 2.0
$ docker-machine ls
NAME ACTIVE DRIVER STATE URL SWARM DOCKER ERRORS
test0 - qemu Running tcp://127.0.0.1:2376 Unknown Unable to query docker version: Cannot connect to the docker engine endpoint
$ docker -H tcp://127.0.0.1:2376 ps
Cannot connect to the Docker daemon at tcp://127.0.0.1:2376. Is the docker daemon running?
But docker-machine ssh test0 works fine! Thanks! [I installed all with brew, but this package i had built]
x@y:~/dev/docker-guide$ docker-machine create --driver=qemu myvm2
Running pre-create checks...
Creating machine...
(myvm2) Copying /home/x/.docker/machine/cache/boot2docker.iso to /home/x/.docker/machine/machines/myvm2/boot2docker.iso...
(myvm2) Creating SSH key...
(myvm2) Creating Disk image...
(myvm2) OUTPUT:
(myvm2) ERROR: qemu-img: Parameter 'size' expects a non-negative number below 2^64
(myvm2) Optional suffix k, M, G, T, P or E means kilo-, mega-, giga-, tera-, peta-
(myvm2) and exabytes, respectively.
(myvm2)
Error creating machine: Error in driver during machine creation: exit status 1
x@y:~$ qemu-img --version
qemu-img version 2.11.1(Debian 1:2.11+dfsg-1ubuntu7.4)
Copyright (c) 2003-2017 Fabrice Bellard and the QEMU Project developers
It seems that the version of qemu-img Ubuntu 18.04 comes with requires the disk size passed in with the postfix of 'M' instead of 'MB'.
E.g.:
if stdout, stderr, err := cmdOutErr("qemu-img", "resize", d.diskPath(), fmt.Sprintf("+%dM", size)); err != nil {
Seems like we need a v0.1.1
binary built, with some matching lines in the README.md afterwards.
$ curl -L https://github.com/machine-drivers/docker-machine-driver-qemu/releases/download/v0.1.0/default.docker-machine-driver-qemu-$(uname -s)-$(uname -m) > docker-machine-driver-qemu
$ sudo cp docker-machine-driver-qemu /usr/local/bin/docker-machine-driver-qemu
$ sudo chmod 755 /usr/local/bin/docker-machine-driver-qemu
Not sure where that "default" came from last time, but we should probably try to get rid of it if we can ?
Will also fix #2
This driver works fine in Windows with Boot2docker but I can't get this working with Rancher. The example presented here uses cloud-config.yml but I have no idea about what to place in it and where this must be. Maybe that simply this cannot run in Windows?
The current release is out of date and does not contain an important bug fix #6 .
Please consider adding a CI file to automatically update the release. :-)
@SvenDowideit: This looks like exactly what I'm looking for to get qemu working with docker. How do you install? I assume make
then make install
? With that said, I tried and didn't have any success. :)
Make it work on windows also ? I tried it but got defeated by it . The main problem is the process not detaching properly , resulting in a blockage , otherwise it should work . Also modified some .network stuff to not throw errors anymore .
Do you think this is possible ? Thanks ...
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.