Bug 1362669
| Summary: | Backport improved --selinux-relabel support for virt-sysprep, virt-builder, virt-customize | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Richard W.M. Jones <rjones> |
| Component: | libguestfs | Assignee: | Richard W.M. Jones <rjones> |
| Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 7.3 | CC: | ptoscano, xchen |
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | libguestfs-1.32.6-4.el7 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2016-11-03 18:03:14 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
Richard W.M. Jones
2016-08-02 19:53:10 UTC
How to test:
$ virt-builder fedora-23 \
--install "@Xfce Desktop" --update --root-password password:123456 --selinux-relabel
$ guestfish --ro -a fedora-23.img -i
Using guestfish check that /.autorelabel is *not* created.
$ virt-install --import --name test --ram 2048 --disk path=fedora-23.img,format=raw --os-variant fedora23
When it boots for the first time, ensure that services start up
correctly (not lots of "FAIL" lines or other errors during boot), and
ensure it does *not* reboot automatically because of autorelabel.
Inside the guest:
* You can log in as root (password: 123456).
* SELinux should be enforcing.
X11 should probably work too, but I cannot get it to start. I think I'm
missing some packages, and it's not a SELinux error.
Verified with packages:
libguestfs-1.32.7-1.el7.x86_64
Verify steps:
1. Create a new guest image: fedora-22.img
# virt-builder fedora-22 --install "@Xfce Desktop" --update --root-password password:123456 --selinux-relabel
2.
# guestfish --ro -a fedora-22.img -i
><fs> ls /
Check that /.autorelabel is *not* created
3. Start the guest image:
# virt-install --import --name test --ram 2048 --disk path=fedora22.img,format=raw --os-variant fedora22
# virsh list --all
Id Name State
----------------------------------------------------
12 test running
# virsh console 12
4. Log into the guest use root , password is 123456
# cat /var/log/boot.log
Check the /var/log/boot.log that services start up correctly (not lots of "FAIL" lines or other errors during boot), and ensure it does *not* reboot automatically because of autorelabel.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHSA-2016-2576.html |