Pages

Sunday, December 19, 2010

Openwrt in VMware

I'm doing my final year project in network security. For that I have to create a virtual network to work with. I have chosen VMware. And for router firmware I decided OpenWRT, a GNU/Linux based firmware for devices like gateways.

But When I tried to run OpenWRT in VMware, I found a big problem. Actually OpenWRT comes in the format of raw image (.image). It can't be directly installed directly in VMware. So I need to find alternatives. But I'm new to both VMware and also OpenWRT. So I'm stuck first. After I read so many forums, I got some idea. But no method given in those forums worked. Each and every one has come with its own fault. So I started doing myself things. Finally I got it. I just do the following...

  • Install VMware
  • Download Openwrt 
  • Install qemu, commend line virtual emulator. Here It will be used to convert the raw image into vmdk image.
  • now convert the raw image into vmdk format by issuing the following commend
    qemu-img convert -f raw <source_file_name> -O vmdk <desitination_file_name>
  • For example, If you have downloaded openwrt-x86-ext2.image, run the following commend in terminal. 
    qemu-img convert -f raw openwrt-x86-ext2.image -O vmdk openwrt-x86-ex2.vmdk
  • Now start VMware. 
  • Create a new virtual machine. In the first dialogue, select custom installation
  • In the next dialogue, select other linux, and select memory, network adaptor, and other things as you like. 
  • And finally It will ask for the hard disk. Then select "use existing hard disk" and browse it towards the vmdk file created previously.
  • Give finish. Your work is over. Now run OpenWRT from VMware.      
  • Its default IP address is 192.168.1.1. So use this IP address to connect  the firmware.

4 comments:

  1. How do you install qemu?

    ReplyDelete
    Replies
    1. qemu is a command line virtual emulator tool. you can google to get more about it.

      Delete
  2. Nice one !
    Prepared vmdk can also be found here : http://wiki.openwrt.org/doku.php?id=oldwiki:runningkamikazeonvmwarehowto

    ReplyDelete
  3. Yes but the runningkamikaze is definitely outdated as hell. People need the current verson running on VMware

    ReplyDelete