As you can see in the GitHub repository, Vagrant clears any forwarded ports when running vagrant package
:
if !env[:machine].provider.driver.read_forwarded_ports.empty?
env[:ui].info I18n.t("vagrant.actions.vm.clear_forward_ports.deleting")
env[:machine].provider.driver.clear_forwarded_ports
end
As my application requires these forwarded ports to be useful, I was wondering why this action occurs, and if there’s a reason we shouldn’t change this default behavior to instead forward the same ports in the generated OVF box network configuration.