Description of problem: I am using virt-builder to build a CentOS Guest. I enabled selinux relabel but it's not working properly. /etc/resolv.conf ends up with an etc_t label; while it should have a net_conf_t label. Version-Release number of selected component (if applicable): libguestfs-tools-c-1.26.5-1.fc20.x86_64 How reproducible: First remove lines 34-36 on https://github.com/renich/gce-images-centos/blob/master/virt-builder/setup Then, build with (until line 80): https://github.com/renich/gce-images-centos/blob/master/virt-builder/build Actual results: My /etc/resolv.conf has the wrong label.
This is the same as bug #1089100, and it is now being marked as duplicated of it. As a workaround, you should be able to get proper SELinux labels by using virt-customize with no network, i.e.: $ virt-customize --selinux-relabel --no-network -a yourimage *** This bug has been marked as a duplicate of bug 1089100 ***