unable to start remote-viewer

jluc2808

New Member
Mar 22, 2019
16
0
1
69
hi,
i encounter a problem while i want to start remote-viewer
launch remote-viewer :
Unable to init server: Could not connect: Connection refused
(remote-viewer:6195): Gtk-WARNING **: cannot open display

my command is inside lanceur.sh
remote-viewer $TMP &

and the contents of the file is
Code:
[virt-viewer]
secure-attention=Ctrl+Alt+Ins
delete-this-file=1
proxy=http://192.168.1.176:3128
type=spice
ca=-----BEGIN CERTIFICATE-----\nMIIFwjCCA6qgAwIBAgIJAIq5hWtzgqUyMA0GCSqG....
......A6IwrvPZ5HQO33XqBxlKgAv/KjVnw=\n-----END CERTIFICATE-----\n
toggle-fullscreen=Shift+F11
title=VM 102 - Proxmox-Android8.1
host=pvespiceproxy:5ca21f25:102:proxmox::29675a0ea25537222ef2a86707553d3c1b6ea225
password=4cdaa52bb36754d7d727e22b4c1f68d04928348b
host-subject=OU=PVE Cluster Node,O=Proxmox Virtual Environment,CN=proxmox.com
release-cursor=Ctrl+Alt+R
tls-port=61000

when i check systemctl status libvirtd.service
i get ther error :
Code:
● libvirtd.service - Virtualization daemon
   Loaded: loaded (/lib/systemd/system/libvirtd.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Mon 2019-04-01 16:34:16 CEST; 41min ago
     Docs: man:libvirtd(8)
           http://libvirt.org
 Main PID: 6903 (code=exited, status=6)
      CPU: 39ms

Apr 01 16:34:16 proxmox systemd[1]: libvirtd.service: Main process exited, code=exited, status=6/NOTCONFIGURED
Apr 01 16:34:16 proxmox systemd[1]: Failed to start Virtualization daemon.
Apr 01 16:34:16 proxmox systemd[1]: libvirtd.service: Unit entered failed state.
Apr 01 16:34:16 proxmox systemd[1]: libvirtd.service: Failed with result 'exit-code'.
Apr 01 16:34:16 proxmox systemd[1]: libvirtd.service: Service hold-off time over, scheduling restart.
Apr 01 16:34:16 proxmox systemd[1]: Stopped Virtualization daemon.
Apr 01 16:34:16 proxmox systemd[1]: libvirtd.service: Start request repeated too quickly.
Apr 01 16:34:16 proxmox systemd[1]: Failed to start Virtualization daemon.
Apr 01 16:34:16 proxmox systemd[1]: libvirtd.service: Unit entered failed state.
Apr 01 16:34:16 proxmox systemd[1]: libvirtd.service: Failed with result 'exit-code'.

any help is welcome
thanks
 
Hi, do I understand correctly that you run Proxmox VE as VM with libvirtd? In that case this forum is not the right place to ask such a question as this is a in issue of your libvirt configuration, you should seek help there!
libvirtd.service: Main process exited, code=exited, status=6/NOTCONFIGURED
This clearly indicates that your configuration is not correct and probably a good starting point for further debugging.
 
i will make some precision.
I want to start the VM remote display directly with SPICE without to have to open proxmox manager first and restart the VM in case it was suspended.
So i'm using an sh launcher, which 1rst get the authorised_key and the CSRF, then start the VM if suspended and at least construct a remote-viewer command to make what is the original goal (start the display of the VM with SPICE in a new window) .

every step before the remote-viewer command are OK, but the command remote-viewer with $TMP fail each time with
Unable to init server: Could not connect: Connection refused
(remote-viewer:6195): Gtk-WARNING **: cannot open display

so i try to find what is wrong within my proxmox installation and couldn't allow me to start the SPICE window directly.

When i launch proxmox manager and start console with spice parameter, everything is OK and the spice window open as expected.

is there some package or setup or configuration i forget within my proxmox system to be able start virt-viewer ?
 
then start the VM if suspended and at least construct a remote-viewer command to make what is the original goal
Are you sure that you leave enough time between starting the VM and trying to connect via remote-viewer?
Also, did you check you can reach the PVE VM and the port is open (maybe via nmap)?

Still, the `systemctl status libivrtd.service` output implies that your configuration is not ok. That is something you have to clarify elsewhere, this is not a libvirt support forum ;).
 
sorry, you're right it's not a libvirt forum and perhaps i make some confuse beetween how to start and display a VM directly without proxmox manager and libvirt.

so i will get back to my initial demand and concentrate to what i couldn't start (so answer your questions about VM/Promox/....).
- i run proxmox VE as a nativ hypervisor on a x86 processor
Linux proxmox 4.15.18-10-pve #1 SMP PVE 4.15.18-32 (Sat, 19 Jan 2019 10:09:37 +0100) x86_64
The programs included with the Debian GNU/Linux system are free software;

- i have installed an android VM using android-x86-7.1-r2.iso

- the VM is running (started) and is available for all command and android software when i start Proxmox virtual environement with Proxmox_IP:8006, start the VM inside the manager, then start console with SPICE

==> my demand is how could i start the same "console SPICE" under w10 (debian embedded) directly (without the Proxmox manager) ?

for that, which surely confuse my post, i follow some post on this forum: https://forum.proxmox.com/threads/remote-spice-access-without-using-web-manager.16561, but i'm stuck with an error

==> is there a solution to start / display VM with a command line or script
 
ok we are on the right way :)
i did exactly what was your suggestion (create a bash script, get the PVEAuthCookie=$TICKET" -H "CSRFPreventionToken: $CSRF", get the temp.spiceproxy filled with what i post on my 1rst post)
but i get an error with the remote-viewer spiceprocy command line ?

i have already looked at the SPICE wiki and found no answer to my problem (as i said, if start console "SPICE" i have no trouble)
 
Have you tried the bash script in the link? Do you get the same error with that?
 
i have tried the script and get an error :
Unable to init server: Could not connect: Connection refused
(remote-viewer:75): Gtk-WARNING **: cannot open display:
the command line is
./script_vm.sh -u jluc2808@pve -p 'my_passwd' 102 proxmox.com 192.168.1.176

i'm sure that jluc2808 is a valid user added in promox and VMS/102
spiceproxy is generated with contents
Code:
[virt-viewer]
tls-port=61000
host-subject=OU=PVE Cluster Node,O=Proxmox Virtual Environment,CN=proxmox.com
proxy=http://192.168.1.176:3128
toggle-fullscreen=Shift+F11
ca=-----BEGIN CERTIFICATE-----\nMIIFwjCCA6qgAwIBAgIJAIq5hGCS......6IwrvPZ5HQO33XqBxlKgAv/KjVnw=\n-----END CERTIFICATE-----\n
type=spice
password=c15267d98a458a1ffdd010d570813051f5ac5507
title=VM 102 - Proxmox-Android8.1
delete-this-file=1
host=pvespiceproxy:5ca3774d:102:proxmox::a09227af24f83aa112a60246b4e2a6db532fc886
release-cursor=Ctrl+Alt+R
secure-attention=Ctrl+Alt+Ins
 
Unable to init server: Could not connect: Connection refused
(remote-viewer:75): Gtk-WARNING **: cannot open display:
virtviewer/remote-viewer is an X11 application and needs access to your display (you need to run it on a desktop-environment/window-manager - not from the console, not via sudo, not in tmux,...)
 
OK I understand but I run the bash command under windows powershell which is under windows, what is wrong?
 
Stoiko is completely right, you need X11 to run this. While it is possible to run an X server on Windows, I don't know if you want to go down that rabbit hole...
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!