Hide Forgot
Upstream virt-sysprep has a --delete option which lets you delete arbitrary paths, files and globs, so giving you pretty much ultimate flexibility. This would avoid requests for specific files (see eg. RHBZ#1041552).
Verified with libguestfs-1.27.62-1.1.el7.x86_64 Steps to verify: 1. Start the guest image and create file . [host] #qemu-kvm -m 1024M -smp 4 -drive file=$PWD/RHEL-Server-6.6-64-20140926.0-hvm.raw -vnc :0& [guest] #touch /root/test [guest] #shutdown -h now 2. Use virt-sysprep with option --delete [host] #virt-sysprep --delete /root/test -a RHEL-Server-6.6-64-20140926.0-hvm.raw 3. Start the guest image again and check the /root/test file. [host] #qemu-kvm -m 1024M -smp 4 -drive file=$PWD/RHEL-Server-6.6-64-20140926.0-hvm.raw -vnc :0& [guest] #ll /root/ total 0 The file /root/test was deleted successfully, so the new feature works well.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHBA-2015-0303.html