Best make that into 2 ports.
Seems fine to me. Probably something simple and stupid, but those are the ones that are hardest to find.
So you seem to be saying I need to create a PG per VLAN attached to the vswitch. Then in order to use that create a new vnic in the OPNSense VM for each VLAN and attach it to the VLAN PG.
Then in OPNSense create the VLAN and assign it to the new VM vnic?
Not a VLAN - from the guest OS' point of view that is just a regular untagged interface. So you assign an interface and the create rules, DHCP, etc. as you would with VLANs. But all the switching fabric things happen in the vSwitch.
You correct about the virtual NIC.
AH OK I think I am starting to get it. You are saying that the new VM provided vnic is just another NIC in OPNsense that I can assign to a network I create called Guest for instance with an address and subnet configured for the VLAN like 10.0.50.254/24 then add DHCP DNS etc. to that interface and rules as before. At this point it is just a subnet. I would have connected that vnic to the PG for VLAN 50 in the VM settings in ESXI. All traffic in/out of the Guest NIC in OPNSense would be untagged until it gets to the PG which would tag it as VLAN 50(?), is this correct ?