Talk:Using QEMU with Olive to emulate Juniper Routers

From Internetworkpro

Jump to: navigation, search

Having some problems with this - I have downloaded qemu and the patch and built as directed...

Cannot get the serial port to work properly "-serial stdio" works fine and I have got a working image. However "-serial telnet::2001" doesn't work for me. The resulting telnet connection "telnet 127.0.0.1 2001" gets Connection refused. The system is debian 2.6.18 (etch).

I have put my own IP address in /etc/hosts.allow.

Log files don't show anything.

Netstat shows nothing listening on 2001. Any ideas ?

An update: removing "nowait" from -serial causes qemu to wait for the telnet session, which then completes. Everything works fine (in non-daemon mode).

However with the -daemonize option, I then get no output at all in the telnet session (it connects, but no output).

Contents

[edit] 802.1q support over fxp interfaces

Has anyone solved that issue? Is there any workaround?

[edit] 802.1q

See [1]

Tested and apparently not working

MTU larger than 1500 on fxp0 (including any additional headers like 802.1q, MPLS etc.). Rumours say that reason for this is that The Vendor's fxp0 driver is from the time of first-generation eepro cards which had issues with oversized frames, and there has been no need for an update.

[edit] Using tap devices on Linux Ubuntu 8.04

Assuming that the bridge/tap setup is OK, it seems that the tap interface name must be passed to qemu in order to connect the router interface to the host bridge. Here's an example:

qemu R1.img -m 96 -nographic -serial telnet::2001,server,nowait -localtime \
 -net nic,vlan=1,macaddr=00:aa:00:60:00:01,model=pemu_i82559 -net tap,ifname=tap0,vlan=1,script=no 

The key part is "ifname=tap0". I couldn't get things to work without it.


[edit] Running Junos 9.2

I've been doing some tests lately to try to run the 9.2 junos firmware. So far, i got it working only by killing the watchdog (/sbin/watchdog -off) right after startup to prevent panic : Loss of soft watchdog.

I simply had to write the command in /etc/rc.local. I tried to disable the watchdog daemon inside junos config but that doesn't seem to help.

[edit] Junos jseries with jsr 9.2

I hope I'm not the only one to try to run this code inside qemu...

I could install this code only when running a Junos 8.4 and using pkg_add from the bsd shell. I could then install a junos-jsr-9.2r1.10.

It seems to install fine, but then when it reboots after the bootstrap, I fails to mount correct partitions (/dev/bo0sX) because the physical device is not there. I've tried to find what should be named /dev/boXXX inside devfs with no luck. What I did is symlinking every /dev/ad0sX to /junos/dev/bo0sX and then exit the recovery shell. It then mount correctly but I fear that it missed to do things inside this filesystem when it bootstrapped, so I don't believe it to be very stable.
I guess this bo0sX is related to a flashdisk, but I wasn't able to emulate it with qemu.

Also, the entries I make in /junos/dev/ needs to be made at every reboot. Any help would be welcome!

Cheers, --Grimmlin 03:04, 3 September 2008 (CDT)

[edit] the entries I make in /junos/dev/ needs to be made at every reboot. Any help would be welcome!

Hello,

try to boot and edit /etc/fstab, replace bo0 with ad0.

[edit] Problem setting up DHCP on BSD.

Hi, Thank you for all the work that you have put into getting this to work! I have been experiencing a problem whenever I enable DHCP for the ethernet interface in order to connect from the host (Ubuntu) to the virtual BSD box. Whenever I enable DHCP the screen gets taken over with various words and the interface configuration page floats off screen! Any ideas on what might be causing this? I have been unable to reach the virtual BSD box from the host.

Solution below works, thank you einval!


Possible solution: I had the same issue. DHCP works, but you get flooded by debug output generated from the EEPRO100 driver.

Edit the file qemu-brb-20080910/hw/eepro100.c, then comment this single line (around line number 80):

#define DEBUG_EEPRO100

with

/* #define DEBUG_EEPRO100 */

and compile qemu again. Hope this helps, einval

Personal tools