dcarregado
Contributor
Contributor

Desktop restarts after marked as Available by Horizon

We are experiencing a really strange problem with viewagent in Centos 7.7. We use instant clones with non persistent machines in Horizon 7.11. Our base image is configured with Centos 7.7 updated to the latest module releases, and we are using nvidia vGPU cards. We use GNOME-classic as desktop manager. When the Horizon system creates a new VM, we see in vsphere the standard procedure (we see a new VM in Horizon with “Provisioning” state, and the VM itself can be found in vSphere WITHOUT the vGPU attached). Here is where the strange thing comes… after the machine is cloned and rebooted, it is shown in Horizon as “Available” BEFORE the vGPU is physically attached. So it accepts client connections since that moment, even if we see in vSphere no vGPU is enabled in that machine. From a client perspective, the client connects (it gets to the GNOME desktop and can run programs), but no vGPU is available (nvidia-config does not run, and /dev/nvidia0 does not exist). After around 90/100 seconds, the machine restarts automatically, leaving the gnome desktop freezed for the user…. And in this last restart, the vGPU is properly attached. So there is like a “dummy” period where the system accepts user connections (machine “available” in Horizon), but if someone connects at this moment it completely breaks it, as the machine appears as “already in use” after this last reboot when the vGPU is attached.

If no one connects to the machine during this dummy period and the machine automatically reboots when vGPU is attached, and then a user connects, then everything goes ok. Any ideas why Horizon is setting the VM as “available” before the vGPU is attached? Can you think about any way to avoid that, or to force the VM not to accept connections while no /dev/nvidia0 exists?

0 Kudos
0 Replies