Timos and telnet

Before posting something, READ the changelog, WATCH the videos, howto and provide following:
Your install is: Bare metal, ESXi, what CPU model, RAM, HD, what EVE version you have, output of the uname -a and any other info that might help us faster.

Moderator: mike

rifster
Posts: 21
Joined: Wed Mar 22, 2017 8:14 am

Re: Timos and telnet

Post by rifster » Wed Jun 07, 2017 6:17 pm

Here you go:

Code: Select all

$p['type'] = 'qemu';
$p['name'] = '7750SR';
$p['icon'] = 'Router.png';
if (function_exists('isVirtual') && isVirtual()) {
	$p['cpu'] = 1;
} else {
	$p['cpu'] = 2;
}
$p['ram'] = 2048;
$p['ethernet'] = 11;
$p['console'] = 'telnet';
$p['qemu_arch'] = 'x86_64';
if (function_exists('isVirtual') && isVirtual()) {
	$p['qemu_options'] = '-machine accel=tcg';
} else {
	$p['qemu_options'] = '-machine accel=kvm';
}
$p['qemu_options'] .= ' -serial mon:stdio -nographic -nodefconfig -nodefaults -rtc base=utc -smbios type=1,product=\"TIMOS:slot=A chassis=SR-c12 card=cfm-xp mda/1=m10-1gb-xp-sfp\"';
I just tested it on release 14.0.R7 and booted up in less that a minute. If you just copy/paste system will boot as vSIM (due to the "product" parameter).

cisco001
Posts: 11
Joined: Sat Jun 03, 2017 4:02 am

Re: Timos and telnet

Post by cisco001 » Thu Jun 08, 2017 11:58 am

Hi thanks for sharing the configuration file. I copied your config file and replaced it on my system but still same issue, i.e. i start the 7750 in the web interface and when connect by console i can only see the cursor in the putty window and does not respond to anything.
I did the debug in CLI and still getting following error message, i am using 14.0R7, the same image as i am using in GNS3.

Code: Select all

(process:16624): GLib-WARNING **: /build/glib2.0-prJhLS/glib2.0-2.48.2/./glib/gmem.c:483: custom memory allocation vtable not supported
KVM internal error. Suberror: 1
emulation failure
EAX=00000000 EBX=00000000 ECX=00000046 EDX=00000001
ESI=00000000 EDI=00000000 EBP=00007604 ESP=000075e8
EIP=f000ff53 EFL=00250012 [----A--] CPL=0 II=0 A20=1 SMM=0 HLT=0
ES =0010 00000000 ffffffff 00c09300 DPL=0 DS   [-WA]
CS =0008 00000000 ffffffff 00c09b00 DPL=0 CS32 [-RA]
SS =0010 00000000 ffffffff 00c09300 DPL=0 DS   [-WA]
DS =0010 00000000 ffffffff 00c09300 DPL=0 DS   [-WA]
FS =0010 00000000 ffffffff 00c09300 DPL=0 DS   [-WA]
GS =0030 200fc000 ffffffff 00c09300 DPL=0 DS   [-WA]
LDT=0000 00000000 ffffffff 00c00000
TR =0008 00000580 00000067 00008b00 DPL=0 TSS32-busy
GDT=     00001000 000000af
IDT=     20148000 000007ff
CR0=40000011 CR2=00000000 CR3=00000000 CR4=00000200
DR0=0000000000000000 DR1=0000000000000000 DR2=0000000000000000 DR3=0000000000000000
DR6=00000000ffff0ff0 DR7=0000000000000400
EFER=0000000000000000
Code=00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 <00> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

cisco001
Posts: 11
Joined: Sat Jun 03, 2017 4:02 am

Re: Timos and telnet

Post by cisco001 » Thu Jun 08, 2017 12:09 pm

Another question how do i completely disable apparmor on the baremetal eve-ng install?

thanks

rifster
Posts: 21
Joined: Wed Mar 22, 2017 8:14 am

Re: Timos and telnet

Post by rifster » Thu Jun 08, 2017 8:40 pm

I can't help with AppArmor unfortunately.

Regarding your error though, next thing I would check is whether you have virtualization enabled in BIOS and KVM is working in Ubuntu.
https://help.ubuntu.com/community/KVM/Installation

You can also try to run QEMU nodes without kvm-related parameters.
Edit your timos.php as below and check if system boots up.

Code: Select all

if (function_exists('isVirtual') && isVirtual()) {
	$p['qemu_options'] = '-machine accel=tcg';
} else {
	$p['qemu_options'] = '-machine accel=tcg';
}

cisco001
Posts: 11
Joined: Sat Jun 03, 2017 4:02 am

Re: Timos and telnet

