Sunday, April 28, 2013

Networking VirtualBox and qemu instances on windows

It is quite simple,

1. Run qemu instance with tapX interface (X is 0 to n)
2. Bridge Virtualbox's "VirtualBox Host-Only Network" Adaptor and Qemu's Tap interface.
3. Assign IP address to Network Bridge Interface, this will let you access Qemu and VB intances from windows.
4. Assign IP addresses to Qemu (guest OS) and VirtualBox (guest OS) in the same subnet.

You must be able to PING from both guest OSes and from windows HOST OS as well.


I  used this setup to access JUNOS (qemu) from Linux (virtual box) for practicing NETCONF protocol.


Sunday, April 21, 2013

How to access JUNOS Olive Serial on VirtualBox and vmware

I went through many how-tos this week regarding making a new Olive on VirtualBox, all were great only one thing which almost every one has missed was how to get the JUNOS CLI for the first time because for the first time the VirtualBox or any other Virtualization software that you are using will never show a prompt after the OS starts to boot, If you are running VirtualBox on windows.


Here is the process,


The First Part, Creating Virtual  Machines and installing JunOS is already very well explained and documented, so i dont want to re invent the wheel.

Follow the following URLs and get yourself able to install JunOS version of your choice,

NOTE:

If you want to avoid the unpacking junos, replacing it's checkpic binary and repacking, calculating the SHA1 and md5 checksums again use the following script, it will automatically unpack change the checkpic binary and pack the installer back again.

http://forum.gns3.net/download/file.php?id=520&sid=a010b8d818fa415e7c54a1850568e090



http://daemonkeeper.net/563/deploy-junos-on-a-virtualbox-virtual-machine/
http://blog.gns3.net/2009/10/olive-juniper/3/


The only way for this is to divert serial data (a named pipe) to a gateway, redirecting the named pipe to a tcp port and vice versa and then access that TCP port using any telnet client.

The first time you boot the JunOS the prompt will disappear as soon the OS is booted. Here you need a method to access the JunOS CLI and assign it an IP address which you can access use to telnet/ssh the router.

In VirtualBox locate to 'Serial Ports' Do the settings same as in the following image,


In Vmware



download, vmwaregateway.exe from here (for more details, http://www.l4ka.org/91.php).
download any telnet client, e.g, Putty.

open command prompt on your host OS, locate the PATH to vmwaregateway.exe, run the software as following,
c:\>vmwaregateway.exe /t

This software creates a named PIPE named called \\.\pipe\vmwaredebug and creates TCP socket to port 567. Open Putty telnet your localhost to port 567.

That's it you have access to JunOS run CLI and assign an IP address to the interface required.