Can RHEL7 VM run remote commands to Fedora36 host?

Carol Bouchard cbouchar at redhat.com
Wed Jul 27 17:18:00 UTC 2022


I have a Fedora36 laptop which hosts VMs with RHEL7 using libvirt.  One of
the RHEL7 VMs, runs remote commands (as root) to 'start' another VM by
way of my laptop.  In other words,  the following command is run:
virsh --connect 'qemu+ssh://192.168.120.1/system' start
beaker-test-vm1.beaker
If I run non-remote version of the command on the laptop, it is successful.
For example,
virsh --connect qemu:///system start beaker-test-vm1.beaker  <-- Successful
on laptop.

If I do a query like the following *(notice socket use)*, it is successful.
virsh -d0 --connect
'qemu+ssh://192.168.120.1/system?*socket*=/var/run/libvirt/libvirt-sock-ro'
domstate beaker-test-vm1.beaker

Without socket, I get the following error:

*error: failed to connect to the hypervisor*

*error: End of file while reading data: Ncat: No such file or directory.:
Input/output error*

This does not work for 'start' because I believe this is a read-only socket
since I see the error:
error: Failed to start domain beaker-test-vm1.beaker
error: operation forbidden: read only access prevents virDomainCreate

When I look at my laptop, there is no /var/run/libvirt/libvirt-sock.
So.....I've been wondering
whether RHEL7 virsh/libvirt is compatible with Fedora36.  Is there a
work-around?  I can't
change the distros on my laptop or VMs.

Carol
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20220727/829d958b/attachment.htm>


More information about the libvirt-users mailing list