Post by cisco001 » Fri Jun 09, 2017 9:51 am

Hi,
Manage to boot but then it halted.
So i modified the timos template file with the following configuration, note I have commented out the accel=kvm line and also changed accel=tcg in both instance as you suggested.

Code: Select all

if (function_exists('isVirtual') && isVirtual()) {
        $p['qemu_options'] = '-machine accel=tcg';
} else {
        $p['qemu_options'] = '-machine accel=tcg';
}
$p['cpu'] = 2;
#$p['qemu_options'] = '-machine accel=kvm';
$p['qemu_options'] .= ' -serial mon:stdio -nographic -nodefconfig -nodefaults -rtc base=utc -smbios type=1,product=\"TIMOS:slot=A chassis=SR-c12 card=cfm-xp mda/1=m10-1gb-xp-sfp\"';

This is the first time it booted but then it halted saying unsupported hypervisior. So some progress but it not successful. Any ideas what I can try next. Hopefully getting closer.
By the way I checked the BIOS and commands to make sure virtualisation is enbaled and supported on this machine.

Code: Select all

Running in a UNKNOWN virtual machine

Enabled core count: 2
ACPI: found 2 cores, 2 enabled

Total Memory: 2047MB  Chassis Type: 0x26
TiMOS-V-14.0.R7 bootrom/i386 Nokia 7xxx ? Copyright (c) 2000-2017 Nokia.
All rights reserved. All use subject to applicable license agreements.
Built on Thu Jan 12 12:31:03 PST 2017 by builder in /rel14.0/b1/R7/panos/main
Looking for boot parameters.



Press any key to stop auto-boot...
 0
auto-booting...


boot device          : ata=0,2
unit number          : 0
processor number     : 0
host name            : 0.0.0.0
file name            : cf3:/timos/i386-boot.tim
ftp password (pw)    : *****
flags (f)            : 0x8
target name (tn)     : vRR
startup script (s)   : pl=1
other (o)            : sr12#niente_a_r2_6f,lava_r3|22|0


Booting from ata=0,2:cf3:/timos/i386-boot.tim
Loading cf3:/timos/i386-boot.tim ...
Version L-14.0.R7, Thu Jan 12 12:30:29 PST 2017 by builder in /rel14.0/b1/R7/panos/main
text:(2165824-->5088892) + data:(199552-->651048)

SYS_PHYS_MEM_TOP_ANCHOR_LOC is over written to 0x0000000020100b6c.
Restore to 0x0000000000000000
Starting at 0x1a800000...

(s) boot params: pl=1; setting TgtPf to 0x00000001

Running in a UNKNOWN virtual machine

supported hypervsior: KVM/QEMU VMWARE
system will be halted shortly...

Enabled core count: 2
ACPI: found 2 cores, 2 enabled

ACPI: ctrl-x only supported with PXE boot. (version >= 3)

Total Memory: 2047MB  Chassis Type: 0x6  Core Freq: 3491.508 MHz
TiMOS-L-14.0.R7 boot/i386 Nokia 7750 SR Copyright (c) 2000-2017 Nokia.
All rights reserved. All use subject to applicable license agreements.
Built on Thu Jan 12 12:30:29 PST 2017 by builder in /rel14.0/b1/R7/panos/main

TiMOS BOOT LOADER
platformVmRestrict: unsupported hypervisor: UNKNOWN (3)

supported hypervsior: KVM/QEMU VMWARE


HALT SYSTEM

rifster
Posts: 21
Joined: Wed Mar 22, 2017 8:14 am

Re: Timos and telnet

Post by rifster » Fri Jun 09, 2017 12:18 pm

Hi,
I'm not an expert of the matter but issue is in some way related to KVM. You mentioned you had similar issue with some Cisco image as well so this is global to your system and I'm still not convinced KVM is enabled. You said you checked it, can you share some terminal output (just for the sake of it). What type of BIOS do you have? or motherboard?

cisco001
Posts: 11
Joined: Sat Jun 03, 2017 4:02 am

Re: Timos and telnet

Post by cisco001 » Sat Jun 10, 2017 6:22 am

Hi there,
Here is all the information:
I have checked the BIOS and virtualisation is enabled.
Here is the output from the box to determine if the hardware supports virtualisation, a non-zero value means virtualisation is supported.

Code: Select all

root@eve-ng:~# egrep -c '(vmx|svm)' /proc/cpuinfo
12
root@eve-ng:~#
Here is the output of the kvm-ok command and looks OK to me.

Code: Select all

root@eve-ng:~# kvm-ok 
INFO: /dev/kvm exists
KVM acceleration can be used
root@eve-ng:~# 
SROS 12.0R6 boots up on the same machine without any problems. Here is the output from 12.0R6 booting up:

