GNS3
http://forum.gns3.net/

Question regarding qemu and linux microcore
http://forum.gns3.net/topic2404.html
Page 1 of 1

Author:  cisco006 [ Fri Jul 30, 2010 11:57 pm ]
Post subject:  Question regarding qemu and linux microcore

Hi,
I just looked at the command that is executed when you start microcore linux host using qemu in GNS3.
This is what gets executed when you start the qemu host. I see there is a option passed as -serial telnet:127.0.0.1:3014. See attached screenshot. Does this mean i should be able to telnet to my qemu microcore host on port 3014? I tried telnet to this port but it did not work. This may be because no telnet server is running on microcore. Can someone explain what is -serial option used for?

Thanks

Attachments:
qemu.png
qemu.png [ 4.58 KiB | Viewed 7974 times ]

Author:  brezular [ Thu Aug 05, 2010 12:41 pm ]
Post subject:  Re: Question regarding qemu and linux microcore

Hi,

yes, you are right telnet daemon is not running on Microcore. These are the steps how to start it:

1. Run qemu
/usr/local/bin/qemu -m 128 ./linux-microcore.img

2. Run telnet deamon after boot [/b]
su
vi /opt/bootlocalh.sh

/usr/sbin/telnetd
wq:

3. Configure Telnet for root logins

Simply edit the file /etc/securetty and add the following to the end of the file:

pts/0
pts/1
pts/2
pts/3
pts/4
pts/5
pts/6
pts/7
pts/8
pts/9

This will allow up to 10 telnet sessions to the server as root.

4. Make /etc/securetty being on the list of saved files


vi /opt/.filetool.lst

/etc/.filetool.lst

5. Save configuration
/opt/bootlocal.sh
/usr/bin/filetool.sh backup


Unfortunatelly I can't console to Microcore even telnet daemon is running. Hope this helps.
Cheers,

Author:  kaage [ Thu Aug 05, 2010 6:01 pm ]
Post subject:  Re: Question regarding qemu and linux microcore

Quote:
Unfortunatelly I can't console to Microcore even telnet daemon is running. Hope this helps.
Cheers



Why is this? Do you know anything more?

Author:  cisco006 [ Fri Aug 06, 2010 6:58 am ]
Post subject:  Re: Question regarding qemu and linux microcore

brezular wrote:
Hi,

yes, you are right telnet daemon is not running on Microcore. These are the steps how to start it:

1. Run qemu
/usr/local/bin/qemu -m 128 ./linux-microcore.img

2. Run telnet deamon after boot [/b]
su
vi /opt/bootlocalh.sh

/usr/sbin/telnetd
wq:

3. Configure Telnet for root logins

Simply edit the file /etc/securetty and add the following to the end of the file:

pts/0
pts/1
pts/2
pts/3
pts/4
pts/5
pts/6
pts/7
pts/8
pts/9

This will allow up to 10 telnet sessions to the server as root.

4. Make /etc/securetty being on the list of saved files


vi /opt/.filetool.lst

/etc/.filetool.lst

5. Save configuration
/opt/bootlocal.sh
/usr/bin/filetool.sh backup


Unfortunatelly I can't console to Microcore even telnet daemon is running. Hope this helps.
Cheers,

Hi,
I have configured the telnet server and was able to verify that telnet server is running and accepting connections by telnet localhost and that worked and than i started mc with following parameters:
Code:
qemu -m 512 mc3.img -redir tcp:5555::23

Than from my host PC i typed telnet localhost 5555 and i was able to telnet to the mc.
Not sure how is this different to -serial parameter.

Thanks

Author:  brezular [ Tue Aug 10, 2010 10:00 pm ]
Post subject:  Re: Question regarding qemu and linux microcore

Hi,

Quote:
This is what gets executed when you start the qemu host. I see there is a option passed as -serial telnet:127.0.0.1:3014. See attached screenshot. Does this mean i should be able to telnet to my qemu microcore host on port 3014? I tried telnet to this port but it did not work. This may be because no telnet server is running on microcore. Can someone explain what is -serial option used for?


You start telnet server on on localhost port 3014 with "-serial telnet:127.0.0.1:3014" command . You should be able to telnet to qemu image right now you start this image - that is why you can see the whole boot process of Olive.
You don't have to run telnet server on guest OS (as I did on Microcore). Command -serial telnet works for JUNOS but not for Microcore. You can telnet to Microcore but you see nothing.

With "qemu -m 512 mc3.img -redir tcp:5555::23" command you redirect tcp connection from host to localhost port 5555 to the guest (Microcore) tcp port 23. Telnet server has to be enabled on Microcore. This command allows you to make successful telnet to Microcore after boot of Microcore.

Unfortunately neither redirection nor -serial telnet works for LISA running on CentOS. It could be a problem for users who need to run their own Qemu images for testing Linux routers, firewalls etc. and they need to have remote console to these devices.

There is also another option available for remote login to Qemu host -> vnc server.

/usr/local/bin/qemu -m 512 ./lisa-centos-2.0.2.i -vnc :6

