Can't get xenconsole to work -- hangs with no output

classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|

Can't get xenconsole to work -- hangs with no output

Rich Wales
Xen version 4.6.5, running on Ubuntu 16.04.5 LTS.

I can't connect to the console of a domU.  I have tried xl console domu-name, but it just hangs with no output, and I need to open a separate ssh session to the dom0 and do a kill -1 of the xenconsole process.

The exact same thing happens if I do xl console -c domu-config-file.

In case it matters, the domU is running Ubuntu 16.04.4.

I'm obviously doing something wrong, but I can't find whatever how-to document might exist to explain exactly how I'm supposed to configure everything so the console will work.  Any help will be gratefully appreciated.
--
Rich Wales
[hidden email]

_______________________________________________
Xen-users mailing list
[hidden email]
https://lists.xenproject.org/mailman/listinfo/xen-users
Reply | Threaded
Open this post in threaded view
|

Re: Can't get xenconsole to work -- hangs with no output

Tomas Mozes
https://wiki.xen.org/wiki/Xen_Common_Problems#Console

On Thursday, December 27, 2018, Rich Wales <[hidden email]> wrote:

> Xen version 4.6.5, running on Ubuntu 16.04.5 LTS.
>
> I can't connect to the console of a domU.  I have tried xl console domu-name, but it just hangs with no output, and I need to open a separate ssh session to the dom0 and do a kill -1 of the xenconsole process.
>
> The exact same thing happens if I do xl console -c domu-config-file.
>
> In case it matters, the domU is running Ubuntu 16.04.4.
>
> I'm obviously doing something wrong, but I can't find whatever how-to document might exist to explain exactly how I'm supposed to configure everything so the console will work.  Any help will be gratefully appreciated.
> --
> Rich Wales
> [hidden email]
_______________________________________________
Xen-users mailing list
[hidden email]
https://lists.xenproject.org/mailman/listinfo/xen-users
Reply | Threaded
Open this post in threaded view
|

CORRECTION: Can't get xenconsole to work -- hangs with no output

Rich Wales
In reply to this post by Rich Wales

The exact same thing happens if I do xl console -c domu-config-file.

I meant, of course, xl create -c domu-config-file in the above.  Sorry for the mixup.

In case it matters, the domU is running Ubuntu 16.04.4.

And I also couldn't connect to the console when running the Ubuntu 18.04 installation ISO image.  So I'm tentatively guessing the problem has nothing to do with Grub options in the guest OS.
--
Rich Wales
[hidden email]

_______________________________________________
Xen-users mailing list
[hidden email]
https://lists.xenproject.org/mailman/listinfo/xen-users
Reply | Threaded
Open this post in threaded view
|

Re: Can't get xenconsole to work -- hangs with no output

Rich Wales
In reply to this post by Tomas Mozes
On 2018-12-27 02:36, Tomas Mozes wrote:   https://wiki.xen.org/wiki/Xen_Common_Problems#Console

No luck.  Xenconsoled was running on the dom0; I killed it, but I couldn't find any "official" way of restarting it, so I just typed the xenconsoled command which had been running before I killed it.

I did an xl create -c command for the domU, and the domU started up, but the console never appeared (even though there was a /usr/lib/xen-4.6/bin/xenconsole process running), and I had to kill the xenconsole process from a different terminal.

I'm not trying to launch more than one console session on this domU; I'm only trying to launch one, and it won't even let me do that.

In case it matters any, I'm connecting to the dom0 from a separate workstation, by launching a gnome-terminal window with an ssh command as its -x argument.  I have ForwardX11 yes in my .ssh/config file for the dom0 server.  Do I, perhaps, need to do something different, or something more, in order for the console window to show up on my workstation?

I would like to avoid rebooting the dom0 server if at all possible, but I'm prepared to do that if necessary, since I absolutely must have access to a console on the domU in order to do anything at all.
--
Rich Wales
[hidden email]

_______________________________________________
Xen-users mailing list
[hidden email]
https://lists.xenproject.org/mailman/listinfo/xen-users
Reply | Threaded
Open this post in threaded view
|

Re: Can't get xenconsole to work -- hangs with no output

Tomas Mozes
Can you please share your domu-config?

On Thursday, December 27, 2018, Rich Wales <[hidden email]> wrote:

