Bug 1302678

Summary: When updating the centos-7.2 image, the boot is broken
Product: [Community] Virtualization Tools Reporter: David Caro <dcaroest>
Component: libguestfsAssignee: Richard W.M. Jones <rjones>
Status: CLOSED DUPLICATE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: dcaroest, eedri, ptoscano, rbalakri
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-01-28 12:04:17 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description David Caro 2016-01-28 11:35:11 UTC
Description of problem:

If you update the centos-7.2 image when building it:

  virt-builder centos-7.2 --update

Then the image does not boot properly complaining about selinux denying access to /dev/vda3.

You can work around it by setting selinux as permissive for the first boot, and then relabeling the root dir, then setting selinux as enforcing does not break the boot process anymore.

Version-Release number of selected component (if applicable):
libguestfs-1.32.0-1.fc23.x86_64
libguestfs-tools-c-1.32.0-1.fc23.x86_64

How reproducible:

virt-builder centos-7.2 --update
Then try booting that disk

Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Richard W.M. Jones 2016-01-28 11:42:51 UTC
Can you try adding the --selinux-relabel flag to the command line.

Comment 2 David Caro 2016-01-28 12:02:28 UTC
Due to https://bugzilla.redhat.com/show_bug.cgi?id=1049656 that does not work, but as it's suggested there (and you told me by irc): 

 --edit '/usr/lib/systemd/system/rhel-autorelabel.service: $_ = "" if /StandardInput=tty/'

Works like a charm :)

Comment 3 Richard W.M. Jones 2016-01-28 12:04:17 UTC
OK let's mark this as another duplicate of that systemd bug.

*** This bug has been marked as a duplicate of bug 1049656 ***