mirror of
https://github.com/retspen/webvirtmgr.git
synced 2026-04-25 15:45:51 +03:00
[GH-ISSUE #44] VNC settings #34
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ghost on GitHub (Mar 19, 2013).
Original GitHub issue: https://github.com/retspen/webvirtmgr/issues/44
I love the webvirtmgr. For the users in my office that are die hard virt-manager users, is there a way to get the VNC to play nice across both?
On a VM created from webvirtmgr, a console session opens flawlessly. From virt-manager, it asks for a password, but no password I've tried works.
On a VM created from virt-manager, a console session opens and prompts for ssh credentials from webvirtmgr (which is fine if that's the only option)
My issue is that I prefer to create the VMs in webvirtmgr, but thus far I'm not able to give console access to the virt-manager users. Is there a way to get them to play nice together?
Thanks.
@ghost commented on GitHub (Mar 19, 2013):
In a dev folder, I downloaded the latest release and saw that there's a novnc option. I installed pre-requisits and started up the ./manage.py runserver option to test. I see the enable novnc option, but that wasn't working either. I was getting a connection error at the top of the VNC window "Server disconnected (code: 1006)"
I'm also getting a VNC password prompt when I revert back to the original set of files now. I never specified a VNC password, so I don't have console access via webvirtmgr at the moment.
Thanks.
@retspen commented on GitHub (Mar 19, 2013):
For revert back vm setting, need edit vm xml:
$ virsh edit vm_name
and delete only: 'passwd=xxxxxxx'
xxxxx - your autogen password
@retspen commented on GitHub (Mar 19, 2013):
Reinstall and setup server for use latest version WebVirtMgr. README and setup docs changed.
@ghost commented on GitHub (Mar 19, 2013):
I don't see a passwd config in the xml.
Here's my output:
administrator@qp-kvm-ibm:/var/www/webvirtmgr$ virsh list | grep mchammer
12 mchammer running
administrator@qp-kvm-ibm:/var/www/webvirtmgr$ virsh dumpxml mchammer | grep
passwd
administrator@qp-kvm-ibm:/var/www/webvirtmgr$
On Tue, Mar 19, 2013 at 2:05 PM, Anatoliy Guskov
notifications@github.comwrote:
@retspen commented on GitHub (Mar 19, 2013):
dumpxml not showing password line, use edit
@ghost commented on GitHub (Mar 19, 2013):
I used virsh edit the first time and didn't see it, I thought showing the
dumpxml would prove it.
I have the edit screen open on the VM and I don't see any line including
the text passwd. I even did a /passwd search in vi and didn't get any
matches.
On Tue, Mar 19, 2013 at 2:21 PM, Anatoliy Guskov
notifications@github.comwrote:
@retspen commented on GitHub (Mar 19, 2013):
You click button "Enable noVNC" ?
@ghost commented on GitHub (Mar 19, 2013):
Yes, I clicked "Enable noVNC" and the buttone for "Enable noVNC" is no
longer available for that VM. But when I click on console, I get a window
with an error "Failed to connect to server (code: 1006)"
if I create a brand new VM, I DO see the passwd line in the virsh edit
screen and the console works fine on it.
On Tue, Mar 19, 2013 at 2:35 PM, Anatoliy Guskov
notifications@github.comwrote:
@retspen commented on GitHub (Mar 19, 2013):
Fix this bug. Button "Enable noVNC" must showing when VM shutoff and created not in WebVirtMgr.
@ghost commented on GitHub (Mar 26, 2013):
I updated this morning and ran the runserver option of ./manage.py.
Whenever I click the console button, I'm getting a new window with an instant error at the top: "Failed to connect to server (code: 1006)".
On the server side, I get the following output:
[26/Mar/2013 12:58:00] "POST /vm/1/Win2k8noGUI/ HTTP/1.1" 302 0
[26/Mar/2013 12:58:01] "GET /vm/1/Win2k8noGUI/ HTTP/1.1" 200 8788
sh: 1: kill: Usage: kill [-s sigspec | -signum | -sigspec] [pid | job]... or
kill -l [exitstatus]
WebSocket server settings:
Traceback (most recent call last):
File "/usr/bin/websockify", line 278, in
server.start_server()
File "/usr/lib/python2.7/dist-packages/novnc/websocket.py", line 760, in start_server
lsock = self.socket(self.listen_host, self.listen_port)
File "/usr/lib/python2.7/dist-packages/novnc/websocket.py", line 170, in socket
sock.bind(addrs[0][4])
File "/usr/lib/python2.7/socket.py", line 224, in meth
return getattr(self._sock,name)(*args)
socket.error: [Errno 98] Address already in use
[26/Mar/2013 12:58:03] "GET /vnc/1/Win2k8noGUI/ HTTP/1.1" 200 4208
@retspen commented on GitHub (Mar 26, 2013):
Ubuntu ???
@ghost commented on GitHub (Mar 26, 2013):
Correct. 12.04, all recent patches as of this morning. The box runs
nothing other than a base install using the tasksel option to install
SSH/Samba/LAMP/KVM and whatever is required for webvirtmgr & virt-manager.
On Tue, Mar 26, 2013 at 7:07 AM, Anatoliy Guskov
notifications@github.comwrote:
@retspen commented on GitHub (Mar 26, 2013):
$ sudo service novnc stop
$ sudo update-rc.d -f novnc remove
@ghost commented on GitHub (Mar 26, 2013):
That's what it was. When I run it without the "-f" option, I get:
administrator@qp-kvm-ibm:~/webvirtmgrSandbox/webvirtmgr$ sudo update-rc.d
novnc remove
update-rc.d: /etc/init.d/novnc exists during rc.d purge (use -f to force)
But with the -f:
administrator@qp-kvm-ibm:~/webvirtmgrSandbox/webvirtmgr$ sudo update-rc.d
-f novnc remove
Removing any system startup links for /etc/init.d/novnc ...
/etc/rc0.d/K20novnc
/etc/rc1.d/K20novnc
/etc/rc2.d/S20novnc
/etc/rc3.d/S20novnc
/etc/rc4.d/S20novnc
/etc/rc5.d/S20novnc
/etc/rc6.d/K20novnc
and it all works!!!
Should the "-f" option be added to the instructions? Thanks!!!
On Tue, Mar 26, 2013 at 7:12 AM, Anatoliy Guskov
notifications@github.comwrote:
@retspen commented on GitHub (Mar 26, 2013):
Ok. Fix it.
@boozedog commented on GitHub (Mar 27, 2013):
I'm getting the same issue. Ubuntu 12.04 with all patches and latest webvirtmgr code.
Tried
$ sudo service novnc stop
$ sudo update-rc.d -f novnc remove
But still getting Server disconnected (code: 1006) when I click console.
@retspen commented on GitHub (Mar 28, 2013):
You have running processes ?
$ ps axf | grep websockify
@boozedog commented on GitHub (Mar 28, 2013):
Yes:
david@ubuntu:~/images$ ps axf | grep websockify
6785 pts/1 S+ 0:00 _ grep --color=auto websockify
6781 ? S 0:00 python /usr/bin/websockify 6080 127.0.0.1:5900 -D
On Thu, Mar 28, 2013 at 3:14 AM, Anatoliy Guskov
notifications@github.comwrote:
@retspen commented on GitHub (Mar 28, 2013):
Can you connected to VNC (127.0.0.1:5900)?
@boozedog commented on GitHub (Mar 28, 2013):
Yes! When I connect to VNC I see the console of the guest OS.
@retspen commented on GitHub (Mar 28, 2013):
$ telnet 127.0.0.1 6080
Connected ?
@boozedog commented on GitHub (Mar 28, 2013):
Connects momentarily and then disconnects itself:
david@ubuntu:~/images$ telnet 127.0.0.1 6080
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
Connection closed by foreign host.
On Thu, Mar 28, 2013 at 3:25 PM, Anatoliy Guskov
notifications@github.comwrote:
@retspen commented on GitHub (Mar 28, 2013):
@boozedog commented on GitHub (Mar 28, 2013):
Am now able to connect on telnet. Connection from VNC client also works. But when I run web console, I still get same
Server disconnected (code: 1006)message.@retspen commented on GitHub (Mar 28, 2013):
Sorry,
$ sudo killall websockify
$ sudo websockify 6080 127.0.0.1:5900
$ telnet 127.0.0.1 6080
@boozedog commented on GitHub (Mar 28, 2013):
Still able to VNC to port 5900. Message 1 above is where I tried to connect using VNC client. Message 2 is when I used
telnet 127.0.0.1 6080.@retspen commented on GitHub (Mar 28, 2013):
OpenStack users have same problem too. Maybe DNS can not resorv ip, add ip to hosts.
Try run:
$ websockify 127.0.0.1:6080 127.0.0.1:5900
OR
$ websockify 172.16.19.1:6080 127.0.0.1:5900
@boozedog commented on GitHub (Mar 28, 2013):
No joy.
One thing I notice when I check the JavaScript in the vnc web page --
Does that mean the web page is trying to connect to localhost (127.0.0.1) rather than the KVM server (172.16.19.138) ?
@retspen commented on GitHub (Mar 29, 2013):
Can you describe your network diagram? WebVirtMgr install on server where use KVM?
@boozedog commented on GitHub (Mar 29, 2013):
Yes both on same server.
On Mar 29, 2013, at 2:52, Anatoliy Guskov notifications@github.com wrote:
Can you describe your network diagram? WebVirtMgr install on server where
use KVM?
—
Reply to this email directly or view it on
GitHubhttps://github.com/retspen/webvirtmgr/issues/44#issuecomment-15630751
.
@retspen commented on GitHub (Mar 29, 2013):
When your run same problem?
$ websockify 6080 176.9.19.138:5900
@boozedog commented on GitHub (Mar 30, 2013):
I assume you mean
websockify 6080 172.16.19.138:5900...Looks like same problem when I try to connect using KVM client directly to port 6080:
When I try to connect using the web console, my websockify is killed and the daemon is started. And I'm still seeing
Server disconnected (code: 1006)in my web browser.Did you see my note above about the Javascript? It seems strange to me that Javascript (the client) would try to connect to 127.0.0.1 ...
@retspen commented on GitHub (Mar 30, 2013):
IP address is taken from dashboard page. What IP you input in dashboard page? Something is blocking creating socket on server.
@boozedog commented on GitHub (Mar 30, 2013):
Success! I had put 127.0.0.1 on the dashboard page. I changed that to the public IP of the server and now I can get console in the browser.
Thanks for all your help!
@Ulv3r commented on GitHub (Apr 18, 2013):
i've had a little issue with vnc connections... i follow all the procedures described here.. without success , but the leadme at the point of the connecting issue in webconsole is related to how kvm start the vnc's console... by default , parameter vnc_listen (in /etc/libvirt/qemu.conf) it's set only for listen at 127.0.0.1 and according to info posted here the ip is taken from the dashboard for it's the socksify process couldn't be avaible...
at my case also must i set this parameter as following
vnc_listen = "0.0.0.0"
and voilá
@swatcat commented on GitHub (Jul 16, 2013):
Failed to connect the server: error code 1006 on redhat enterprise server. I removed "password = autogenerated password" but nothingg works for me.
@retspen commented on GitHub (Jul 17, 2013):
Port 59xx for VNC open ?
@jaydeepch15 commented on GitHub (Feb 15, 2014):
My KVM and webvirtmgr is installed on same server (CentOS 6.5)
followed below link to install webvirtmgr
https://github.com/retspen/webvirtmgr/wiki/Install-WebVirtMgr
Getting same error
Failed to connect to server (code: 1006)
When I run
[root@kvm ~]# websockify 6080 10.10.8.107:5900
WebSocket server settings:
Traceback (most recent call last):
File "/usr/bin/websockify", line 9, in
load_entry_point('websockify==0.4.1', 'console_scripts', 'websockify')()
File "/usr/lib/python2.6/site-packages/websockify/websocketproxy.py", line 390, in websockify_init
server.start_server()
File "/usr/lib/python2.6/site-packages/websockify/websocket.py", line 834, in start_server
lsock = self.socket(self.listen_host, self.listen_port, False, self.prefer_ipv6)
File "/usr/lib/python2.6/site-packages/websockify/websocket.py", line 198, in socket
sock.bind(addrs[0][4])
File "", line 1, in bind
socket.error: [Errno 98] Address already in use
Removed comment in /etc/libvirt/qemu.conf file, then restart libvirted service.
vnc_listen = "0.0.0.0"
&
remote_display_port_min = 5900
remote_display_port_max = 65535
FYI
I haven't created VM from Webvirtmgr, I had created it from backend
[root@kvm ~]# virt-install --connect qemu:///system -n vm10 -r 1024 --vcpus=2 --disk path=/var/lib/libvirt/images/vm10.img,size=12 -c /dev/sr0 --vnc --noautoconsole --os-type windows --os-variant win7 --accelerate --network=bridge:br0 --hvm
@wmariuss commented on GitHub (Dec 1, 2014):
I have the same issue running over https. Server disconnected (code: 1006)
@ghost commented on GitHub (May 9, 2015):
I have the same problem when running over https.
Server disconnected (code: 1006)
@howels commented on GitHub (Aug 16, 2015):
Same issue running over HTTPS, main site works but console connects are messed up. Interestingly I also get a timeout when I try to access console connections via DNS instead of the direct IP.
@lord-kyron commented on GitHub (May 10, 2018):
Hello all,
I know this project is long forgotten, but I am experiencing the same issue like @howels.
Over HTTPS everything else is working, except the noVNC. I have a domain name and when I try to access the system over the domain name, the noVNC is timing out. It is working when I use the IPaddress:port. I am using the WebVirtCloud project now, but the issue is the same and persists there too. Did any one of you found a solution to this?
@ghost commented on GitHub (May 10, 2018):
Hello @Bandic007
I am using over https with let's encrypt and everything working fine. My settings.py was changed to support https. Could you please share your settings.py?
Thanks.
@lord-kyron commented on GitHub (May 10, 2018):
I was not able to find info how to properly setup setup noVNC to use SSL.
Can you share me your settings.py file and explain me in brief what and where did you done and changed (if there are other files that needs additional changes) so that I can set it up and test?
Just FYI - I am using CloudFlare and the SSL certificate is not local on the host, but it is the cloudflare ssl that I am using. My setup is more specific and I don't know if it can work like that, but anyway - please, explain to me so that I can move to LetsEncrypt eventually in order to use the VNC over SSL!
Thank you very much!
@ghost commented on GitHub (May 10, 2018):
Hi @Bandic007
See mey settings.py with the certificate. My certificate file is stored at the same server that I am running webvirtcloud.
WebVirtCloud settings
Wobsock port
WS_PORT = 6080
Websock host
WS_HOST = "panel.yourdomain.com"
Websock public port
WS_PUBLIC_HOST = "panel.yourdomain.com"
Websock SSL connection
#WS_CERT = "/etc/ssl/certificate.pem"
WS_CERT = "/etc/letsencrypt/live/panel.yourdomain.com/fullchain.pem"
@lord-kyron commented on GitHub (May 15, 2018):
I see but I am using CloudFlare and my SSL certificate is not locally stored on the host, but it is being offloaded on cloudfalre portal. I am using their share SSL cert... Maybe this is my problem?
@multfaciladm commented on GitHub (May 15, 2018):
for sure it is your problem. The settings.py is looking for the cert locally.