File remove-duplicate-btrfs-roots.patch of Package virt-v2v

When the guest is using btrfs on the root filesystem, duplicate root devices
will be detected. If this happens, strip out the 'btrfsvol' version, and use
the standard partition entry.

Index: virt-v2v-0.9.1/v2v/virt-v2v.pl
===================================================================
--- virt-v2v-0.9.1.orig/v2v/virt-v2v.pl
+++ virt-v2v-0.9.1/v2v/virt-v2v.pl
@@ -693,6 +693,14 @@ sub inspect_guest
 
     @roots = sort @roots;
 
+    # If using btrfs, it is possible to have the same partition listed using
+    # two different names (e.g. '/dev/sda2' and 'btrfsvol:/dev/sda2/@').
+    # In this case, filter out the duplicate 'btrfsvol' entry.
+    if ((@roots == 2) && ("btrfsvol:$roots[0]/@" eq "$roots[1]")) {
+        @roots = grep(/^btrfsvol/, @roots);
+    }
+
+
     my $root_dev;
 
     if(@roots == 0) {