You can, if you are running something like ESXi 5/6/7 or ProxMox. I wouldn't even attempt it in a VM on your daily use computer though. Make sure you pass your NIC's through straight to the firewall, otherwise, vlans can become a nightmare if you plan on using those.