diff --git a/virt-manager.changes b/virt-manager.changes index 93571ca1..85275a5c 100644 --- a/virt-manager.changes +++ b/virt-manager.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Tue Jan 18 11:21:29 MST 2011 - carnold@novell.com + +- bnc#657272 - virt-manager creates default 'dir' storage pool in + /var/lib/libvirt/images on xen host + virtman-storage-pool.diff + ------------------------------------------------------------------- Fri Jan 7 16:31:05 MST 2011 - carnold@novell.com diff --git a/virt-manager.spec b/virt-manager.spec index b46f64a7..5f68a37d 100644 --- a/virt-manager.spec +++ b/virt-manager.spec @@ -1,5 +1,5 @@ # -# spec file for package virt-manager +# spec file for package virt-manager (Version 0.8.5) # # Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. # @@ -51,6 +51,7 @@ Patch58: virtman-keycombo.diff Patch59: virtman-autoconnect.diff Patch60: virtman-device-flags.diff Patch61: virtman-autorestart.diff +Patch62: virtman-storage-pool.diff Patch81: virtinst-cdrom.diff Patch82: virtinst-storage-ocfs2.diff ExclusiveArch: %{ix86} x86_64 @@ -146,6 +147,7 @@ Authors: %patch59 -p1 %patch60 -p1 %patch61 -p1 +%patch62 -p1 pushd $RPM_BUILD_DIR/%{virtinst_name} %patch81 -p1 %patch82 -p1 diff --git a/virtman-storage-pool.diff b/virtman-storage-pool.diff new file mode 100644 index 00000000..0e289641 --- /dev/null +++ b/virtman-storage-pool.diff @@ -0,0 +1,51 @@ +When connecting to a xen host, create default dir storage pool +in /var/lib/xen/images instead of /var/lib/libvirt/images. + +Index: virt-manager-0.8.5/src/virtManager/connection.py +=================================================================== +--- virt-manager-0.8.5.orig/src/virtManager/connection.py ++++ virt-manager-0.8.5/src/virtManager/connection.py +@@ -1144,7 +1144,8 @@ class vmmConnection(gobject.GObject): + else: + # Try to create the default storage pool + try: +- util.build_default_pool(self.vmm) ++ util.build_default_pool(self.vmm, \ ++ self.config.get_default_image_dir(self)) + except Exception, e: + logging.debug("Building default pool failed: %s" % str(e)) + +Index: virt-manager-0.8.5/src/virtManager/util.py +=================================================================== +--- virt-manager-0.8.5.orig/src/virtManager/util.py ++++ virt-manager-0.8.5/src/virtManager/util.py +@@ -31,9 +31,8 @@ import virtManager + import virtinst + + DEFAULT_POOL_NAME = "default" +-DEFAULT_POOL_PATH = "/var/lib/libvirt/images" + +-def build_default_pool(conn): ++def build_default_pool(conn, path): + """ + Helper to build the 'default' storage pool + """ +@@ -54,15 +53,15 @@ def build_default_pool(conn): + + try: + logging.debug("Attempting to build default pool with target '%s'" % +- DEFAULT_POOL_PATH) ++ path) + defpool = virtinst.Storage.DirectoryPool(conn=conn, + name=DEFAULT_POOL_NAME, +- target_path=DEFAULT_POOL_PATH) ++ target_path=path) + newpool = defpool.install(build=True, create=True) + newpool.setAutostart(True) + except Exception, e: + raise RuntimeError(_("Couldn't create default storage pool '%s': %s") % +- (DEFAULT_POOL_PATH, str(e))) ++ (path, str(e))) + + def get_ideal_path_info(conn, config, name): + path = get_default_dir(conn, config)