Skip to content
int0x80 edited this page Oct 1, 2016 · 1 revision

Overview

I use VMware across multiple platforms: Workstation on Linux, Fusion on OSX, and ESXi on a workstation. Moving VMs around, whether my own or others', isn't always the smoothest process. Here are some notes I've collected.

Metasploitable

I wanted to stand up an instance of Metasploitable 2 as part of a test network in ESXi 6. It took a small amount of modification.

Upload

Unzip the original archive and upload the Metasploitable2 files into your datastore. I threw the uploaded files into a separate directory under my Ubuntu ISOs but choose your own adventure with filesystem schema.

Fix Disk

In the VM config, remove the 'new' hard disk, add a hard disk and select Use an existing virtual disk. Browse to the uploaded Metasploitable files in your datastore and select Metasploitable.vmdk. Unfortunately the VM fails to start and displays the following error message:

Failed to open disk scsi0:0: Unsupported or invalid disk type 7. Ensure that the disk has been imported.

This indicates that the disk should be provisioned differently. SSH into your ESXi system as root and fix the disk, creating a new Metasploitable2.vmdk in the process.

root# vmkfstools -i Metasploitable.vmdk -d zeroedthick Metasploitable2.vmdk
Destination disk format: VMFS zeroedthick
Cloning disk 'Metasploitable.vmdk'...
Clone: 100% done.

Associate the new Metasploitable2.vmdk to your VM and move on.

404 Interface Not Found

The VM now boots but has no IP address. A quick look reveals that lo is the only network interface available. Power down the VM, remove the NIC from the config, and add a new NIC of type Flexible. Start the VM and your eth0 should be visible with an IP assigned, asserting you have DHCP on the associated network.