Bug 1371828 - Should failed to validate XML if no model name with seclabel
Summary: Should failed to validate XML if no model name with seclabel
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.3
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Ján Tomko
QA Contact: yafu
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-08-31 08:19 UTC by Fangge Jin
Modified: 2018-06-07 14:38 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-06-07 14:38:58 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Fangge Jin 2016-08-31 08:19:13 UTC
Description of problem:
Set per-disk seclabel as below, guest start failed with error "error: unsupported configuration: Unable to find security driver for model (null)"

# virsh edit rhel7
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='none'/>
      <source file='/var/lib/libvirt/images/rhel7.2.qcow2'>
        **<seclabel relabel='no'/>**
      </source>
      <target dev='vda' bus='virtio'/>
    </disk>

# virsh start rhel7
error: Failed to start domain rhel7
error: unsupported configuration: Unable to find security driver for model (null)

Version-Release number of selected component:
libvirt-2.0.0-6.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1. Edit domain xml, set per-disk seclabel without model name.
2. Start guest

Actual results:
Edit domain xml successfully, but guest start failed

Expected results:
In step 1, XML document should failed to validate against schema when editing

Additional info:
Set a model with the seclabel, and start guest, NO "Unable to find security driver for model (null)" error appears.
For example:
      <source file='/var/lib/libvirt/images/rhel7.2.qcow2'>
        <seclabel **model='none'** relabel='no'/>
      </source>


Note You need to log in before you can comment on or make changes to this bug.