[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Libguestfs] [PATCH 5/6] Converter: Remove disk driver elements other than 'qemu'



QEMU only currently supports the qemu storage driver in libvirt. Remove any
other driver element.
---
 lib/Sys/VirtV2V/Converter.pm |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/lib/Sys/VirtV2V/Converter.pm b/lib/Sys/VirtV2V/Converter.pm
index 4b11efd..edc6589 100644
--- a/lib/Sys/VirtV2V/Converter.pm
+++ b/lib/Sys/VirtV2V/Converter.pm
@@ -436,6 +436,13 @@ sub _unconfigure_hvs
         $emulator->getParent()->removeChild($emulator);
     }
 
+    # Remove any disk driver element other than 'qemu'
+    foreach my $driver
+        ($dom->findnodes('/domain/devices/disk/driver[ name != \'qemu\']'))
+    {
+        $driver->getParentNode()->removeChild($driver);
+    }
+
     _unconfigure_xen_metadata($dom, $default_dom);
 }
 
-- 
1.6.6


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]