...
To assign a firewall from the virtual datacenter to a VM:
Go to Virtual datacenters
...
Edit the VM and go to Firewalls
In the Firewall policies list, select the firewall
Click Save or continue editing the VM as required
Troubleshooting:
If you cannot assign more firewall policies, check your cloud provider's limit. For example, for AWS, see https://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_SecurityGroups.html#VPCSecurityGroups
If your provider's default firewall policy does not display, you may need to synchronize your virtual datacenter or firewall policies before you continue
If an expected firewall policy does not display, for example, a firewall policy that you recently created, you may need to wait for the firewall policy to propagate through the provider's API because of eventual consistency
You can remove the default firewall when editing a VM. However, if the provider requires a firewall and you do not supply another one, the platform will assign the default firewall again.