virtual_image_context(5)
π virtual_image_context β the SELinux virtual machine image context config file π
okay bestie, so you know that file virtual_image_context(5)? yeah, the SELinux one, living under the SELinux configuration section? this is her moment. she's serving image contexts and we're gonna read every line together, no skimming, no cap. π
πΈ NAME πΈ
virtual_image_context β the SELinux virtual machine image context configuration file. that's it, that's the whole name, and she ate. π
β¨ DESCRIPTION β¨
so the virtual_image_context file is literally a whole list of image contexts, and its whole job is to be used by the SELinux-aware virtualization API libvirt. yes, that libvirt β the one from libvirtd(8). iykyk. π¦
and if you ever need to find where this file is actually living on your system, selinux_virtual_image_context_path(3) will hand you the active policy path to it. she's basically a map to the treasure. πΊοΈ
the default virtual image context file is:
/etc/selinux/{SELINUXTYPE}/contexts/virtual_image_context
where {SELINUXTYPE} is the entry you pull out of the selinux configuration file config β and yeah, that one's documented in selinux_config(5) if you wanna go deeper. π
π§ FILE FORMAT π§
each line in the file is one entry, and the entry looks like this:
user:role:type[:range]
and here's what's going on with each piece:
user,role,type,rangeβ a user, a role, a type, and an optional range (that's the MCS/MLS one, for the fancy crowd), all separated by colons (:) β and together they can be used as a virtual image context. periodt. π
π EXAMPLE π
# ./contexts/virtual_image_context
system_u:object_r:svirt_image_t:s0
system_u:object_r:svirt_content_t:s0
look at those contexts just sitting there being iconic. no notes. β
π SEE ALSO π
selinux(8), libvirtd(8), selinux_virtual_image_context_path(3), selinux_config(5)
like, go read them too, bestie, they're all connected. π«Ά
lowkey a whole slay of a manual page, fr fr. stay safe out there and keep your contexts correct. π
Security Enhanced Linux β 28-Nov-2011 β virtual_image_context(5) πΈ mwah, that's the version and date, signing off, ily, bye bestie! πβ¨
π¦ where this page comes from
- alpine 3.24: libselinux-doc 3.10-r1 Β· Public-Domain
- centos-stream 10: libselinux-utils 3.11-3.el10 Β· LicenseRef-Fedora-Public-Domain
- centos-stream 9: libselinux-utils 3.6-5.el9 Β· Public Domain
- debian bookworm: selinux-utils 3.4-1+b6
- debian trixie: selinux-utils 3.8.1-1 Β· LicenseRef-public-domain
- fedora 43: libselinux-utils 3.9-5.fc43 Β· LicenseRef-Fedora-Public-Domain
- fedora 44: libselinux-utils 3.10-1.fc44 Β· LicenseRef-Fedora-Public-Domain
- fedora 44: libselinux-utils 3.11-2.fc44 Β· LicenseRef-Fedora-Public-Domain
- nixos 26.05: libselinux 3.10
- nixpkgs unstable: libselinux 3.11
- opensuse-leap 16.0: selinux-tools 3.8.1-160000.4.1 Β· SUSE-Public-Domain
- opensuse-leap 16.0: selinux-tools 3.8.1-160000.4.1 Β· SUSE-Public-Domain
- opensuse-leap 16.0: selinux-tools 3.8.1-160000.4.1 Β· SUSE-Public-Domain
- opensuse-leap 16.0: selinux-tools 3.8.1-160000.4.1 Β· SUSE-Public-Domain
- ubuntu jammy: selinux-utils 3.3-1build2
- ubuntu noble: selinux-utils 3.5-2ubuntu2 Β· LicenseRef-public-domain
- ubuntu noble: selinux-utils 3.5-2ubuntu2.1 Β· LicenseRef-public-domain
- ubuntu questing: selinux-utils 3.8.1-1build1
- ubuntu resolute: selinux-utils 3.9-4build1 Β· LicenseRef-public-domain
- ubuntu stonking: selinux-utils 3.11-2.1 Β· LicenseRef-public-domain
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms