Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move image to alpine? #2

Open
pwFoo opened this issue Oct 4, 2016 · 4 comments
Open

Move image to alpine? #2

pwFoo opened this issue Oct 4, 2016 · 4 comments
Assignees
Milestone

Comments

@pwFoo
Copy link

pwFoo commented Oct 4, 2016

Could be easy to do and reduce the image size?

Tested qemu kvm with a simple alpine container

docker run --rm -ti --name kvm --cap-add NET_ADMIN -v /path-to-my-qcow2.img:/image/image.qcow2 --device /dev/kvm:/dev/kvm alpine sh
apk -U add qemu-system-x86_64 qemu bridge-utils dnsmasq

qemu-system-x86_64 -enable-kvm -cpu host -m 1024 -curses -drive file=/image/image.qcow2,format=qcow2,cache=none -usb -usbdevice tablet
@methadata methadata added this to the 1.0 milestone Oct 4, 2016
@methadata methadata self-assigned this Oct 4, 2016
@methadata
Copy link
Collaborator

Thank you for your feedback, pwFoo!

I have this in the roadmap, and I will move the image to a minimal container ASAP.

@pwFoo
Copy link
Author

pwFoo commented Oct 4, 2016

Great! :)

Tested it with the followin modifications.

dockerfile

FROM    alpine:latest

ENV     container docker

RUN     apk -U --no-cache add qemu qemu-system-x86_64 bridge-utils bash dnsmasq && rm -rf /var/cache/apk/*

COPY    startvm /usr/local/bin/startvm

RUN     chmod u+x /usr/local/bin/startvm \
        && mkdir /etc/dnsmasq.d

VOLUME  /image

ENTRYPOINT ["/usr/local/bin/startvm"]
CMD []

startvm

+   -machine accel=kvm,usb=off \
-    -machine rhel6.0.0,accel=kvm,usb=off \

@pwFoo
Copy link
Author

pwFoo commented Oct 5, 2016

kvm                                           latest              b7b1e0370df3        19 minutes ago      42.31 MB
bbvainnotech/kvm                              latest              3076a53caa13        2 hours ago         319.2 MB

methadata pushed a commit that referenced this issue Oct 5, 2016
methadata pushed a commit that referenced this issue Oct 6, 2016
@methadata
Copy link
Collaborator

methadata commented Oct 7, 2016

Reopened due to networking issues with Alpine container.

Master branch will still be built with Centos until everything is solved. After that, Alpine branch will be merged.

Some debug info for future investigation:

  • Centos container: QEMU emulator version 1.5.3 (qemu-kvm-1.5.3-105.el7_2.7)
  • Alpine container: QEMU emulator version 2.5.1

@methadata methadata reopened this Oct 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants