Red Hat Bugzilla – Bug 1317180
virt-sysprep fails with immutable files
Last modified: 2016-09-20 03:35:08 EDT
Description of problem:
virt-systemprep fails with immutable files.
Version-Release number of selected component (if applicable):
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.
The step fails.
The process succeeds: with root access, the file could be removed, e.g. with chattr -i.
- 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:
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.