ma qiang
2010-Jan-22 02:53 UTC
[Xen-users] Help: cannot attach to the domain''s console. why?
Hi all, I have one question, who can help me? I have installed a centos as a guestos based on xen, my config as below: kernel = "/usr/lib/xen/boot/hvmloader" builder = ''hvm'' name = "test" memory = 1024 disk = [ ''file:/srv/xen/test.img,hda,w'', ''file:/root/xen/CentOS-5.4-i386-bin-DVD.iso,hdc:cdrom,r'' boot = "d" vif = [ ''type=ioemu, bridge=eth1'' ] vcpus=1 on_reboot = ''restart'' on_crash = ''restart'' sdl=0 vnc=1 vnclisten="0.0.0.0" vncpasswd=''password'' stdvga=0 serial=''pty'' usbdevice=''tablet'' I used "xm create test" to create a domain, and used the vncviewer to control the installation of centos. After that, the system runs ok, nothing wrong. I can attach to this domain''s VNC server by using "xm vncviewer test". However, now if I use "xm console test", nothing print, like the command hangs. Who can help me? Thanks a lot. Qiang Ma Fudan University _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Fajar A. Nugraha
2010-Jan-22 03:50 UTC
Re: [Xen-users] Help: cannot attach to the domain''s console. why?
On Fri, Jan 22, 2010 at 9:53 AM, ma qiang <maqiang1984@gmail.com> wrote:> kernel = "/usr/lib/xen/boot/hvmloader" > builder = ''hvm''> After that, the system runs ok, nothing wrong. I can attach to this > domain''s VNC server by using "xm vncviewer test". > However, now if I use "xm console test", nothing print, like the command hangs."xm vncviewer" -> connects to domU''s GUI (vga/tty1). This is enabled by default "xm console" -> connects to domU''s "serial" console (ttyS0 on hvm guests, xvc0/hvc0 on PV guests). Not enabled by default. Had you install Centos domU with "console=ttyS0", it would setup the serial console. Since it''s already running, you need to setup serial console manually. Something like http://www.linuxdynasty.org/how-to-setup-serial-console-on-linux.html -- Fajar _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
ma qiang
2010-Jan-22 06:32 UTC
Re: [Xen-users] Help: cannot attach to the domain''s console. why?
hi, Thanks for your reply. At first, I have setup serial console manually as http://www.linuxdynasty.org/how-to-setup-serial-console-on-linux.html. But after reboot domU and type "xm console test", nothing print and command hangs. So I have tried reinstall domU with "console=ttyS0", I don''t know if I use the correct config. I add "console=''ttyS0''" at the bottom of config file. you can see as below: kernel = "/usr/lib/xen/boot/hvmloader" builder = ''hvm'' name = "test" memory = 1024 disk = [ ''file:/srv/xen/test.img,hda,w'', ''file:/root/xen/CentOS-5.4-i386-bin-DVD.iso,hdc:cdrom,r'' boot = "d" vif = [ ''type=ioemu, bridge=eth1'' ] vcpus=1 on_reboot = ''restart'' on_crash = ''restart'' sdl=0 vnc=1 vnclisten="0.0.0.0" vncpasswd=''password'' stdvga=0 serial=''pty'' usbdevice=''tablet'' console=''ttyS0'' But the same thing happened, after reboot domU and type "xm console test", nothing print and command hangs. :) , I am confused about that. Thank you again! Best Wishes! Qiang Ma On Fri, Jan 22, 2010 at 11:50 AM, Fajar A. Nugraha <fajar@fajar.net> wrote:> On Fri, Jan 22, 2010 at 9:53 AM, ma qiang <maqiang1984@gmail.com> wrote: >> kernel = "/usr/lib/xen/boot/hvmloader" >> builder = ''hvm'' > >> After that, the system runs ok, nothing wrong. I can attach to this >> domain''s VNC server by using "xm vncviewer test". >> However, now if I use "xm console test", nothing print, like the command hangs. > > "xm vncviewer" -> connects to domU''s GUI (vga/tty1). This is enabled by default > "xm console" -> connects to domU''s "serial" console (ttyS0 on hvm > guests, xvc0/hvc0 on PV guests). Not enabled by default. > > Had you install Centos domU with "console=ttyS0", it would setup the > serial console. Since it''s already running, you need to setup serial > console manually. Something like > http://www.linuxdynasty.org/how-to-setup-serial-console-on-linux.html > > -- > Fajar >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
ma qiang
2010-Jan-22 07:58 UTC
Re: [Xen-users] Help: cannot attach to the domain''s console. why?
Hi, Thanks a lot. I can connect to domU''s console by munally updating /etc/inittab and grub.conf, but a little trouble is that after my type "xm console test& enter", the console cannot print until I enter again. So I thought that doesn''t work. Now I want to setup serial console automaticly when I install centos domU. I add "console=''ttyS0''" to config file and install the centos in domU. The config file is attached as below. kernel = "/usr/lib/xen/boot/hvmloader" builder = ''hvm'' name = "test" memory = 1024 disk = [ ''file:/srv/xen/test.img,hda,w'', ''file:/root/xen/CentOS-5.4-i386-bin-DVD.iso,hdc:cdrom,r'' boot = "d" vif = [ ''type=ioemu, bridge=eth1'' ] vcpus=1 on_reboot = ''restart'' on_crash = ''restart'' sdl=0 vnc=1 vnclisten="0.0.0.0" vncpasswd=''password'' stdvga=0 serial=''pty'' usbdevice=''tablet'' console=''ttyS0'' //--------I add this line-----------// I don''t know if I am right. Can you help me again? Thank you very much. Best Wishes! Qiang Ma On Fri, Jan 22, 2010 at 11:50 AM, Fajar A. Nugraha <fajar@fajar.net> wrote:> On Fri, Jan 22, 2010 at 9:53 AM, ma qiang <maqiang1984@gmail.com> wrote: >> kernel = "/usr/lib/xen/boot/hvmloader" >> builder = ''hvm'' > >> After that, the system runs ok, nothing wrong. I can attach to this >> domain''s VNC server by using "xm vncviewer test". >> However, now if I use "xm console test", nothing print, like the command hangs. > > "xm vncviewer" -> connects to domU''s GUI (vga/tty1). This is enabled by default > "xm console" -> connects to domU''s "serial" console (ttyS0 on hvm > guests, xvc0/hvc0 on PV guests). Not enabled by default. > > Had you install Centos domU with "console=ttyS0", it would setup the > serial console. Since it''s already running, you need to setup serial > console manually. Something like > http://www.linuxdynasty.org/how-to-setup-serial-console-on-linux.html > > -- > Fajar >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Fajar A. Nugraha
2010-Jan-22 10:26 UTC
Re: [Xen-users] Help: cannot attach to the domain''s console. why?
On Fri, Jan 22, 2010 at 2:58 PM, ma qiang <maqiang1984@gmail.com> wrote:> Hi, > Thanks a lot. I can connect to domU''s console by munally updating > /etc/inittab and grub.conf,there''s also /etc/securetty> but a little trouble is that after my type > "xm console test& enter", the console cannot print until I enter > again.I believe that''s normal. When you run "xm console" to a HVM guest, it doesn''t display any previous output. When you press enter, it displays a new login prompt (or new bash prompt, if you''re already logged in).> Now I want to setup serial console automaticly when I install > centos domU. I add "console=''ttyS0''" to config fileNo, that''s not it. When you boot to CD installer, it should ask you what to do (the "boot:" prompt). Normally you''d just press enter. If you want serial console support, you''d have to type "linux console=ttyS0" and press enter. Note that this will cause all output to be on serial port (that is, you have to run "xm console" to continue installation, as the GUI console will seem to stop working), resulting in text-based (non-GUI) installation. This may or may not be what you want. Personally, I like this better :D You could PROBABLY play around with console lines to see what arguments runs the installer on GUI but still sets up serial console properly. Perhaps "linux console=ttyS0 console=tty0" will do. Google should help, something like http://www.vanemery.com/Linux/Serial/serial-console.txt -- Fajar _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
ma qiang
2010-Jan-25 02:45 UTC
Re: [Xen-users] Help: cannot attach to the domain''s console. why?
Hi, Thanks a lot again. Now I can install a new system in my computer using console according to your reply. I used "xm vncviewer test" to check installation is OK and type "linux console=ttyS0" in "boot: prompt", then change to use "xm console test" to continue the installation. However, when I go to my lab, I found that all computers in my lab is run on only text mode redhat and have no GUI and vnc. So I have to search some methods which can use only console mode to control the installation. But I haven''t found any useful results. So would you help me again and tell me how? Thank you! Best Wishes! Qiang Ma On Fri, Jan 22, 2010 at 6:26 PM, Fajar A. Nugraha <fajar@fajar.net> wrote:> On Fri, Jan 22, 2010 at 2:58 PM, ma qiang <maqiang1984@gmail.com> wrote: >> Hi, >> Thanks a lot. I can connect to domU''s console by munally updating >> /etc/inittab and grub.conf, > > there''s also /etc/securetty > >> but a little trouble is that after my type >> "xm console test& enter", the console cannot print until I enter >> again. > > I believe that''s normal. When you run "xm console" to a HVM guest, it > doesn''t display any previous output. When you press enter, it displays > a new login prompt (or new bash prompt, if you''re already logged in). > > >> Now I want to setup serial console automaticly when I install >> centos domU. I add "console=''ttyS0''" to config file > > No, that''s not it. When you boot to CD installer, it should ask you > what to do (the "boot:" prompt). Normally you''d just press enter. If > you want serial console support, you''d have to type "linux > console=ttyS0" and press enter. Note that this will cause all output > to be on serial port (that is, you have to run "xm console" to > continue installation, as the GUI console will seem to stop working), > resulting in text-based (non-GUI) installation. This may or may not be > what you want. Personally, I like this better :D > > You could PROBABLY play around with console lines to see what > arguments runs the installer on GUI but still sets up serial console > properly. Perhaps "linux console=ttyS0 console=tty0" will do. Google > should help, something like > http://www.vanemery.com/Linux/Serial/serial-console.txt > > -- > Fajar >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Fajar A. Nugraha
2010-Jan-25 09:43 UTC
Re: [Xen-users] Help: cannot attach to the domain''s console. why?
On Mon, Jan 25, 2010 at 9:45 AM, ma qiang <maqiang1984@gmail.com> wrote:> Hi, > Thanks a lot again. > Now I can install a new system in my computer using console > according to your reply. I used "xm vncviewer test" to check > installation is OK and type "linux console=ttyS0" in "boot: prompt", > then change to use "xm console test" to continue the installation. > However, when I go to my lab, I found that all computers in my lab > is run on only text mode redhat and have no GUI and vnc. So I have to > search some methods which can use only console mode to control the > installation. > But I haven''t found any useful results. So would you help me again > and tell me how? Thank you!First of all, if you''re only using Linux domU, I highly suggest you use PV domU. It''ll give more performance. The "downside" is you need to have a http install server available. Usually you only need to install httpd on dom0, and mount the DVD ISO under /var/www/html/install. You can then use http://dom_0_IP/install (or whatever you decide to call it) for install server. Or you could just use public install mirror (like http://mirrors.kernel.org/centos/5/os/x86_64/), with the consequence of it being slower. Second, you can tell domU''s vncconsole to listen to any IP address. You can then connect to it using laptop/PC, without the need to have GUI on the server itself. IIRC the syntax is sdl=0 vnc=1 vnclisten="0.0.0.0" for HVM domU, and vfb =[''type=vnc,vnclisten=0.0.0.0''] for PV domU. Another alternative when you use PV domU is you disable GUI console completely, by removing the vfb line. In that case only the serial console will be available, and it will be automatically setup. -- Fajar _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
ma qiang
2010-Jan-26 03:28 UTC
Re: [Xen-users] Help: cannot attach to the domain''s console. why?
Hi, Thanks a lot. I will try these methods and choose one. By the way, I change vnclisten="0.0.0.0" to vnclisten="192.168.1.100", but when I use "xm create test" the domU cannot start successfully. I am trying to find what''s the matter. Thanks again! Best Wishes! Qiang Ma On Mon, Jan 25, 2010 at 5:43 PM, Fajar A. Nugraha <fajar@fajar.net> wrote:> On Mon, Jan 25, 2010 at 9:45 AM, ma qiang <maqiang1984@gmail.com> wrote: >> Hi, >> Thanks a lot again. >> Now I can install a new system in my computer using console >> according to your reply. I used "xm vncviewer test" to check >> installation is OK and type "linux console=ttyS0" in "boot: prompt", >> then change to use "xm console test" to continue the installation. >> However, when I go to my lab, I found that all computers in my lab >> is run on only text mode redhat and have no GUI and vnc. So I have to >> search some methods which can use only console mode to control the >> installation. >> But I haven''t found any useful results. So would you help me again >> and tell me how? Thank you! > > First of all, if you''re only using Linux domU, I highly suggest you > use PV domU. It''ll give more performance. The "downside" is you need > to have a http install server available. Usually you only need to > install httpd on dom0, and mount the DVD ISO under > /var/www/html/install. You can then use http://dom_0_IP/install (or > whatever you decide to call it) for install server. Or you could just > use public install mirror (like > http://mirrors.kernel.org/centos/5/os/x86_64/), with the consequence > of it being slower. > > Second, you can tell domU''s vncconsole to listen to any IP address. > You can then connect to it using laptop/PC, without the need to have > GUI on the server itself. IIRC the syntax is > > sdl=0 > vnc=1 > vnclisten="0.0.0.0" > > for HVM domU, and > > vfb =[''type=vnc,vnclisten=0.0.0.0''] > > for PV domU. Another alternative when you use PV domU is you disable > GUI console completely, by removing the vfb line. In that case only > the serial console will be available, and it will be automatically > setup. > > -- > Fajar >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Fajar A. Nugraha
2010-Jan-26 10:59 UTC
Re: [Xen-users] Help: cannot attach to the domain''s console. why?
On Tue, Jan 26, 2010 at 10:28 AM, ma qiang <maqiang1984@gmail.com> wrote:> Hi, > Thanks a lot. I will try these methods and choose one. > By the way, I change vnclisten="0.0.0.0" to > vnclisten="192.168.1.100", but when I use "xm create test" the domU > cannot start successfully.Is "192.168.1.100" the IP address of your dom0?> I am trying to find what''s the matter.more info should be available on /var/log/xen/ (start with xend.log) -- Fajar _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users