Loading...

VMWare Tools Installer

For the days you don’t want to log in to your VMWare account to download VMWare client:

https://packages.vmware.com/tools/esx/index.html

Usually life runs smoothly, but this can be helpful when there are roadbumps.

Install PFSense on VMWare ESXI with VLAN tagging

I had tried virtualizing my PFSense box in the past and had not been able to get any devices to talk back to the PFSense box. It seemed like a very straightforward setup to me. I recently tackled the project again as my physical hardware was going out on my old box causing PFSense to crash. I won’t get into the details of that box. The good news is that it’s off now. 🙂 Here is an overview of how I did this.

  1. Spin up new virtual machine on VMWare ESXI with PFSense. Set up 2 network adapters within ESXI and the PFSense machine’s settings.
    1. For ease in configuration, I turned on the LAN DHCP within PFSense. That is not required though, there are plenty of ways to accomplish this task.
  2. Download a backup config from existing firewall.
  3. Once installed, restore the backup config to your newly installed PFSense machine.
  4. Modify adapters as necessary. If you didn’t turn on DHCP, another option at this stage is to use the console interface in VMWare to set the interfaces in PFSense. Both methods are very easy to do.
  5. At this stage, if I were to plug my existing WAN into the newly designated port and the existing LAN into the newly designated port, what would happen? Assuming you mapped the ports correctly in PFSense and VMware and everything is plugged into the right spot, you’ll be missing one (quite important) step. In the properties of the adapter in ESXI, you have to set the internal LAN VLAN to 4095. This ID allows VLAN traffic to pass through without being modified. VLAN 0 disregards the tags which is the default.

This process is by no means difficult, but it was tricky. It was obvious why the traffic was not passing in my first attempt but it was not immediately obvious that VLAN 4095 is the one to use to maintain the tagging. That simple change has everything working properly.

VMWare – Formatting a drive

So I have a host with ESXI 6.5. I put in a spare laptop hard drive I had laying around just to store some files on. I wouldn’t recommend a laptop drive in a corporate or production environment, but in my personal “home use” case, this will be just fine. I won’t be streaming from this drive either, just data at rest really. So I powered down the host and put in the new hard drive. I turned it back on and the ESXI web GUI kept crashing when I was trying to add the drive. I searched for a bit and tried deleting partitions. Nothing seemed to work. I found a resolution by completely formatting the drive using mklabel. See below for details. Here was the error:

Error: Both the primary and backup GPT tables are corrupt.  Try making a fresh table, and using Parted's rescue feature to recover partitions.

  1. SSH into your ESXI Host.
  2. Type: ls /vmfs/devices/disks/
  3. Find the disk in question. I’ve found that VMWare does a pretty good job of labeling it by the drive tray it is in, but this may not always be the case. There are some VMWare articles you will want to reference to verify you are making changes to the right disk. This is especially true for a production machine that you have live data on. The last thing you want to do is delete production data.
  4. In my case, this was the disk name: mpx.vmhba1:C0:T1:L0 
  5. Now let’s get to the formatting!
  6. Run this: partedUtil mklabel /vmfs/devices/disks/mpx.vmhba1:C0:T1:L0 gpt

Here are some of the articles I used to determine which drives needed to be formatted:

  • https://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1036609
  • https://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1008886