Bug 1042780 - Support the virt-sysprep --delete option
Summary: Support the virt-sysprep --delete option
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libguestfs
Version: 7.0
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: rc
: ---
Assignee: Richard W.M. Jones
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-12-13 10:53 UTC by Richard W.M. Jones
Modified: 2015-03-05 13:43 UTC (History)
6 users (show)

Fixed In Version: libguestfs-1.27.56-1.1.el7
Doc Type: Bug Fix
Doc Text:
Clone Of: 1041552
Environment:
Last Closed: 2015-03-05 13:43:17 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:0303 0 normal SHIPPED_LIVE libguestfs bug fix and enhancement update 2015-03-05 17:34:44 UTC

Description Richard W.M. Jones 2013-12-13 10:53:39 UTC
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).

Comment 2 jiyu 2014-10-13 05:43:48 UTC
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.

Comment 4 errata-xmlrpc 2015-03-05 13:43:17 UTC
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


Note You need to log in before you can comment on or make changes to this bug.