Potentially naive question that I'm hoping some cgroups
experts can answer quickly:
Assuming the following docker
workflow was run by Linux user joe
, how can the system root
user determine that a VM is indeed running?
IMAGE_NAME="ubuntu:20.10"
DOCKER_ARGS="--rm -i --privileged"
cat <<"EOF" | docker run ${DOCKER_ARGS} ${IMAGE_NAME}
set -ex
apt-get update
apt-get install -y libvirt0 virt-manager
libvirtd --daemon
virtlogd --daemon
virsh net-list --name | fgrep default || virsh net-start default
virt-install \
--name MyFedora \
--memory 1024 \
--disk path=/tmp/myFedora.img,size=10 \
--network network=default \
--os-variant fedora28 \
--cdrom /opt/joe/Fedora-Server-dvd-x86_64-34-1.2.iso \
--noautoconsole \
--debug
virsh list --all
sleep infinity
EOF
Given that the libvirtd
socket that joe
is running against only exists inside the docker container, how does root
find joe
's VM?