Commit 8787069
committed
guestfs: disable virt-sysprep SELinux relabeling for Fedora on Debian
virt-sysprep attempts automatic SELinux relabeling which fails silently on
non-SELinux hosts like Debian, overwriting the correct labels already applied
by virt-customize to the base image.
The workflow is:
1. virt-builder creates base image (no SELinux labels)
2. virt-customize --selinux-relabel fixes base image (correct labels)
3. cp copies base to root.raw (labels preserved)
4. virt-sysprep tries to relabel root.raw, fails on Debian, creates /.autorelabel
This final step breaks the boot process with the chicken-and-egg problem where
the relabeling service cannot execute due to SELinux blocking unlabeled files.
Add --no-selinux-relabel flag to virt-sysprep when building Fedora guests on
Debian/Ubuntu hosts. This prevents virt-sysprep from attempting relabeling and
preserves the correct labels already applied by virt-customize.
Generated-by: Claude AI
Signed-off-by: Daniel Gomez <[email protected]>1 parent 49b89e3 commit 8787069
1 file changed
+4
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
94 | 98 | | |
95 | 99 | | |
96 | 100 | | |
| |||
0 commit comments