Run Juniper Virtual SRX in VMWare Workstation

The Juniper Virtual SRX firewall can run on multiple platforms, but VMware Workstation is not mentioned in the list of supported platforms. Having some experience with both, I know that almost all VM's designed for the VMware ESXi environment will run on the (stand-alone) VMware Workstation product.

I downloaded the .ova file from the Juniper website and imported it in VMware Workstation v12.1. During the import I adjusted the number of CPU's to save resources, which turned out to be a mistake. The VM really needs the two CPU's, because if you don't it just won't work (routing failures, etc..). So, don't change the defaults for CPU and memory.

The default installation uses 3 NIC's for the firewall, which can be increased to a maximum of 10. I needed a couple more for my setup, so I added Network Adapters within the VM's properties.

After booting the vSRX firewall, only 2 interfaces of the 5 showed in the firewall. The others were missing (from the > show interfaces output).

Turned out that the virtual adapter within VMware Workstation needs to be of the vmxnet3 type. And most of the adapters I added through the interface didn't have the type assigned in the VM's .vmx config file (located in the directory where the vSRX was installed from the .ova file).

Note: When you want to edit this file, you need to shut down the VM.

The following shows a part (EXAMPLE) of the .vmx file which shows the Ethernet adapter settings for this VM. The MAC addresses are generated by VMware Workstation:

ethernet0.address = "00:50:56:26:74:39"
ethernet0.addressType = "static"
ethernet0.connectionType = "bridged"
ethernet0.pciSlotNumber = "160"
ethernet0.present = "TRUE"
ethernet0.startConnected = "TRUE"
ethernet0.virtualDev = "vmxnet3"
ethernet1.address = "00:50:56:28:48:21"
ethernet1.addressType = "static"
ethernet1.connectionType = "nat"
ethernet1.pciSlotNumber = "192"
ethernet1.present = "TRUE"
ethernet1.startConnected = "TRUE"
ethernet1.virtualDev = "vmxnet3"
ethernet2.address = "00:50:56:2A:24:37"
ethernet2.addressType = "static"
ethernet2.connectionType = "custom"
ethernet2.pciSlotNumber = "224"
ethernet2.present = "TRUE"
ethernet2.startConnected = "TRUE"
ethernet2.virtualDev = "vmxnet3"
ethernet3.address = "00:50:56:3D:E3:69"
ethernet3.addressType = "static"
ethernet3.pciSlotNumber = "256"
ethernet3.present = "TRUE"
ethernet3.wakeOnPcktRcv = "FALSE"
ethernet3.virtualDev = "vmxnet3"
ethernet4.address = "00:50:56:30:46:F6"
ethernet4.addressType = "static"
ethernet4.pciSlotNumber = "1184"
ethernet4.present = "TRUE"
ethernet4.wakeOnPcktRcv = "FALSE"
ethernet4.virtualDev = "vmxnet3"

After altering the vmx config file, by adding the ethernetX.virtualDev parameters, I was able to assign and use the interfaces within the vSRX firewall.

Note that the assignment of the vSRX interfaces will most likely be different from the order of the adapters in the VM settings. Just check the MAC addresses of the interfaces in the vSRX (> show interfaces) with the MAC addresses assigned within the VM settings.

Now I can configure the vSRX for use with VM's on my laptop.

Posted on January 12, 2016 and filed under Junos, Security, Tips'n Tricks.