Building Virtual Pentesting Labs for Advanced Penetration Testing
上QQ阅读APP看书,第一时间看更新

Image conversion

Recently, while working with developing labs for a client who extensively used a virtual environment, I was asked to migrate the virtual machines from VMware to Hyper-V. As I had very little experience with Hyper-V, it was a challenging task which took three weeks to complete. Satisfaction is one aspect of life which is achieved when we accept challenges and overcome the hurdles posed by them.

Additionally, there were some things that worked perfectly fine in VMware but could not be accomplished in Hyper-V; one thing that would not work is the router emulation software. The primary issue with the migration is related to the virtual-hard-disk format. Hyper-V requires VHD and VMware uses the VMDK format for its virtual machine hard disks. In order to overcome the hurdle of image conversion, I was in search of a tool which would assist in this conversion.

Fortunately, such a tool exists, and it's free! When you are building virtual machines, if you want to use another tool, or more commonly you have a format that you created or downloaded and it does not match the tool you are trying to use, then this tool is perfect for you! The tool I use often for accomplishing this is Starwind V2V Converter from Starwind Software, available at http://www.starwindsoftware.com/.

A note of caution here: the tool in my experience has not been perfect, but it has converted most of the VMDK files to the VHD format for Hyper-V without any problems. The only OS which has been posing problems during conversion and then getting it to work on Hyper-V has been "FreeBSD". Ironically, FreeBSD versions prior to Version 9x seem to work fine.

You can download the software from http://www.starwindsoftware.com/converter. Note that you will be required to register and the application runs in Windows. Once you have downloaded the software, install it and then run the program. It is an easy-to-use tool; you select the file image to convert by navigating to it. Following this, the tool will display the options for the format output. An example of this is shown in the following screenshot:

Image conversion

Once the output format has been selected, the process of conversion will run, and once it is finished, you only need to go through the steps that we have covered before for the tool that you have chosen. As discussed, the tool works very well and it saves a lot of time and provides you the ability to pick and choose any platform that you prefer for building the pentesting environments.