Spice.vv files doesn't generate correctly in cluster mode

BigBrodeur

New Member
Sep 1, 2024
7
0
1
Hi.

I have PVE 8.4.1 all updates done on a 7-node cluster, all (i9 12900HK).
I also have a Windows 10 Laptop on which I installed VirtViewer 11.

I tried (and succeeded) to make SPICE work after a whole weekend and discovered that all my installation was correct from the start, but there is a more than bizarre behavior when PVE generates the .vv files to connect to a VM. So i am sharing this here.

After trying many possibilities and permutations, what I observed is that for PVE to generate the .vv file correctly (so virt viewer can connect) you need to LOG TO CLUSTER USING THE NODE THAT CONTAIN THE VM that you wish to "SPICE" to.

In other words:

A - if my cluster has IPs: 192.168.1-2-3-4-5-6-7,

B- and my VM that i want to 'SPICE' in is located on node 3,

C- If i login to my cluster through node 1, and go under node 3 in PVE GUI, the resulting .vv file that will be generated by selecting SPICE for that VM will contain the IP of node 1 (not the IP of the node containing the VM) and also the creds for that node. I validated that by manually change the IP inside the .vv file and it won't work.

D - The result is virtViewer complaining that it is "unable to connect to the graphic server".

E - So now I have to take extra steps to logout of my cluster each time, and log again through the node that contains the VM I want to 'SPICE' into.

I believe this is a bug, because so far the beauty of having a cluster is to be able to do anything, anywhere, regardless of which node you are on.
Otherwise we go back to single node management - not good.

Let me know if you need more details but it is easy to reproduce 100% of the time.
Comparing the .vv files generated with beyond compare clearly highlight this bub.
 
ok this is fully intended (and works here)

there is a 'spiceproxy' running on each node that forwards the connection to the correct one, reasoning is this:

if you connect to the webui of x.y.z.1 you have a working connection to that node (not necessarily to the others)
if you now open the spice connection, the client connects also there and will be proxied to the node where the vm is on, at least it should be

note that i'm on a linux desktop and connect with 'remote-viewer', but i also tested on a win11 machine with virt viewer 11 and that also worked without issue
(connected on a pve with ip x.y.z.101 to vm that runs on x.y.z.102)

in your case i'd check that the nodenames are able to be looked up by the other clustermembers (e.g. via /etc/hosts or dns) and that the connection between them on port 3128 is working
 
  • Like
Reactions: MagicFab
Thank you for the answer. Since i have a full time job :) i will have time to investigate your suggestion this weekend, and i'll come back.

Thank you for the explanation, it make sense.