Answer the question
In order to leave comments, you need to log in
How to create unix-channel in 'connect' source mode with SELinux enabled?
I have a domain on CentOS 6 with the following configuration:
.........................................................
<channel type='unix'>
<source mode='bind' path='/var/lib/libvirt/qemu/vport0'/>
<target type='virtio' name='vport0'/>
<address type='virtio-serial' controller='0' bus='0' port='1'/>
</channel>
<channel type='unix'>
<source mode='connect' path='/var/lib/libvirt/qemu/vport0'/>
<target type='virtio' name='vport0'/>
<address type='virtio-serial' controller='0' bus='0' port='2'/>
</channel>
.........................................................
error: Failed to start domain proxy-agent0
error: unable to set security context 'system_u:object_r:svirt_image_t:s0:c269,c347' on '/var/lib/libvirt/qemu/vport0': No such file or directory
# ausearch -r -m VIRT_CONTROL -ts today
type=VIRT_CONTROL msg=audit(1482305847.172:2201): user pid=2430 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:virtd_t:s0-s0:c0.c1023 msg='virt=kvm op=start reason=booted vm="proxy-agent0" uuid=62bb1bc5-4e17-f67b-22a4-c14a487547e8 vm-pid=-1 exe="/usr/sbin/libvirtd" hostname=? addr=? terminal=? res=failed'
Answer the question
In order to leave comments, you need to log in
The answer to the question has been found.
In the domain config, you need to write the line:
At the same time, SELinux on the hypervisor does not check any files related to the domain, but the domain itself starts.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question