rapid7/metasploitable3

Documentation suggestion: How to extract and run the VM from the vagrant download, without vagrant

Opened this issue · 5 comments

Building the image is time consuming and users may not wish to have vagrant control the VM image usage. For people who have an existing VM platform set up, it should be mentioned in the documentation that you can just extract the vmdk from the vagrant file linked in the readme and mount that to a new VM with suitable hardware (sata HD controller for Ubuntu, IDE controller for win2k8) - skipping the need for packer, vagrant, vagrant-reloaded.

For anyone looking for the method, just download the vagrant file either
https://app.vagrantup.com/rapid7/boxes/metasploitable3-ub1404/versions/0.1.12-weekly/providers/virtualbox.box
https://app.vagrantup.com/rapid7/boxes/metasploitable3-win2k8/versions/0.1.0-weekly/providers/virtualbox.box

(Note this is the virtualbox version, for the vmware version change the url ending to vmware.box)

Once downloaded, open the file with 7Zip. Inside the downloaded compressed file will be another compressed archive, go into that. There will be two folders with number names, in the larger folder you'll find the VM vmdk (hard drive file) you want to extract. Mount this to a new VM, power up and go.

Both images work with the hardware created by default on a new machine in virtualbox, with the exception that the windows 2k8 image requires a IDE controller for the downloaded vmdk, rather than the default SATA controller virtualbox will connect it to initially.

On the first power up the windows image will offer to do startup repair, choose the option to just load windows normally rather than repair.

If you get a blue screen (STOP code 7b - boot device inaccessible), check your HD controller setting in virtual box, it needs to be IDE PIXX4! Once its correct, reboot and again choose not to repair, instead loading windows normally, windows should now boot to the logon screen.

Hope it helps someone

Hi, I followed the instructions,
well .. I would say that great and without doing the whole procedure 10 minutes and I have the machine up!
fantastic! thank you

Thanks, four you post, works fine!

Thanks for the information. I encountered the "boot device inaccessible" when trying to run a Vagrant VM using libvirt, and the last comment helped me to figure out the issue, so I'm reporting it here for the next user that searches for this problem:

To get Windows on libvirt to boot, I had to set the disk_bus mode to "ide" like this:

# ...
  config.vm.provider :libvirt do |v|
    v.disk_bus = 'ide'
  end
# ...

this is the way to go !

Simply extracting the whole box image will provide a vmx or ovf file next to the vmdk to be loaded by the vmware orvirtualbox. There is no need to create your own config unless you are using a virtualization env other that the one the box targets.