The kickstart version of virt-p2v has SELinux disabled, so this is at
least consistent.  Mainly it avoids the very long relabel when the
disk boots first time.
---
 p2v/virt-p2v-make-disk.in | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/p2v/virt-p2v-make-disk.in b/p2v/virt-p2v-make-disk.in
index d0ff7bc..6e5bdac 100644
--- a/p2v/virt-p2v-make-disk.in
+++ b/p2v/virt-p2v-make-disk.in
@@ -152,9 +152,10 @@ EOF
 latest_version="$(cd /lib/modules; ls -1vr | head -1)"
 dracut -f --kver $latest_version
 EOF
-        # Double quotes because we want $tmpdir to be expanded:
+        # Double quotes because we want $tmpdir to be expanded.
+        # Disable SELinux for consistency with virt-p2v-make-kickstart.
         extra_args="
-          --selinux-relabel
+          --edit /etc/selinux/config:s/^SELINUX=.*/SELINUX=disabled/g
           --upload $tmpdir/p2v.conf:/etc/dracut.conf.d/
           --run $tmpdir/post-install
         "
-- 
2.7.4

_______________________________________________
Libguestfs mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/libguestfs

Reply via email to