[Ovirt-devel] [PATCH] Fix so libvirt does not start default network interface on developer/bundled

Perry Myers pmyers at redhat.com
Fri May 23 18:15:43 UTC 2008


Libvirt by default tries to create a private network for running guests.
Because on the bundled/developer install we use dnsmasq ourselves, this
conflicts with the default libvirt network.  Solution is that the appliance
must always be configured (via kickstart) to not start libvirtd.  Then
when the ovirt install script runs it removes default.xml and starts
libvirt up.

Signed-off-by: Perry Myers <pmyers at redhat.com>
---
 wui/scripts/ovirt-wui-install |   23 ++++++++++++++++-------
 1 files changed, 16 insertions(+), 7 deletions(-)

diff --git a/wui/scripts/ovirt-wui-install b/wui/scripts/ovirt-wui-install
index 41b4f3d..423bb87 100755
--- a/wui/scripts/ovirt-wui-install
+++ b/wui/scripts/ovirt-wui-install
@@ -17,6 +17,13 @@ OVIRT_SVCS="ovirt-host-browser ovirt-host-status \
             ovirt-taskomatic ovirt-host-keyadd ovirt-mongrel-rails"
 ENABLE_SVCS="ntpd httpd postgresql libvirtd"
 
+# This checks to see if we're running on a bundled/developer install.
+# If we are, set PROD_INST to false
+PROD_INST=true
+if [ "$(hostname)" == "management.priv.ovirt.org" ]; then
+    PROD_INST=false
+fi
+
 usage() {
     echo "usage: $0 [-p password]"
     echo "  -p : password to use for database connections, if omitted"
@@ -27,13 +34,7 @@ usage() {
 find_srv() {
     local dnsreply
     
-    # This checks to see if we're running on a bundled/developer install.  
-    # If so, the server queried is localhost instead of using resolv.conf.  
-    if [ "$(hostname)" == "management.priv.ovirt.org" ]; then
-        local server_flag=@localhost
-    fi
-
-    dnsreply=$(dig $server_flag +short -t srv _$1._$2.$(dnsdomainname))
+    dnsreply=$(dig +short -t srv _$1._$2.$(dnsdomainname))
     if [ $? -eq 0 ]; then
         set _ $dnsreply; shift
         SRV_HOST=$4; SRV_PORT=$3
@@ -118,6 +119,14 @@ if [ `egrep -c '^mech_list: gssapi' $SASL_FILE` -eq 0 ]; then
     echo "mech_list: gssapi" >> $SASL_FILE
 fi
 
+# if we are developer/bundled install, remove default network
+# so dnsmasq from libvirt doesn't interfere with the dev/bundled
+# dnsmasq
+if [[ "$PROD_INST" == "false" ]]; then
+    rm -fv /etc/libvirt/qemu/networks/autostart/default.xml
+    rm -fv /etc/libvirt/qemu/networks/default.xml
+fi
+
 service postgresql stop > /dev/null 2>&1
 service postgresql initdb > /dev/null 2>&1
 echo "local all all trust" > /var/lib/pgsql/data/pg_hba.conf 
-- 
1.5.4.5




More information about the ovirt-devel mailing list