Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > ebe084c140192657f9094e135a84202c > files > 24

libvirt-0.8.2-29.el5.src.rpm

From fbfe8cdbab9f73148789e259bc184580bf8ddbad Mon Sep 17 00:00:00 2001
Message-Id: <fbfe8cdbab9f73148789e259bc184580bf8ddbad.1283420933.git.jdenemar@redhat.com>
From: Jiri Denemark <jdenemar@redhat.com>
Date: Mon, 30 Aug 2010 16:59:37 +0200
Subject: [PATCH] Disable libvirt-guests on xen host

RHEL-5 xen provides xendomains init script for handling guests on system
shutdown/startup which users are familiar with. To prevent any change in
behavior, libvirt-guests will do nothing if it detects that the default
connection driver is xen.
---
 daemon/libvirt-guests.init.in |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/daemon/libvirt-guests.init.in b/daemon/libvirt-guests.init.in
index f99c070..ca5a638 100644
--- a/daemon/libvirt-guests.init.in
+++ b/daemon/libvirt-guests.init.in
@@ -232,6 +232,12 @@ stop() {
     : >"$LISTFILE"
     for uri in $URIS; do
         echo -n $"Running guests on $uri URI: "
+
+        if [ "x$uri" = xdefault ] && run_virsh uri 2>/dev/null | grep -q xen; then
+            echo $"running on Xen hypervisor, use xendomains to handle its guests"
+            continue
+        fi
+
         list=$(list_guests $uri)
         if [ $? -eq 0 ]; then
             empty=true
-- 
1.7.2.2