nova-kvm: configure /etc/sysconfig/libvirtd

Adds the --listen option to the /etc/sysconfig/libvirtd file.
This would be required for migrations on distributions that use
this file.

This commit also fixes an issue w/ a21a2e7 where the debian
style file was copied into place on *all* distributions.
We should avoid writing unnecessary files to disk where
possible. As part of this fix the file was moved from being
configured w/ os-config-apply into the install.d. It is unlikely
these files will change often so I think this is Okay...

Change-Id: I3725897744c13184d72475e137ff9267ee5449fc
Closes-bug: #1279356
This commit is contained in:
Dan Prince 2014-02-20 13:24:00 -05:00
parent f154a548c0
commit 8452c82c64
3 changed files with 35 additions and 0 deletions

View File

@ -6,3 +6,14 @@ set -eux
# collision with the network on the seed host machine
rm -f /etc/libvirt/qemu/networks/autostart/default.xml
rm -f /etc/libvirt/qemu/networks/default.xml
SCRIPTDIR=$(dirname $0)
if [ -f /etc/sysconfig/libvirtd ]; then
install -D -g root -o root -m 0755 ${SCRIPTDIR}/default_libvirtd /etc/sysconfig/libvirtd
elif [ -f /etc/default/libvirt-bin ]; then
install -D -g root -o root -m 0755 ${SCRIPTDIR}/default_libvirt_bin /etc/default/libvirt-bin
else
echo "Unsupported libvirtd/libvirt-bin configuration."
exit 1
fi

View File

@ -0,0 +1,24 @@
# Override the default config file
# NOTE: This setting is no longer honoured if using
# systemd. Set '--config /etc/libvirt/libvirtd.conf'
# in LIBVIRTD_ARGS instead.
#LIBVIRTD_CONFIG=/etc/libvirt/libvirtd.conf
# Listen for TCP/IP connections
# NB. must setup TLS/SSL keys prior to using this
LIBVIRTD_ARGS="--listen"
# Override Kerberos service keytab for SASL/GSSAPI
#KRB5_KTNAME=/etc/libvirt/krb5.tab
# Override the QEMU/SDL default audio driver probing when
# starting virtual machines using SDL graphics
#
# NB these have no effect for VMs using VNC, unless vnc_allow_host_audio
# is enabled in /etc/libvirt/qemu.conf
#QEMU_AUDIO_DRV=sdl
#
#SDL_AUDIODRIVER=pulse
# Override the maximum number of opened files
#LIBVIRTD_NOFILES_LIMIT=2048