Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No spice port #8

Closed
gsads opened this issue Sep 8, 2020 · 27 comments
Closed

No spice port #8

gsads opened this issue Sep 8, 2020 · 27 comments

Comments

@gsads
Copy link

gsads commented Sep 8, 2020

When I execute the script in U20.04, it executes but nothing happens.
./cv4pve-pepper --host=192.168.1.111 --username=root --password=secret --vmid 100 --viewer /usr/bin/virt-viewer
I'm using the following:
--host=IP of the Proxmox server
--username=same username as when logging in to Proxmox from the web interface
--password=same password as when logging in to Proxmox from the web interface
--vmid=virtual machine number in Proxmox
Adding the --debug switch reveals a "no spice port" error. Where do I specify the Spice port?

@franklupo
Copy link
Member

did you change the default port?

@gsads
Copy link
Author

gsads commented Sep 8, 2020

I don't think so... how would I have done that?

@franklupo
Copy link
Member

Can attach log execution?

@gsads
Copy link
Author

gsads commented Sep 8, 2020

`./cv4pve-pepper --host=192.168.1.101 --username=root --password=secret --vmid 100 --viewer /usr/bin/virt-viewer --debug
Method: POST, Url: https://192.168.1.101:8006/api2/json/access/ticket
Parameters:
password : secret
username : root
realm : pam
StatusCode: OK
ReasonPhrase: OK
IsSuccessStatusCode: True
{
"data": {
"ticket": "PVE:root@pam:5BLA5::blablabla==",
"username": "root@pam",
"cap": {
"dc": {
"Sys.Audit": 1
},
"access": {
"User.Modify": 1,
"Group.Allocate": 1,
"Permissions.Modify": 1
},
"nodes": {
"Sys.Modify": 1,
"Sys.Audit": 1,
"Sys.PowerMgmt": 1,
"Sys.Syslog": 1,
"Permissions.Modify": 1,
"Sys.Console": 1
},
"vms": {
"VM.Snapshot": 1,
"VM.Snapshot.Rollback": 1,
"VM.Backup": 1,
"VM.Config.CPU": 1,
"VM.PowerMgmt": 1,
"VM.Monitor": 1,
"VM.Config.HWType": 1,
"VM.Config.Options": 1,
"VM.Config.Memory": 1,
"VM.Audit": 1,
"VM.Clone": 1,
"VM.Config.CDROM": 1,
"VM.Migrate": 1,
"VM.Allocate": 1,
"VM.Config.Network": 1,
"VM.Console": 1,
"Permissions.Modify": 1,
"VM.Config.Disk": 1
},
"storage": {
"Datastore.Allocate": 1,
"Permissions.Modify": 1,
"Datastore.AllocateTemplate": 1,
"Datastore.AllocateSpace": 1,
"Datastore.Audit": 1
}
},
"CSRFPreventionToken": "BLA:blablabla"
}
}

Method: GET, Url: https://192.168.1.101:8006/api2/json/cluster/resources?type=vm
StatusCode: OK
ReasonPhrase: OK
IsSuccessStatusCode: True
{
"data": [
{
"status": "running",
"vmid": 100,
"cpu": 0.00505773262059924,
"disk": 0,
"netout": 1153479392,
"uptime": 436449,
"maxdisk": 34359738368,
"type": "qemu",
"name": "snow",
"node": "nimbus",
"diskwrite": 2600908800,
"netin": 301120087,
"id": "qemu/100",
"diskread": 3071012864,
"template": 0,
"maxcpu": 6,
"mem": 3465654272,
"maxmem": 8589934592
},
{
"maxdisk": 34359738368,
"uptime": 631193,
"type": "qemu",
"name": "rain",
"node": "nimbus",
"diskwrite": 84623795712,
"status": "running",
"vmid": 101,
"cpu": 0.0780335890035312,
"disk": 0,
"netout": 169340,
"diskread": 585445560,
"template": 0,
"mem": 1520459776,
"maxcpu": 2,
"maxmem": 8589934592,
"netin": 299856111,
"id": "qemu/101"
},
{
"node": "nimbus",
"diskwrite": 20717602816,
"uptime": 631189,
"maxdisk": 53687091200,
"type": "qemu",
"name": "mist",
"disk": 0,
"netout": 43485356,
"status": "running",
"vmid": 150,
"cpu": 0.0146312979381621,
"template": 0,
"mem": 3531390833,
"maxcpu": 2,
"maxmem": 4294967296,
"diskread": 14264598528,
"id": "qemu/150",
"netin": 938485831
}
]
}

Method: POST, Url: https://192.168.1.101:8006/api2/json/nodes/nimbus/qemu/100/spiceproxy
Parameters:
proxy : 192.168.1.101
StatusCode: InternalServerError
ReasonPhrase: no spice port
IsSuccessStatusCode: False
{
"data": null
}
=============================`

