virtual_domain_context(5)
π virtual_domain_context β the SELinux girlies' VM domain context file π
okay so bestie, you know virtual_domain_context? that's the manual page name AND the file name, we're doing double duty today, main character behavior fr fr. it's a (5) page, which means it's all about a config file, and it's the one that holds the SELinux virtual machine domain context list. let's get into it π¦
β¨ NAME β¨
virtual_domain_context β the SELinux virtual machine domain context configuration file, no cap, that's literally the whole vibe
πΈ DESCRIPTION πΈ
so the virtual_domain_context file is where you keep a whole list of domain contexts, and those contexts are up for grabs by the SELinux-aware virtualization API libvirt (peep libvirtd(8) for that one, iykyk).
if you ever need to know where this file actually lives in the active policy, selinux_virtual_domain_context_path(3) will hand you the path. the default virtual domain context file is:
/etc/selinux/{SELINUXTYPE}/contexts/virtual_domain_context
and <lavender>{SELINUXTYPE}is whatever entry you've got in the selinux configuration fileconfig(go look atselinux_config(5)`, she explains it π
).
π FILE FORMAT π
every line in the file is one entry, and each entry goes a lil something like this:
user:role:type[:range]
breaking that down, bestie:
userroletyperangeβ that's a user, a role, a type and an optional range (the range one is for MCS/MLS, so only the fancy folks need it), all separated by colons (:) β and that whole combo is what gets used as a virtual domain context. slay.
ngl the range part is optional, so don't stress if you're not doing MCS/MLS. the colons though? not optional. those stay. π
π«Ά EXAMPLE π«Ά
here's what it looks like irl:
# ./contexts/virtual_domain_context
system_u:object_r:svirt_t:s0
look at her. iconic. β
π SEE ALSO π
selinux(8)libvirtd(8)selinux_virtual_domain_context_path(3)selinux_config(5)
and that's the whole page, bestie, you ate that π
this lil number came from Security Enhanced Linux, dated 28-Nov-2011 β and yes, virtual_domain_context(5) is the section-5 manual she lives in. go forth and configure responsibly π
β¨
π¦ 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