rapid7/metasploitable3

Unable to build Metasploitable3 ub1404 Linux VM

AubSmith opened this issue · 2 comments

Issue Description

Failed to retrieve the preconfiguration file when building Ubuntu 1404 image.
image

I have performed the following;

  1. Disabled AV and FW
  2. Ensured that there is enough disk space - currently 75GB free
  3. Closed all apps, so only running VirtualBox and PowerShell when running the build
  4. Successfully built Windows Server 2008 image
  5. Performed git clone to ensure I had the latest scripts etc. and reran the build again
  6. Verified that I am able to reach the preseed.cfg file

image

Steps I followed;
Installed:

  • VirtualBox

  • Packer - Unblocked exe and extracted to D:\

  • Vagrant

  • Vagrant-Reload - in elevated CMD
    vagrant plugin install vagrant-reload

  • Packer - in elevated PowerShell
    $env:Path += ";D:\"

Git:
git clone https://github.com/rapid7/metasploitable3.git # Extract contents to D:\

Elevated PowerShell:
Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope Process

Disable AV and FW

Build:
.\build.ps1 windows2008 # Success

Post:
vagrant up

Build:
.\build.ps1 ubuntu1404 # Fail

Any ideas what else I could try, please?

Host System

  • OS: Windows 11 Pro 21H2 build 22000.1817
  • Packer Version: 1.8.6
  • Vagrant Version: 2.3.4
  • VirtualBox Version: 7.0.6 r155176

Command Output

PS D:> .\build.ps1 ubuntu1404

Compatible version of VirtualBox found.
Compatible version of Packer found.
Compatible version of Vagrant found.
Compatible version of vagrant-reload plugin found.
All requirements found. Proceeding...
Building metasploitable3-ub1404 Vagrant box...
virtualbox-iso: output will be in this color.

==> virtualbox-iso: Retrieving Guest additions
==> virtualbox-iso: Trying C:\Program Files\Oracle\VirtualBox/VBoxGuestAdditions.iso
==> virtualbox-iso: Trying file://C:/Program%20Files/Oracle/VirtualBox/VBoxGuestAdditions.iso
==> virtualbox-iso: file://C:/Program%20Files/Oracle/VirtualBox/VBoxGuestAdditions.iso => C:/Program Files/Oracle/VirtualBox/VBoxGuestAdditions.iso
==> virtualbox-iso: Retrieving ISO
==> virtualbox-iso: Trying http://old-releases.ubuntu.com/releases/14.04.0/ubuntu-14.04-server-amd64.iso
==> virtualbox-iso: Trying http://old-releases.ubuntu.com/releases/14.04.0/ubuntu-14.04-server-amd64.iso?checksum=sha256%3Aababb88a492e08759fddcf4f05e5ccc58ec9d47fa37550d63931d0a5fa4f7388
==> virtualbox-iso: http://old-releases.ubuntu.com/releases/14.04.0/ubuntu-14.04-server-amd64.iso?checksum=sha256%3Aababb88a492e08759fddcf4f05e5ccc58ec9d47fa37550d63931d0a5fa4f7388 => D:\packer_cache\110e9dcdcb48bd4ab673fbe6336d9b7444a59e18.iso
==> virtualbox-iso: Starting HTTP server on port 9001
==> virtualbox-iso: Creating virtual machine...
==> virtualbox-iso: Creating hard drive output-virtualbox-iso\metasploitable3-ub1404.vdi with size 40000 MiB...
==> virtualbox-iso: Mounting ISOs...
virtualbox-iso: Mounting boot ISO...
==> virtualbox-iso: Creating forwarded port mapping for communicator (SSH, WinRM, etc) (host port 4316)
==> virtualbox-iso: Executing custom VBoxManage commands...
virtualbox-iso: Executing: modifyvm metasploitable3-ub1404 --memory 4096
virtualbox-iso: Executing: modifyvm metasploitable3-ub1404 --cpus 2
==> virtualbox-iso: Starting the virtual machine...
==> virtualbox-iso: Waiting 20s for boot...
==> virtualbox-iso: Typing the boot command...
==> virtualbox-iso: Using SSH communicator to connect: 127.0.0.1
==> virtualbox-iso: Waiting for SSH to become available...

sir, I found that #579 might be the solution for the issue. Going to try it out.

@Johnandjoshua - thanks for that. Had actually tried that before, and still have the suggested config currently set. Did read somewhere that Packer has issues with WSL enabled systems, and I have WSL enabled on host, and currently running the build from a Hyper-V guest using nested VM. I realised that it is more of an oddity that the Win2K8 server built than it is for the Linux VM to fail.

That said, happy to close this as the issue is most likely to be my complex setup rather than a bug. I am working around the issue using PowerShell to manipulate the multiple adapters.