Skip to content
reubenajohnston edited this page Feb 10, 2025 · 14 revisions

General information

  • VMware Fusion Pro and Workstation Pro are now available for free for both personal and business use (reference)
  • To access licensed VMware products, you first need to create a Broadcom account
    • Go here and complete registration with your email, then login
  • VMware desktop hypervisor options
    • For PCs running Linux- or Windows-based host OS, install latest VMware Workstation Pro
    • For PCs running Apple-based host OS, install latest VMware Fusion Pro
    • Download links below were obtained from here
    • Broadcom download page for VMware Fusion Pro is here
    • Broadcom download page for VMware Workstation Pro is here
  • VMware product documentation can be found here

Create a new VM

  • Select File->New Virtual Machine
  • At the welcome dialog, select “Custom (advanced)” and click “Next”
  • Click “Next” on the choose virtual machine hardware compatibility (I always use the latest, e.g., Workstation 16.x, for hardware compatibility)
  • Select “I will install the operating system later” on the guest operating system installation dialog and click “Next”
  • Select “Linux” and one of the selections listed below on the select a guest operating system dialog and click “Next”
    • “Debian 10.x 64-bit”
    • “Ubuntu 64-bit”
  • Name the VM and specify the disk location for storing it and click “Next”
    • Typically, I create all VMs in separate folders that are within a top-level VMs folder on the host (e.g., C:\VMs or /VMs)
  • Specify at least 2 processors and 1 core per processor on the processor configuration dialog and click “Next”
  • Specify at least “4096” GB of memory for the virtual machine and click “Next”
  • Specify Network Address Translation (NAT) for the network type and click “Next”
  • Specify LSI logic for the I/O controller type and click “Next”
  • Specify SCSI for the disk type and click “Next”
  • Create a new virtual disk on the select a disk type dialog and click “Next”
    • Recommend at least 30GB disk space
  • Name the disk file and specify the disk location for storing it and click “Next”
    • Typically, I create the virtual disks in the same folder as their corresponding VM
  • Select “Customize Hardware”
    • Select “USB Controller” and change compatibility selection to USB 3.1
    • Select New CD/DVD (SATA) settings and specify
      • Connect at power on
      • Use ISO image file and browse to your *.iso downloaded earlier
    • Create additional virtual network adapters and connect them to VMNet1 VLAN
      • Kali VM only needs one additional
      • Ubuntu Server and CENTOS VMs need four additional
    • Close the Hardware dialog
  • Select finish
  • Put a description in the created VM (e.g., VM for JHU NwSec)

Install VMWare tools

  • Install the packages using $ sudo apt-get install open-vm-tools open-vm-tools-desktop
  • Reboot the VM (now you can copy/paste from your host into the VM guest)

Create a shared folder between the host and the VM for file transfers

  • Additional notes are within either the Using Shared Folders section of Workstation or the Creating a Shared Virtual Machine in Fusion section of Fusion user guide linked above
  • Typically, I create a VMs folder on the host, and then a subfolder named shared inside it
  • VM->Settings
  • Select the Options tab
  • Select Shared Folders
  • Click Always enabled
  • Click Add and create a folder on your host PC for the share between the host and the VM
  • In Linux VMs, drive will be mounted in /mnt/hgfs

Miscellaneous recommendations for VMware guests

  • Specify USB compatibility 3.0 for the guest VM USB controller (see Configuring the USB Controller and Connecting USB Devices of Workstation or Configuring a USB Controller of Fusion user guide linked above)
  • Descriptions for adding USB devices are also in the user guides (see Connecting USB Devices to Virtual Machines of Workstation or Connect and Disconnect USB Devices of Fusion user guide linked above)
  • When using multiple USB serial devices, it is not straightforward to have their settings persist; this process assumes a Windows 10 Host OS running VMware Workstation 15 and supports persistently naming of 4 USB-serial devices
  • Use Windows Device manager to specify COM port settings for each USB-serial device (in port settings->bits per second/data bits/parity/stop bits/flow control and in advanced port settings->COM port number)
  • In your Guest VM, create Serial port hardware devices for each and specify Use physical serial port and select the desired COMX port
  • The device mapping is: Serial Port - /dev/ttyS0, Serial Port 2 - /dev/ttyS1, Serial Port 3 - /dev/ttyS2, Serial Port 4 - /dev/ttyS3

Create private virtual network

  • In VMware, go to Edit->Virtual Network Editor ...
  • Click the Change Settings button and approve using administrator privileges
  • Select VMnet1 network
  • VMnet information should already be set to Host-only
  • Deselect Use local DHCP service to distribute IP address to VMs (we will be running one from a container on the Infrastructure VM)
  • Update the Subnet IP to 192.168.25.0
  • Hit OK and close the editor window

Add additional virtual network adapters and set them to private VMnet1 Network connection

  • With your VM selected in VMware, open VM->Settings
  • Select Add
  • When prompted, select Network Adapter and click Finish
  • Back in the Settings window, select the newly created Network Adapter
  • For its Network connection setting, specify Custom and then select VMnet1 (Host-only) from the combobox

Troubleshooting

  • VMware has had issues with hyper-v being enabled (on Windows); it might help to disable hyper-v if there are crashing and hangs in Workstation