With this command you start vnc server on host display 6. Then you can login to guest OS with vncviewer:

vncviewer localhost:6

Starting VNC server on host OS with qemu allows you to connect to both Microcore and Lisa. I consider this as reliable way how to remote connect to Qemu host now.

Please, correct me if I am wrong or missing something.

Cheers,

Author:  brezular [ Thu Aug 12, 2010 10:42 pm ]
Post subject:  Re: Question regarding qemu and linux microcore

Hi,

Please see the post: topic2451.html

Thanks,

Author:  VirtRich [ Mon Jan 20, 2014 9:05 pm ]
Post subject:  Re: Question regarding qemu and linux microcore

cisco006 wrote:
brezular wrote:
Hi,

yes, you are right telnet daemon is not running on Microcore. These are the steps how to start it:

1. Run qemu
/usr/local/bin/qemu -m 128 ./linux-microcore.img

2. Run telnet deamon after boot [/b]
su
vi /opt/bootlocalh.sh

/usr/sbin/telnetd
wq:

3. Configure Telnet for root logins

Simply edit the file /etc/securetty and add the following to the end of the file:

pts/0
pts/1
pts/2
pts/3
pts/4
pts/5
pts/6
pts/7
pts/8
pts/9

This will allow up to 10 telnet sessions to the server as root.

4. Make /etc/securetty being on the list of saved files


vi /opt/.filetool.lst

/etc/.filetool.lst

5. Save configuration
/opt/bootlocal.sh
/usr/bin/filetool.sh backup


Unfortunatelly I can't console to Microcore even telnet daemon is running. Hope this helps.
Cheers,

Hi,
I have configured the telnet server and was able to verify that telnet server is running and accepting connections by telnet localhost and that worked and than i started mc with following parameters:
Code:
qemu -m 512 mc3.img -redir tcp:5555::23

Than from my host PC i typed telnet localhost 5555 and i was able to telnet to the mc.
Not sure how is this different to -serial parameter.

Thanks


Hi, i am running GNS3 8.6 on Windows XP SP3. I am trying to enable the Qemu host as a telnetd server.
I am using linux-micrcore-3.8.2.img from the GNS3 appliance website. Upon booting the image and logging in. I did a find on telnetd and could not find it. So, step #2 doesn't make sense to include /usr/sbin/telnetd in /opt/bootlocalh.sh. What version did you use? Did they take out the telnetd related stuff in the new image? Or do I have to load some package and how? I am to to this stuff but not to Unix/Linux. Also, is that a type in step #4 about putting "/etc/.filetool.lst" in "/opt/.filetool.lst". Should be "/etc/securetty" right? Thanks!

Author:  brezular [ Thu Jan 23, 2014 7:41 pm ]
Post subject:  Re: Question regarding qemu and linux microcore

Hello,

telnetd is part of BusyBox that is not compiled for telnetd support in actual Core Linux versions. To get telnetd utility you have to compile BusyBox by your own. These steps should help you:

1. Make backup of your Qemu image

$ cp linux-core-4.7.7.img inux-core-4.7.7-backup.img

2. Start copied Linux Core Qemu image

$ /usr/local/bin/qemu-system-i386 -m 512 ./linux-core-4.7.7-backup.img -serial telnet:127.0.0.1:3000,server,nowait -enable-kvm

2. Install tools for compiling

$tce-load -wi compiletc

3. Download BusyBox tarball and extract it
$ wget http://www.busybox.net/downloads/busybox-1.22.1.tar.bz2
$ tar jxvf busybox-1.22.1.tar.bz2
$ cd busybox-1.22.1

4. Configure & Compile & Installl BusyBox
$ make defconfig
$ make
$sudo su
#make install

5. Backup telnetd binary

$ scp -rv ./_install/usr/sbin/telnetd [email protected]:/home/username

6. Copy telnetd binary to linux-core-4.7.7-backup.img in to the directory /usr/sbin/

Author:  nickbeee [ Sun Jan 26, 2014 7:57 am ]
Post subject:  Re: Question regarding qemu and linux microcore

There is a telnetd in inetutils-servers.tcz. Package contents -

Code:
./usr/local/sbin/tftpd
./usr/local/sbin/telnetd
./usr/local/sbin/talkd
./usr/local/sbin/syslogd
./usr/local/sbin/inetd
./usr/local/sbin/ftpd


Likewise the telnet client can be found in inetutils.tcz.

Code:
./usr/local/bin/whois
./usr/local/bin/traceroute
./usr/local/bin/tftp
./usr/local/bin/telnet
./usr/local/bin/talk
./usr/local/bin/ping6
./usr/local/bin/ping
./usr/local/bin/logger
./usr/local/bin/ifconfig
./usr/local/bin/hostname
./usr/local/bin/ftp


If you just want to connect to your Qemu VM serial console then you don't need telnetd as Qemu itself will run it's own telnetd when you start it with -serial telnet:127.0.0.1:4444,server.

HTH,

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/