Submitted by Sean Wingert on Wed, 12/23/2015 - 21:26
Recipe: How to Set up ESXi 6 (Guest) on VirtualBox (Host) on Windows with pfsense (nested guest)
Goal: Learn ESXi. Install pfsense to port-forward from a public ip using Microsoft Remote Desktop (computer:port) to private (isolated) guests
- Install Virtualbox on your Windows 64-bit computer
- In Virtualbox, create a new VM 64 bit guest by choosing Linux -> Red Hat 64
- Once created, assign 2 NICs to ESXi: Adapter 1: bridged (host-only works too) and Adapter 2: NAT (NOTE: The other types prevented networking my nested guests.)
- From another computer in the bridged vmnic0/Adapter1 network, open the vSphere client
- In vSphere (ESXi), create 3 Standard Switches: A (vmnic0 which is VirtualBox Adapter 1), B (vmnic1 which is VirtualBox Adapter 2), and C (no NICs thus creating an isolated network for pfsense Layer 3 routing) -- yes, the numbering is confusing!
- Note: VirtualBox has limitations when running another hypervisor: nested guests must be 32-bit only and have exactly 1 CPU.
- Install a 32-bit (64-bit won't work) pfsense guest on ESXi (technically a nested guest at this point) as usual, but after trying to turn it on, you'll need to fix the expected error about nested guests using VMWare's instructions
- Set pfsense's WAN to vmnic1/Adapter 2 (the B vsswitch from above) and LAN to the C vsswitch from above (note: A's purpose is to manage ESXi nor for its VMs)
- Create another 32-bit nested guest (I used XP for fun) with 1 NIC connected to the C vsswitch. Allow port 3389 (or whatever protocol you need) through that guest's firewall.
- From that new guest, log into pfsense http://192.168.1.1 with default credentials: admin / pfsense
- Create a Port Forward on pfsense.
- On pfsense's Firewall rules, allow private IP addresses to pass through.
- From the VirtualBox host, enable a port forward to the ESXi guest. I used local 3333 to 3389 guest. This allowed my host Windows computer to open Remote Desktop to localhost:3333
Add new comment