<div dir="ltr">I've attached output from lsof & systemctl commands.  I enabled virtproxyd.service Friday which got<div>me past my problem but it is curious how I got into this if the default is for proxy to be enabled.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Aug 1, 2022 at 5:02 AM Martin Kletzander <<a href="mailto:mkletzan@redhat.com">mkletzan@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Thu, Jul 28, 2022 at 02:14:30PM -0400, Carol Bouchard wrote:<br>
>I have a test environment that use to work but no longer does. My<br>
>laptop is Fedora36 (libvirt version 8.1.0.2) while the VMs it spawns are<br>
>RHEL7 (max libvirt version is 4.5.0). The source of my problem<br>
>seems to be that RHEL7 libvirt needs rw socket /var/run/libvirt/libvirt-sock<br>
>which no longer exists in fedora36.<br>
><br>
>The following is successful from RHEL7 VM to laptop:<br>
>virsh -d0 --connect<br>
>'qemu+ssh://<a href="http://192.168.120.1/system?*socket*=/var/run/libvirt/libvirt-sock-ro" rel="noreferrer" target="_blank">192.168.120.1/system?*socket*=/var/run/libvirt/libvirt-sock-ro</a>'<br>
>domstate beaker-test-vm1.beaker<br>
><br>
>If I change the action from domstate to start, it fails on<br>
>error: Failed to start domain beaker-test-vm1.beaker<br>
>error: operation forbidden: read only access prevents virDomainCreate<br>
>which made me realize ro stands for read-only; however, there is no<br>
>libvirt-sock. I tried some of the other socket files without success.<br>
>Is there a work-around?<br>
><br>
<br>
It is pretty weird that something is listening on the libvirt-sock-ro and not on<br>
libvirt-sock.  Could you run a quick lsof to figure out who's listening on<br>
libvirt-sock?  If it is systemd, then you have socket activation set up for the<br>
read-only socket *only* and you need to also enable libvirtd.socket.  Something<br>
along the lines of:<br>
<br>
     systemctl enable --now libvirtd.socket libvirtd-ro.socket<br>
     systemctl stop libvirtd.service<br>
<br>
should suffice.<br>
<br>
You might also be running in the newer split daemon scenario and you have<br>
virtqemud running instead.  The service listening to libvirt socket might be for<br>
virtproxyd[0] instead and you might need to do the following instead:<br>
<br>
     systemctl enable --now virtproxyd.socket virtproxyd-ro.socket<br>
     systemctl stop virtproxyd.service<br>
<br>
To make sure try figuring out which systemd service/socket is associated with<br>
the socket, by running `systemctl status libvirtd virtproxyd`.<br>
<br>
Martin<br>
<br>
[0] <a href="https://libvirt.org/manpages/virtproxyd.html" rel="noreferrer" target="_blank">https://libvirt.org/manpages/virtproxyd.html</a><br>
</blockquote></div>