[libvirt] [PATCH 1/2] Set default fs driver when not provided in input xml

Deepak C Shetty deepakcs at linux.vnet.ibm.com
Wed Dec 21 05:47:11 UTC 2011

While adding support for fs driver sub-element in virt-manager
(vmm) it throws a python exception/error when one tries to list
fs device (in details window) that has default driver selected.

Root causing that leads to libvirt not setting the default
driver when the input xml does not carry one, which is the case
when user selects default driver in vmm. As part of vmm's
add new fs device flow, libvirt's DefineXML gets called which
does not add the <driver...> sub-element in case of default
fs driver selected in vmm. This patch fixes that.

Signed-off-by: Deepak C Shetty <deepakcs at linux.vnet.ibm.com>

 src/conf/domain_conf.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 4be8fe0..8b89a0b 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -3318,6 +3318,8 @@ virDomainFSDefParseXML(xmlNodePtr node,
                                  _("unknown fs driver type '%s'"), fsdriver);
             goto error;
+    } else {
+        def->fsdriver = VIR_DOMAIN_FS_DRIVER_TYPE_PATH;
     if (source == NULL) {

More information about the libvir-list mailing list