Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Xen: Users

problems connecting to HVM guest OS via VNC Viewer

 

 

Xen users RSS feed   Index | Next | Previous | View Threaded


jane.wayne2978 at gmail

May 28, 2012, 8:59 PM

Post #1 of 4 (490 views)
Permalink
problems connecting to HVM guest OS via VNC Viewer

i am following the instructions at
https://help.ubuntu.com/community/XenProposed to install Xen + Ubuntu.
i have already installed successfully a PV guest OS (Ubuntu Server
12.04). now i am trying to install a HVM guest OS (Ubuntu Desktop
12.04). however, i cannot seem to connect to the instance after i
start it up. the HVM configuration file looks like the following.

builder = "hvm"
name = "ubuntu-hvm"
memory = 512
vcpus = 1
vif = [' ']
disk = ['phy:/dev/xenub/ubuntu-hvm,hda,w','file:/home/jwane/ubuntu-12.04-desktop-amd64.iso,hdc:cdrom,r']
vnc = 1
boot = "d"

i start the HVM guest os with the following command

sudo xm create ubuntu-hvm.cfg

to make sure the HVM guest os is running, i type in the following command

sudo xm list

and i get the following output

Name ID Mem VCPUs State Time(s)
Domain-0 0 22622 8 r----- 63.9
ubuntu-hvm 1 512 1 -b---- 2489.2

on my windows box, i download vnc viewer, and try to connect to my
Dom0 at 192.168.0.201, but i get the following message

unable to connect to host: Connection refused (10061)

so, as a sanity check, on the Dom0 console, i try to ping as follows.

ping localhost
ping 127.0.0.1
ping 192.168.0.201

all pings were successful. so next, i try to telnet as follows.

telnet localhost 5900
telnet 127.0.0.1 5900
telnet 192.168.0.201 5900

the telnet to the LAN IP does not work. i get: telnet: Unable to
connect to remote host: Connection refused. the telnet to localhost
and 127.0.0.1 works.

so, for some reason, port 5900 is not working on the LAN IP
(192.168.0.201). if i can't get to the IP and port from Dom0, i sure
won't be able to get to that IP and port from another location.

i also did another sanity check to make sure the port is opened.

sudo netstat -tcp --listening --programs

and my results are as follows.

Proto Recv-Q Send-Q Local_Address Foreign_Address State
PID/Program_name
tcp 0 0 localhost:5900 *:*
LISTEN 2097/qemu-dm
tcp 0 0 192.168.122.1:domain *:*
LISTEN 5653/dnsmasq
tcp 0 0 *:ssh *:*
LISTEN 1198/sshd
tcp 0 0 [::]:ssh [::]:*
LISTEN 1198/sshd

my questions are:
1. why can't i connect to the LAP IP and port 5900 from Dom0 and
another location using telnet or VNC?
2. i also tried to connect using "sudo gvncviewer localhost:0" and
"sudo gvncviewer localhost:5900" from Dom0, but get "Cannot open
display". are there missing dependencies?

any help is appreciated.

thanks.

_______________________________________________
Xen-users mailing list
Xen-users [at] lists
http://lists.xen.org/xen-users


steven.eychenne at telecom-paristech

May 29, 2012, 1:33 AM

Post #2 of 4 (456 views)
Permalink
Re: problems connecting to HVM guest OS via VNC Viewer [In reply to]

On Tue, May 29, 2012 at 5:59 AM, Jane Wayne <jane.wayne2978 [at] gmail> wrote:
> i am following the instructions at
> https://help.ubuntu.com/community/XenProposed to install Xen + Ubuntu.
> i have already installed successfully a PV guest OS (Ubuntu Server
> 12.04). now i am trying to install a HVM guest OS (Ubuntu Desktop
> 12.04). however, i cannot seem to connect to the instance after i
> start it up. the HVM configuration file looks like the following.
>
> builder = "hvm"
> name = "ubuntu-hvm"
> memory = 512
> vcpus = 1
> vif = [' ']
> disk = ['phy:/dev/xenub/ubuntu-hvm,hda,w','file:/home/jwane/ubuntu-12.04-desktop-amd64.iso,hdc:cdrom,r']
> vnc = 1
> boot = "d"
>
[...]
>
> sudo netstat -tcp --listening --programs
>
> and my results are as follows.
>
> Proto Recv-Q Send-Q Local_Address           Foreign_Address State
> PID/Program_name
> tcp    0          0          localhost:5900            *:*
>         LISTEN   2097/qemu-dm
> tcp    0          0          192.168.122.1:domain *:*
>    LISTEN   5653/dnsmasq
> tcp    0          0          *:ssh                         *:*
>             LISTEN    1198/sshd
> tcp    0          0          [::]:ssh                      [::]:*
>              LISTEN   1198/sshd