> On 2018-12-27 02:36, Tomas Mozes wrote:   https://wiki.xen.org/wiki/Xen_Common_Problems#Console
>
> No luck.  Xenconsoled was running on the dom0; I killed it, but I couldn't find any "official" way of restarting it, so I just typed the xenconsoled command which had been running before I killed it.
>
> I did an xl create -c command for the domU, and the domU started up, but the console never appeared (even though there was a /usr/lib/xen-4.6/bin/xenconsole process running), and I had to kill the xenconsole process from a different terminal.
>
> I'm not trying to launch more than one console session on this domU; I'm only trying to launch one, and it won't even let me do that.
>
> In case it matters any, I'm connecting to the dom0 from a separate workstation, by launching a gnome-terminal window with an ssh command as its -x argument.  I have ForwardX11 yes in my .ssh/config file for the dom0 server.  Do I, perhaps, need to do something different, or something more, in order for the console window to show up on my workstation?
>
> I would like to avoid rebooting the dom0 server if at all possible, but I'm prepared to do that if necessary, since I absolutely must have access to a console on the domU in order to do anything at all.
> --
> Rich Wales
> [hidden email]
_______________________________________________
Xen-users mailing list
[hidden email]
https://lists.xenproject.org/mailman/listinfo/xen-users
Reply | Threaded
Open this post in threaded view
|

Re: Can't get xenconsole to work -- hangs with no output

Rich Wales

Can you please share your domu-config?

name = "shield"
builder = "hvm"
memory = 4096
vcpus = 2
device_model_version = "qemu-xen"
serial = "pty"
acpi = 1
vnc = 1
vif  = ['ip=10.0.223.149/32,mac=00:16:3e:ff:df:95,bridge=xenbr0',
        'mac=00:16:3e:fe:47:0a,bridge=xenbr1'
       ]
disk = [
        'file:/etc/xen/ubuntu-18.04.1-server-amd64.iso,sdc:cdrom,r',
        'phy:/dev/md1,xvda,w'
       ]
--
Rich Wales
[hidden email]

_______________________________________________
Xen-users mailing list
[hidden email]
https://lists.xenproject.org/mailman/listinfo/xen-users
Reply | Threaded
Open this post in threaded view
|

Re: Can't get xenconsole to work -- hangs with no output

andy smith-10
Hello,

On Thu, Dec 27, 2018 at 06:21:22PM -0800, Rich Wales wrote:
>
> > // /Can you please share your domu-config? /
>
> name = "shield"
> builder = "hvm"

As alluded to at
https://wiki.xen.org/wiki/Xen_Common_Problems#Can_I_set_up_Xen_HVM_Linux_guest_to_display_the_kernel_boot_messages_on_.22xl_console.22_.3F
what you have is a HVM guest so the console inside the guest is
ttyS0. Unless your guest has been configured to log to ttyS0 and
present a login prompt on ttyS0, you aren't going to see anything or
get any response when you type things.

If it were a PV guest then we'd be talking hvc0 instead of ttyS0,
but same deal.

Cheers,
Andy

_______________________________________________
Xen-users mailing list
[hidden email]
https://lists.xenproject.org/mailman/listinfo/xen-users
Reply | Threaded
Open this post in threaded view
|

Re: Can't get xenconsole to work -- hangs with no output

Rich Wales
On 2018-12-27 18:37, Andy Smith wrote:

what you have is a HVM guest so the console inside the guest is ttyS0. Unless your guest has been configured to log to ttyS0 and present a login prompt on ttyS0, you aren't going to see anything or get any response when you type things.

But I have no control over how the guest is configured, because I am running an Ubuntu installation CD-ROM image (which I cannot change in any way).  What do I need to use in my domU configuration file in order for me to be able to interact with the console?
--
Rich Wales
[hidden email]

_______________________________________________
Xen-users mailing list
[hidden email]
https://lists.xenproject.org/mailman/listinfo/xen-users
Reply | Threaded
Open this post in threaded view
|

Re: Can't get xenconsole to work -- hangs with no output

Tomas Mozes
How about using VNC?

On Fri, Dec 28, 2018 at 4:15 AM Rich Wales <[hidden email]> wrote:
On 2018-12-27 18:37, Andy Smith wrote:

what you have is a HVM guest so the console inside the guest is ttyS0. Unless your guest has been configured to log to ttyS0 and present a login prompt on ttyS0, you aren't going to see anything or get any response when you type things.

But I have no control over how the guest is configured, because I am running an Ubuntu installation CD-ROM image (which I cannot change in any way).  What do I need to use in my domU configuration file in order for me to be able to interact with the console?
--
Rich Wales
[hidden email]
_______________________________________________
Xen-users mailing list
[hidden email]
https://lists.xenproject.org/mailman/listinfo/xen-users

_______________________________________________
Xen-users mailing list
[hidden email]
https://lists.xenproject.org/mailman/listinfo/xen-users
Reply | Threaded
Open this post in threaded view
|

