Hide Forgot
Description of problem: virt-systemprep fails with immutable files. Version-Release number of selected component (if applicable): virt-sysprep 1.24.5 How reproducible: Calling virt-systemprep with an immutable file. Steps to Reproduce: 1. Create a VM, e.g. Centos 6, with a raw disk image for /. 2. Make ~/.ssh/authorized_keys immutable for any user in the image using chattr +i ~/.ssh/authorized_keys. 3. Shut down the vm. 4. Call virt-systemprep on the hard drive image. Actual results: The step fails. Expected results: The process succeeds: with root access, the file could be removed, e.g. with chattr -i. Additional info: - I believe ssh-userdir was the one which causes it to fail. - Note that rm -rf fails here too, even as root.
Link back to the upstream thread that discussed this: https://www.redhat.com/archives/libguestfs/2016-March/thread.html#00104
Actually I've got the same problem with my VMWare exported ova files with an immutable resolv.conf libguestfs error: command_lines: rename: /sysroot/etc/resolv.conf to /sysroot/etc/654d4atl: Operation not permitted
(In reply to Adam Ouadi from comment #2) > Actually I've got the same problem with my VMWare exported ova files with an > immutable resolv.conf > > libguestfs error: command_lines: rename: /sysroot/etc/resolv.conf to > /sysroot/etc/654d4atl: Operation not permitted I have machines with immutable /etc/resolv.conf too -- the best way to stop NetworkMangler etc etc from messing it up. This is certainly a bug.
(In reply to Richard W.M. Jones from comment #3) > This is certainly a bug. Is there any workaround involving no change of my ova files ?
Not as far as I know. It's a bug that needs to be fixed.