0

In our lab we have a RHEL8 server with developer subscription.
On the machine we have a few VMs and some of them are on a private libvirt network, thus we can only access them via virt-viewer.

  • We use various Fedora 32/33 to connect to the lab server.
  • We can ssh to the server and personally I can even ssh as root (ssh root@server.example.com works)

The command I use is:

virt-viewer -c qemu+ssh://root@server.example.com/system privatevm

My problem:

  • When I have firewalld up and running on the server, virt-viewer cannot open the display. We only see the Connected to graphic server message on the virt-viewer and the rest is just gray. USB redirection is enabled, but not the "Screenshot", or the "Preferences". But no graphical output.
  • When I stop firewalld virt-viewer displays the remote machine/desktop just fine.

I enabled logging on the firewalld. I don't see any dropped packages to/from the client. I am out of ideas, so any help would be appreciated.

ptselios
  • 31
  • 4
  • What is the firewalld configuration? – Michael Hampton Jun 03 '21 at 13:54
  • I would say sufficient. I mean, I have all the necessary services enabled. For example: ssh, libvirt, libvirt-tls. Please note that virsh -c qemu+ssh:// and virsh -c qemu+tls work just fine from any client. Also, please note that the issue is not only via virt-viewer. virt-manager has the same problem when I open the console. – ptselios Jun 03 '21 at 15:24

1 Answers1

0

To help troubleshooting.

Ensure that the libvirt-daemon-config-network package is installed:

# yum info libvirt-daemon-config-network
Installed Packages
Name         : libvirt-daemon-config-network
[...]

Verify that the libvirt default network is active and configured to start automatically:

# virsh net-list --all
 Name      State    Autostart   Persistent
--------------------------------------------
 default   active   yes         yes

If it is not, activate the default network and set it to auto-start:

# virsh net-autostart default
Network default marked as autostarted

# virsh net-start default
Network default started

If activating the default network fails with the following error, the libvirt-daemon-config-network package has not been installed correctly.

error: failed to get network 'default'
error: Network not found: no network with matching name 'default'

To fix this, re-install libvirt-daemon-config-network.

# yum reinstall libvirt-daemon-config-network
Dave M
  • 4,494
  • 21
  • 30
  • 30
Arden Smith
  • 432
  • 2
  • 8
  • Default network is up, and of course it's enabled to start automatically. Please note though that the default network is bridge and not NAT. I cannot confirm the packages now, I will return in a couple of days when I will have access to the server. However, I have to point out that the default network obviously is not an issue, since I can ssh to the VM, which gets an IP from the DHCP server of the lab. – ptselios Aug 14 '21 at 14:37