Get to a functional nova-libvirt start

Get a working Dockerfile
Sort out start.sh to run libvirt in a container

Change-Id: Iaafe807b1631ad59fea200a02e46a8cabd6791ca
This commit is contained in:
Steven Dake 2014-10-07 11:20:26 -07:00
parent 6dbd9c470a
commit 727d8d139c
2 changed files with 26 additions and 3 deletions
docker/nova-compute/nova-libvirt

@ -1,8 +1,20 @@
FROM kollaglue/fedora-rdo-base
MAINTAINER Steven Dake <sdake@redhat.com>
RUN yum -y install libvirt \
libvirt-daemon-kvm && yum clean all
RUN yum -y install libvirt-daemon-driver-* libvirt-daemon libvirt-daemon-kvm qemu-kvm && yum clean all
EXPOSE 16509
RUN echo "listen_tls = 0" >> /etc/libvirt/libvirtd.conf; \
echo 'listen_tcp = 1' >> /etc/libvirt/libvirtd.conf; \
echo 'tls_port = "16514"' >> /etc/libvirt/libvirtd.conf; \
echo 'tcp_port = "16509"' >> /etc/libvirt/libvirtd.conf; \
echo 'auth_tcp = "none"' >> /etc/libvirt/libvirtd.conf
RUN echo 'LIBVIRTD_ARGS="--listen"' >> /etc/sysconfig/libvirtd
RUN mkdir -p /var/lib/libvirt/images/
VOLUME [ "/sys/fs/cgroup" ]
ADD ./start.sh /start.sh
CMD ["/start.sh"]

@ -1,2 +1,13 @@
#!/bin/sh
# placeholder for libvirt startup script
/bin/chmod 666 /dev/kvm
echo "Starting guests."
/usr/libexec/libvirt-guests.sh start
echo "Starting virtlockd."
/usr/sbin/virtlockd &
sleep 3
echo "Starting libvirtd."
exec /usr/sbin/libvirtd --listen