Re: Can't get xenconsole to work -- hangs with no output

Rich Wales

How about using VNC?

More details, please?  I tried using vncviewer to connect to the domU, but I couldn't get it to work.  Perhaps I messed up the command syntax and/or the domU configuration.  Or is it possible that I've got something messed up with X11 forwarding between the dom0 and my workstation?
--
Rich Wales
[hidden email]

_______________________________________________
Xen-users mailing list
[hidden email]
https://lists.xenproject.org/mailman/listinfo/xen-users
Reply | Threaded
Open this post in threaded view
|

Re: Can't get xenconsole to work -- hangs with no output

Tomas Mozes
Since you have vnc enabled in your domu config, you should see an open port (probably 5900) on dom0 by which you'll see the domu screen.

On Friday, December 28, 2018, Rich Wales <[hidden email]> wrote:
>
> How about using VNC?
>
> More details, please?  I tried using vncviewer to connect to the domU, but I couldn't get it to work.  Perhaps I messed up the command syntax and/or the domU configuration.  Or is it possible that I've got something messed up with X11 forwarding between the dom0 and my workstation?
> --
> Rich Wales
> [hidden email]
_______________________________________________
Xen-users mailing list
[hidden email]
https://lists.xenproject.org/mailman/listinfo/xen-users
Reply | Threaded
Open this post in threaded view
|

Re: Can't get xenconsole to work -- hangs with no output

Rich Wales
On 2018-12-27 23:09, Tomas Mozes wrote:
Since you have vnc enabled in your domu config, you should see an open port (probably 5900) on dom0 by which you'll see the domu screen.

Indeed, I do see port 5900 open on the dom0.  But when I try vncviewer, it gives me "Can't open display" errors.

If I do telnet localhost 5900 on the dom0, I get a one-line response saying RFB 003.008 -- but it doesn't respond to anything I type after that, and it eventually disconnects.

As I said earlier, I suppose I might not have X11 forwarding set up properly between the dom0 and my workstation.  I do have ForwardX11 yes specified in the .ssh/config stanza on my workstation for connecting to the dom0.  But I'm wondering if I need to do something more and/or something different w/r/t the X11 forwarding and/or the vncviewer command.  Any suggestions?
--
Rich Wales
[hidden email]

_______________________________________________
Xen-users mailing list
[hidden email]
https://lists.xenproject.org/mailman/listinfo/xen-users
Reply | Threaded
Open this post in threaded view
|

SOLVED: Re: Can't get xenconsole to work -- hangs with no output

Rich Wales
In the end, it turned out to be an SSH configuration problem, and not a problem with Xen after all.

I added the following new line to /etc/ssh/sshd_config on the dom0 server:
X11UseLocalhost no
(then restarted the SSH service on the dom0, of course)

After doing this and ssh'ing to the dom0, I did vncviewer localhost on the dom0 and got a console window for the domU on my workstation!

xl console still doesn't work, but that's OK, because I can use vncviewer now.

I found this solution on the AskUbuntu site:
https://askubuntu.com/questions/958470/how-to-open-mono-app-with-gui-in-linux-server-without-x

Thanks to Tomas Mozes and Andy Smith for their assistance with my problem.
--
Rich Wales
[hidden email]

_______________________________________________
Xen-users mailing list
[hidden email]
https://lists.xenproject.org/mailman/listinfo/xen-users
Reply | Threaded
Open this post in threaded view
|

Re: SOLVED: Re: Can't get xenconsole to work -- hangs with no output

Tomas Mozes
Glad it works for you now :)

On Friday, December 28, 2018, Rich Wales <[hidden email]> wrote:

> In the end, it turned out to be an SSH configuration problem, and not a problem with Xen after all.
>
> I added the following new line to /etc/ssh/sshd_config on the dom0 server:
> X11UseLocalhost no
> (then restarted the SSH service on the dom0, of course)
>
> After doing this and ssh'ing to the dom0, I did vncviewer localhost on the dom0 and got a console window for the domU on my workstation!
>
> xl console still doesn't work, but that's OK, because I can use vncviewer now.
>
> I found this solution on the AskUbuntu site:
> https://askubuntu.com/questions/958470/how-to-open-mono-app-with-gui-in-linux-server-without-x
>
> Thanks to Tomas Mozes and Andy Smith for their assistance with my problem.
> --
> Rich Wales
> [hidden email]
_______________________________________________
Xen-users mailing list
[hidden email]
https://lists.xenproject.org/mailman/listinfo/xen-users