Custom Router Image QEMU not Found

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

Post Reply
jocko96b
Posts: 2
Joined: Tue Oct 23, 2018 8:14 pm

Custom Router Image QEMU not Found

Post by jocko96b » Wed Oct 24, 2018 1:15 pm

TLDR Version:

I am trying to get a router MIPS Linux router firmware running that requires a separate kernel file and specific hard drive settings to work. I know it works stand alone when firing it up manually from the terminal on the actual EVE-NG VM I am running. When I try to run it in EVE-NG lab, I get "dir645: Failed to start node (12)."

unl_wrapper log has the following:
Oct 24 14:57:49 Oct 24 14:57:49 ERROR: Failed to start node (12).
Oct 24 14:57:49 Oct 24 14:57:49 ERROR: Failed to build CMD line (80046).
Oct 24 14:57:49 ERROR: Failed to build CMD line (80046).
Oct 24 14:57:49 ERROR: QEMU not found (80016).
Oct 24 14:57:49 INFO: sysctl -w net.ipv6.conf.vunl0_1_3.disable_ipv6=1
Oct 24 14:57:49 INFO: tunctl -u unl0 -g root -t vunl0_1_3 2>&1
Oct 24 14:57:49 INFO: sysctl -w net.ipv6.conf.vunl0_1_2.disable_ipv6=1
Oct 24 14:57:49 INFO: tunctl -u unl0 -g root -t vunl0_1_2 2>&1
Oct 24 14:57:48 INFO: sysctl -w net.ipv6.conf.vunl0_1_1.disable_ipv6=1
Oct 24 14:57:48 INFO: tunctl -u unl0 -g root -t vunl0_1_1 2>&1
Oct 24 14:57:48 INFO: sysctl -w net.ipv6.conf.vunl0_1_0.disable_ipv6=1
Oct 24 14:57:48 INFO: tunctl -u unl0 -g root -t vunl0_1_0 2>&1

Long Version:
I am trying to integrate a QEMU image of a router firmware (D-Link DIR645: MIPS with a Linux underpinning). It was created using the Firmware Analysis Toolkit (really cool tool to analyze firmware if you are interested). The end image that was created was a .raw file, which I then converted to a .qcow2 and I can fire it up manually from the command line just fine on the EVE-NG VM.

Now the next step in my little project was to integrate that image with EVE-NG. Based on the startup script that the Firmware Analysis Toolkit created, I need to specify the kernel file in the qemu options, along with a whole bunch of other stuff. In the script's raw format, this is what makes it fire up on the command line:

qemu-system-mipsel -m 256 -M malta -kernel /home/siuser/tools/firmadyne//binaries//vmlinux.mipsel -drive if=ide,format=raw,file=/home/siuser/tools/firmadyne//scratch//1//image.raw -append "root=/dev/sda1 console=ttyS0 nandsim.parts=64,64,64,64,64,64,64,64,64,64 rdinit=/firmadyne/preInit.sh rw debug ignore_loglevel print-fatal-signals=1 user_debug=31 firmadyne.syscall=0" -nographic -net nic,vlan=0 -net socket,vlan=0,listen=:2000 -net nic,vlan=1 -net socket,vlan=1,listen=:2001 -net nic,vlan=1 -net tap,vlan=1,id=net0,ifname=${TAPDEV_0},script=no -net nic,vlan=3 -net socket,vlan=3,listen=:2003 | tee qemu.final.serial.log

I obviously don't need a fraction of that as EVE-NG handles a lot of that once I move the files into the correct folder locations. EVE-NG sees the Template, it sees the Image and I can drop the router into my Lab. Here are the node settings I am trying to use:

Template: DIR-645 D-Link Router
ID: 1
Image: dir645-linux
Icon: router.png
UUID: cffce47f-45a8-42e7-a36b-73cfb8e96033
CPU: 1
RAM: 528
Ethernets: 1
QEMU Version: tpl(default 2.4.0)
QEMU Arch: tpl(mipsel)
QEMU NIC: tpl(virtio-net-pci)
QEMU Custom Options: -M malta -kernel /opt/firmadyne/binaries/vmlinux.mipsel root=/dev/sda1 console=ttyS0 nandsim.parts=64,64,64,64,64,64,64,64,64,64

When trying to power it up I get the errors shown in the TLDR section. I am guessing that the problem lies with the fact that I need to specify a separate kenel file and EVE-NG doesn't like that, or my syntax in the Custom Options is all off.

Side note: when moving some of the syntax from the raw script into the Custom Options section, the field doesn't like double quotes and anything inside the quotes get stripped out (along with the double quotes). I tried the / as a PHP escape character, but that didn't work either.

Thanks in advance for any help.

smithjohn247
Posts: 1
Joined: Sat Nov 03, 2018 6:19 am

Re: Custom Router Image QEMU not Found

Post by smithjohn247 » Sat Nov 03, 2018 6:23 am

If you are using Netgear router, Then here I can help in the help of our website. This particular process of Reset Factory Defaults Settings of Netgear Router R6300v2 with the help of button has been guided by a team of expert Netgear router support phone number professionals.

Uldis (UD)
Posts: 5180
Joined: Wed Mar 15, 2017 4:44 pm
Location: London
Contact:

Re: Custom Router Image QEMU not Found

Post by Uldis (UD) » Sat Nov 03, 2018 7:56 am

D link you will hae no success for qemu. Becaiuse D-link does not support virtual device

Post Reply