Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 907390

Summary: Error occurs after change selinux from static to dynamic on virt-manager
Product: Red Hat Enterprise Linux 7 Reporter: tingting zheng <tzheng>
Component: virt-managerAssignee: Martin Kletzander <mkletzan>
Status: CLOSED CURRENTRELEASE QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.0CC: cwei, dallan, lcui, mjenner, mkletzan, mzhan
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: virt-manager-0.10.0-1.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 907399 (view as bug list) Environment:
Last Closed: 2014-06-13 09:27:34 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:
Attachments:
Description Flags
Dedug info from virt-manager none

Description tingting zheng 2013-02-04 09:31:30 UTC
Created attachment 692667 [details]
Dedug info from virt-manager

Description of problem:
Error occurs after change selinux from static to dynamic on virt-manager

Version-Release number of selected component (if applicable):
virt-manager-0.9.4-4.el7.noarch
libvirt-1.0.0-1.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1. Prepare an VM which is not running.
2. Issue "virt-manager" to open virt-manager.
3. Select the existing VM, then "open" -> "details" -> "Overview" -> "Security"
4. Select "static" option, then specify a label,and apply it.
such as: "system_u:system_r:svirt_t:s0:c100,c200"
5. Change selinux to dynamic,then apply,error occurs:Error changing VM configuration: unsupported configuration: dynamic label type must use resource relabeling

Actual results:
Error occurs after change selinux from static to dynamic from virt-manager as steps show.

Expected results:
No error shows and change selinux from static to dynamic successfully.

Additional info:
1.Attached the debug info from virt-manager.
2.Info from virt-manager --debug,I noticed that after change selinux from static to dynamic,the relabel attribute is always set as "no",if update to "yes",no such error shows.
--- Original XML
+++ New XML
@@ -87,7 +87,7 @@
       <address type="pci" domain="0x0000" bus="0x00" slot="0x06" function="0x0"/>
     </memballoon>
   </devices>
-  <seclabel type="static" model="dac" relabel="no">
+  <seclabel type="dynamic" model="dac" relabel="no">
     <label>system_u:system_r:svirt_t:s0:c100,c200</label>
   </seclabel>
 </domain>

Comment 2 Martin Kletzander 2013-02-05 13:08:38 UTC
Patch proposed upstream:

https://www.redhat.com/archives/virt-tools-list/2013-February/msg00028.html

Comment 3 Martin Kletzander 2013-02-07 09:07:41 UTC
Moving to POST:

commit b6f0ba364f6376793989450869db83e117586cec
Author: Martin Kletzander <mkletzan>
Date:   Tue Feb 5 12:28:06 2013 +0100

    Add support for security relabeling

Comment 5 tingting zheng 2013-08-15 08:44:13 UTC
Tested the bug with:
virt-manager-0.10.0-2.el7.noarch

New version of virt-manager can change selinux from static to dynamic successfully,so move the bug to VERIFIED.

Comment 6 Ludek Smid 2014-06-13 09:27:34 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.