@franklupo
Copy link
Member

The service is running?

@franklupo
Copy link
Member

Tenere is the ip of nimbus host ?

@gsads
Copy link
Author

gsads commented Sep 8, 2020

What is "tenere"?
Yes. My Proxmox host is called nimbus and has IP of 192.168.1.101. I changed it from my first post if you are wondering why it is different.

@franklupo
Copy link
Member

have you enabled the firewall?

@franklupo
Copy link
Member

you have change display hardware on spice?

@gsads
Copy link
Author

gsads commented Sep 9, 2020

No firewall.
I haven't changed anything on virt-viewer. I just tested it and it works on a VM I have running locally:
sads@SadsXPS:~$ virt-viewer de6a8d2b-9d2a-4f3b-90e8-7725f27fd0d9 --debug (virt-viewer:26165): virt-viewer-DEBUG: 08:55:14.393: connecting ... (virt-viewer:26165): virt-viewer-DEBUG: 08:55:14.393: Opening connection to libvirt with URI <null> (virt-viewer:26165): virt-viewer-DEBUG: 08:55:14.438: initial connect (virt-viewer:26165): virt-viewer-DEBUG: 08:55:14.438: notebook show status 0x55e9cde2e310 (virt-viewer:26165): virt-viewer-DEBUG: 08:55:14.440: virt_viewer_app_set_uuid_string: UUID changed to de6a8d2b-9d2a-4f3b-90e8-7725f27fd0d9 (virt-viewer:26165): virt-viewer-DEBUG: 08:55:14.440: notebook show status 0x55e9cde2e310 (virt-viewer:26165): virt-viewer-DEBUG: 08:55:14.440: Guest de6a8d2b-9d2a-4f3b-90e8-7725f27fd0d9 is running, determining display (virt-viewer:26165): virt-viewer-DEBUG: 08:55:14.443: Set connect info: (null),(null),-1,-1,(null),(null),(null),0 (virt-viewer:26165): virt-viewer-DEBUG: 08:55:14.453: Guest Win10-200106 has a spice display (virt-viewer:26165): virt-viewer-DEBUG: 08:55:14.468: Guest graphics address is 127.0.0.1:5900 (virt-viewer:26165): virt-viewer-DEBUG: 08:55:14.468: Set connect info: localhost,127.0.0.1,5900,-1,(null),(null),(null),-1 (virt-viewer:26165): virt-viewer-DEBUG: 08:55:14.468: Error operation forbidden: read only access prevents virDomainOpenGraphicsFD (virt-viewer:26165): virt-viewer-DEBUG: 08:55:14.468: After open connection callback fd=-1 (virt-viewer:26165): virt-viewer-DEBUG: 08:55:14.468: Opening direct TCP connection to display at 127.0.0.1:5900:-1 (virt-viewer:26165): virt-viewer-DEBUG: 08:55:14.475: New spice channel 0x55e9ce290c00 SpiceMainChannel 0 (virt-viewer:26165): virt-viewer-DEBUG: 08:55:14.475: notebook show status 0x55e9cde2e310 (virt-viewer:26165): virt-viewer-DEBUG: 08:55:14.475: reconnect_poll: 0 (virt-viewer:26165): virt-viewer-DEBUG: 08:55:14.945: main channel: opened (virt-viewer:26165): virt-viewer-DEBUG: 08:55:14.945: notebook show status 0x55e9cde2e310 (virt-viewer:26165): virt-viewer-DEBUG: 08:55:14.949: app is not in full screen (virt-viewer:26165): virt-viewer-DEBUG: 08:55:14.949: app is not in full screen (virt-viewer:26165): virt-viewer-DEBUG: 08:55:14.949: New spice channel 0x55e9ce0c9f90 SpiceUsbredirChannel 1 (virt-viewer:26165): virt-viewer-DEBUG: 08:55:14.949: new usbredir channel (virt-viewer:26165): virt-viewer-DEBUG: 08:55:14.949: New spice channel 0x55e9cdfdc9e0 SpiceUsbredirChannel 0 (virt-viewer:26165): virt-viewer-DEBUG: 08:55:14.949: new usbredir channel (virt-viewer:26165): virt-viewer-DEBUG: 08:55:14.949: New spice channel 0x55e9ce300e70 SpiceRecordChannel 0 (virt-viewer:26165): virt-viewer-DEBUG: 08:55:14.949: New spice channel 0x55e9ce3ef670 SpicePlaybackChannel 0 (virt-viewer:26165): virt-viewer-DEBUG: 08:55:14.949: new audio channel (virt-viewer:26165): virt-viewer-DEBUG: 08:55:15.006: New spice channel 0x55e9cdf7cab0 SpiceDisplayChannel 0 (virt-viewer:26165): virt-viewer-DEBUG: 08:55:15.006: New spice channel 0x55e9cdf8ea80 SpiceCursorChannel 0 (virt-viewer:26165): virt-viewer-DEBUG: 08:55:15.009: New spice channel 0x55e9ce553290 SpiceInputsChannel 0 (virt-viewer:26165): virt-viewer-DEBUG: 08:55:15.009: new inputs channel (virt-viewer:26165): virt-viewer-DEBUG: 08:55:15.120: creating spice display (#:0) (virt-viewer:26165): virt-viewer-DEBUG: 08:55:15.120: Insert display 0 0x55e9ce2a3f50 (virt-viewer:26165): virt-viewer-DEBUG: 08:55:15.132: Found a window without a display, reusing for display #0 (virt-viewer:26165): virt-viewer-DEBUG: 08:55:15.132: notebook show display 0x55e9cde2e310 (virt-viewer:26165): virt-viewer-DEBUG: 08:55:15.164: Allocated 1280x800 (virt-viewer:26165): virt-viewer-DEBUG: 08:55:15.164: Child allocate 1280x800 (virt-viewer:26165): virt-viewer-DEBUG: 08:55:15.191: Allocated 1280x800 (virt-viewer:26165): virt-viewer-DEBUG: 08:55:15.192: Child allocate 1280x800 (virt-viewer:26165): virt-viewer-DEBUG: 08:55:24.723: Allocated 1280x800 (virt-viewer:26165): virt-viewer-DEBUG: 08:55:24.723: Child allocate 1280x800 (virt-viewer:26165): virt-viewer-DEBUG: 08:55:27.458: Window closed (virt-viewer:26165): virt-viewer-DEBUG: 08:55:27.461: Destroying spice display 0x55e9ce2a3f50 (virt-viewer:26165): virt-viewer-DEBUG: 08:55:27.462: Not removing main window 0 0x55e9cdfbc120 (virt-viewer:26165): virt-viewer-DEBUG: 08:55:27.465: Destroy SPICE channel SpiceInputsChannel 0 (virt-viewer:26165): virt-viewer-DEBUG: 08:55:27.466: Destroy SPICE channel SpiceCursorChannel 0 (virt-viewer:26165): virt-viewer-DEBUG: 08:55:27.466: Destroy SPICE channel SpiceDisplayChannel 0 (virt-viewer:26165): virt-viewer-DEBUG: 08:55:27.466: zap display channel (#0) (virt-viewer:26165): virt-viewer-DEBUG: 08:55:27.466: Destroy SPICE channel SpicePlaybackChannel 0 (virt-viewer:26165): virt-viewer-DEBUG: 08:55:27.466: Destroy SPICE channel SpiceRecordChannel 0 (virt-viewer:26165): virt-viewer-DEBUG: 08:55:27.466: Destroy SPICE channel SpiceUsbredirChannel 0 (virt-viewer:26165): virt-viewer-DEBUG: 08:55:27.466: zap usbredir channel (virt-viewer:26165): virt-viewer-DEBUG: 08:55:27.466: Destroy SPICE channel SpiceUsbredirChannel 1 (virt-viewer:26165): virt-viewer-DEBUG: 08:55:27.466: zap usbredir channel (virt-viewer:26165): virt-viewer-DEBUG: 08:55:27.466: Destroy SPICE channel SpiceMainChannel 0 (virt-viewer:26165): virt-viewer-DEBUG: 08:55:27.466: zap main channel (virt-viewer:26165): virt-viewer-DEBUG: 08:55:27.469: notebook show status 0x55e9cde2e310 (virt-viewer:26165): virt-viewer-DEBUG: 08:55:27.469: Guest Win10-200106 display has disconnected, shutting down

@franklupo
Copy link
Member

in Proxmox VE to use SPICE you have to change video on spice see https://pve.proxmox.com/wiki/SPICE

@ghost
Copy link

ghost commented Oct 11, 2020

I have same issue with Proxmox 6.2 and Ubuntu 20.04
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.1 LTS
Release: 20.04
Codename: focal

Debug messages show all OK but I see error message Unable to connect to libvirt with URI: [no]

Spice hw is selected in Proxmox VM and with original spice client works perfectly fine.

Any ideas?

@franklupo
Copy link
Member

could this be the problem?
https://forum.proxmox.com/threads/cant-connect-to-spice.33383/

Best regards

@ghost
Copy link

ghost commented Oct 12, 2020

I do not think so.

If I download spice config file from Proxmox web panel or open it directly in virt-viewer it works fine

@franklupo
Copy link
Member

can you attach spiace config?

@ghost
Copy link

ghost commented Oct 12, 2020

Here is my spice.config

Some passwords and certificartes are shortened :-)