Code: Select all

TiMOS BOOT LOADER
Time from clock is SAT JUN 10 06:13:21 2017 UTC
Switching serial output to sync mode...   done

Looking for cf3:/bof.cfg ... OK, reading

Contents of Boot Options File on cf3:
    primary-image    cf3:\timos\both.tim
    primary-config   cf3:\config.cfg
    autonegotiate
    duplex           full
    speed            100
    wait             3
    persist          off
    no li-local-save
    no li-separate
    console-speed    115200

Hit a key within 1 second to change boot parameters...    
No license file specified

Primary image location: cf3:\timos\both.tim
Loading image cf3:\timos\both.tim
Version B-12.0.R6, Tue Sep 30 11:10:17 PDT 2014 by builder in /rel12.0/b1/R6/panos/main
text:(46273376-->131588524) + data:(7236736-->33066188)
Executing TiMOS image at 0x12A000

Enabled core count: 2

Running in a KVM/QEMU virtual machine

Total Memory: 2047MB  Chassis Type: sr-c12  Core Freq: 3491.380 MHz
TiMOS-B-12.0.R6 both/i386 ALCATEL SR 7750 Copyright (c) 2000-2014 Alcatel-Lucent.
All rights reserved. All use subject to applicable license agreements.
Built on Tue Sep 30 11:10:17 PDT 2014 by builder in /rel12.0/b1/R6/panos/main


   ___                    ___           ___           ___
  /\  \                  /\__\         /\  \         /\  \
  \:\  \        ___     /::|  |       /::\  \       /::\  \
   \:\  \      /\__\   /:|:|  |      /:/\:\  \     /:/\:\  \
   /::\  \    _\/__/  /:/|:|__|__   /:/  \:\  \   _\:\~\:\  \
  /:/\:\__\  /\__\   /:/ |::::\__\ /:/__/ \:\__\ /\ \:\ \:\__\
 /:/  \/__/ /:/  /   \/__/~~/:/  / \:\  \ /:/  / \:\ \:\ \/__/
/:/  /     /:/  /          /:/  /   \:\  /:/  /   \:\ \:\__\
\/__/      \/__/          /:/  /     \:\/:/  /     \:\/:/  /
                         /:/  /       \::/  /       \::/  /
                         \/__/         \/__/         \/__/

Running 32 bit architecture

Initializing VMM
  Virtual address sharing is disabled
emGetLink: unit 0 is not VALID
Time from clock is SAT JUN 10 06:14:09 2017 UTC
Initial DNS resolving preference is ipv4-only

Attempting to exec primary configuration file:
   'cf3:\config.cfg' ...
Executed 0 lines in 0.0 seconds from file cf3:\config.cfg

TiMOS-B-12.0.R6 both/i386 ALCATEL SR 7750 Copyright (c) 2000-2014 Alcatel-Lucent.
All rights reserved. All use subject to applicable license agreements.
Built on Tue Sep 30 11:10:17 PDT 2014 by builder in /rel12.0/b1/R6/panos/main


Login: admin
Password: 

This simulation software is the property of Alcatel. It may not
be sold, leased, loaned or licensed to any non-Alcatel entity.
A:vSIM# 
Here is the same 14.0R7 image booted up in GNS3 on another machine without any issues:

Code: Select all

A:vRR# show version   
TiMOS-B-14.0.R7 both/i386 Nokia 7750 SR Copyright (c) 2000-2017 Nokia.
All rights reserved. All use subject to applicable license agreements.
Built on Thu Jan 12 12:35:58 PST 2017 by builder in /rel14.0/b1/R7/panos/main
A:vRR# 
Let me know if you need any more information.

rifster
Posts: 21
Joined: Wed Mar 22, 2017 8:14 am

Re: Timos and telnet

Post by rifster » Sat Jun 10, 2017 4:07 pm

I'm comparing GNS3 QEMU line and EVE and there is this SMM parameter included in the first one. Let's try to include it in EVE as well. Seems like a longshot but I have no other ideas :).
Update your timos.php with one of these:

Code: Select all

if (function_exists('isVirtual') && isVirtual()) {
	$p['qemu_options'] = '-machine accel=tcg';
} else {
	$p['qemu_options'] = '-machine accel=kvm,smm=off';
}
or

Code: Select all

if (function_exists('isVirtual') && isVirtual()) {
	$p['qemu_options'] = '-machine accel=tcg';
} else {
	$p['qemu_options'] = '-enable-kvm -machine smm=off';
}

ecze
Posts: 533
Joined: Wed Mar 15, 2017 1:54 pm

Re: Timos and telnet

Post by ecze » Sat Jun 10, 2017 7:18 pm

Definitly a machine hardware problem
Topic closed

Locked