Add a disk to RHEL virt

Add the directories, set the contexts and then restore the contexts.

Working on disk that mounts to /mnt/d500

Create the directories I want to use:

mkdir -p /mnt/d500/libvirt/images

Set the context for the libvirt directory:

semanage fcontext -a -t virt_var_lib_t "/mnt/d500/libvirt"

Set the context for the images directory:

semanage fcontext -a -t virt_image_t "/mnt/d500/libvirt(/.*)?"

Then write the contexts:

restorecon -R /mnt/d500/

Then check the contexts:

ls -lZd /mnt/d500/libvirt/images/