How do I associate a Vagrant project directory with an existing VirtualBox VM?

后端 未结 10 1799
梦如初夏
梦如初夏 2020-12-02 03:57

Somehow my Vagrant project has disassociated itself from its VirtualBox VM, so that when I vagrant up Vagrant will import the base-box and create a new virtual

10条回答
  •  执笔经年
    2020-12-02 04:24

    For multi-VM setups, it would look like this:

    {
       "active":{
            "web":"a1fc9ae4-5d43-49cb-be31-ab3c4f74745d",
            "db":"13503bc5-76b8-4c26-95c4-32435b372212"
       }
    }
    

    You can get the vm names from the Vagrantfile used to create those VMs. Look for this line:

    config.vm.define :web do |web_config|
    

    "web" is the name of the vm in this case.

提交回复
热议问题