Technical

Metasploitable2 Proxmox: Import the VMDK with qm importdisk

Metasploitable2 Proxmox: Import the VMDK with qm importdisk

Metasploitable2 on Proxmox is easy if you skip the VMware route and import the VMDK directly with qm importdisk. The whole thing takes five minutes, and you don’t need VirtualBox or VMware Workstation.

Detailed close-up of ethernet cables and network connections on a router, showcasing modern technology.

Grab the Metasploitable2 image

Download the Metasploitable2 zip from Rapid7. It’s about 800 MB. Unzip it and you get a folder with a .vmdk file inside. That’s the disk image we need.

Create the VM shell

Create a new VM in Proxmox without any disks. Set the OS type to Linux 2.6/3.x/4.x Kernel, give it 512 MB RAM, and one CPU. Don’t add a disk yet. We’ll import the VMDK manually.

A vibrant mixture of electrical cables and waste ready for recycling.

Import the VMDK

Upload the .vmdk to your Proxmox storage. You can use the web UI or scp. Then run:

qm importdisk 100 Metasploitable.vmdk local-lvm

Replace 100 with your VM ID and local-lvm with your storage. This converts the VMDK to raw and attaches it as an unused disk. Go to the VM’s hardware tab, double-click the unused disk, and set the bus to SATA. Then go to Options > Boot Order and enable the disk.

Network setup

Metasploitable2 is vulnerable as hell, so don’t put it on your main LAN. Create a separate bridge or use NAT. The default network config uses DHCP, so it’ll get an IP from your router if you use a bridge. If you want isolation, set up a NAT network with iptables or use a separate VLAN.

Why qm importdisk beats other methods

Most guides tell you to use VMware or VirtualBox first, then convert. That’s an extra step for no reason. qm importdisk handles the VMDK directly. It’s faster and you don’t need another hypervisor. If you need to move the disk later, check out Proxmox Move All Disks to New Storage.

One thing: after boot, Metasploitable2 may not get an IP if the network interface name changed. It uses eth0 by default, but newer kernels might call it ens18 or something. If that happens, edit /etc/network/interfaces inside the VM and change eth0 to the correct name.

Leave a comment

Comments are reviewed before they appear. Your email is never published.