https://pastebin.com/pqy12RQN

franklupo added a commit that referenced this issue Oct 12, 2020
@franklupo
Copy link
Member

test new relase with parameter --proxy

@ghost
Copy link

ghost commented Oct 12, 2020

Sorry for dumb question.

How should I use proxy parameter? Should it be proxmox host IP?
If I use this IP, result is unfortunately same same. No connection.

@franklupo
Copy link
Member

HI,
Can you attach the command line you use?

best regards

@ghost
Copy link

ghost commented Oct 13, 2020

I use standard command from your page

cv4pve-pepper --host=hv.c2.uz --username=root --password=12345 --vmid 201 --viewer=/usr/bin/virt-viewer --proxy=hv.c2.uz

@franklupo
Copy link
Member

You can ecexute with --debug and attach output?

Best regards

@ghost
Copy link

ghost commented Oct 14, 2020

Here are debug logs

https://pastebin.com/p0en54T0

@franklupo
Copy link
Member

Hi,
test new version 1.3.7

best regards

@ghost
Copy link

ghost commented Oct 16, 2020

Hi, I am sorry to say but result is same.

No connection.

here are debug logs
https://pastebin.com/fuZPyRey

@franklupo
Copy link
Member

Test new version. I imporve the log. Use the parameter --debug and attach me result.

Bets regards

@ghost
Copy link

ghost commented Oct 21, 2020

Here are logs as requested.

https://pastebin.com/qanZdjeQ

and virt-client config file
https://pastebin.com/KWXFjucd

Links are working for 1 week.

PS I tried latest version on another Proxmox node, result is same, no connection.

@franklupo
Copy link
Member

The problem is Ubuntu 20.04.
I'm investigating

Best rgards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants