LIST natpf rules in Virtualbox/Vagrant

后端 未结 5 1994
执念已碎
执念已碎 2021-02-04 06:13

I often get errors like this when running Vagrant:

VBoxManage: error: A NAT rule of this name already exists
VBoxManage: error: Details: code NS_ERROR_INVALID_AR         


        
5条回答
  •  旧巷少年郎
    2021-02-04 06:44

    You can list the nat rules by the following command:

    VBoxManage showvminfo #{vmid}
    

    You then get a lot of information about your VM including the forwarding rules, for example:

    NIC 1 Rule(1):   name = ssh, protocol = tcp, host ip = 127.0.0.1, host port = 2022, guest ip = , guest port = 22
    

提交回复
热议问题