Hi,

Your vncserver is only listening on localhost. You should add this
lines in your HVM configuration file or edit a similar line in
xend-config.sxp.

#----------------------------------------------------------------------------
# address that should be listened on for the VNC server if vnc is set.
# default is to use 'vnc-listen' setting from
# auxbin.xen_configdir() + /xend-config.sxp
#vnclisten="127.0.0.1"
vnclisten="192.168.0.0"
#vnclisten="0.0.0.0"


You can also use SSH like
http://ucdirc.ucdavis.edu/computing/vnc_ssh_tunnel.php and keep your
vncserver listen on localhost.

ssh -L 5900:localhost:5900 jane [at] 192
vncviewer localhost:5900


Regards,
Steven

_______________________________________________
Xen-users mailing list
Xen-users [at] lists
http://lists.xen.org/xen-users


Ian.Campbell at citrix

May 29, 2012, 1:37 AM

Post #3 of 4 (456 views)
Permalink
Re: problems connecting to HVM guest OS via VNC Viewer [In reply to]

On Tue, 2012-05-29 at 04:59 +0100, Jane Wayne wrote:
> on my windows box, i download vnc viewer, and try to connect to my
> Dom0 at 192.168.0.201, but i get the following message
>
> unable to connect to host: Connection refused (10061)

> my questions are:
> 1. why can't i connect to the LAP IP and port 5900 from Dom0 and
> another location using telnet or VNC?

By default, for security reasons, the vnc server only listens on
localhost (127.0.0.1) so you can only connect to it from the xen host
itself and not externally.

If you want to connect externally you can add
vnclisten = "0.0.0.0"
to your guest configuration (0.0.0.0 means "all interfaces", instead you
could also give a specific host IP address to listen on). You almost
certainly also want
vncpasswd = "password"
otherwise the connect is totally unsecured. Even with this it is
unencrypted. You might want to investigate ssh tunnelling or the TLS
options too.

> 2. i also tried to connect using "sudo gvncviewer localhost:0" and
> "sudo gvncviewer localhost:5900" from Dom0, but get "Cannot open
> display". are there missing dependencies?

You need to use ssh X11 forwarding for this to to work, try "ssh -Y
<host>". Obviously you need an xserver on the client end too -- you
mention a windows client so I have no idea where you would get one of
those.

Ian.


_______________________________________________
Xen-users mailing list
Xen-users [at] lists
http://lists.xen.org/xen-users


jane.wayne2978 at gmail

May 29, 2012, 3:05 AM

Post #4 of 4 (447 views)
Permalink
Re: problems connecting to HVM guest OS via VNC Viewer [In reply to]

ian and steven, thanks, that really helped.

On Tue, May 29, 2012 at 4:37 AM, Ian Campbell <Ian.Campbell [at] citrix> wrote:
> On Tue, 2012-05-29 at 04:59 +0100, Jane Wayne wrote:
>> on my windows box, i download vnc viewer, and try to connect to my
>> Dom0 at 192.168.0.201, but i get the following message
>>
>> unable to connect to host: Connection refused (10061)
>
>> my questions are:
>> 1. why can't i connect to the LAP IP and port 5900 from Dom0 and
>> another location using telnet or VNC?
>
> By default, for security reasons, the vnc server only listens on
> localhost (127.0.0.1) so you can only connect to it from the xen host
> itself and not externally.
>
> If you want to connect externally you can add
>        vnclisten = "0.0.0.0"
> to your guest configuration (0.0.0.0 means "all interfaces", instead you
> could also give a specific host IP address to listen on). You almost
> certainly also want
>        vncpasswd = "password"
> otherwise the connect is totally unsecured. Even with this it is
> unencrypted. You might want to investigate ssh tunnelling or the TLS
> options too.
>
>> 2. i also tried to connect using "sudo gvncviewer localhost:0" and
>> "sudo gvncviewer localhost:5900" from Dom0, but get "Cannot open
>> display". are there missing dependencies?
>
> You need to use ssh X11 forwarding for this to to work, try "ssh -Y
> <host>". Obviously you need an xserver on the client end too -- you
> mention a windows client so I have no idea where you would get one of
> those.
>
> Ian.
>

_______________________________________________
Xen-users mailing list
Xen-users [at] lists
http://lists.xen.org/xen-users

Xen users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.