first_vagcode是在文件夹f:\ vagvms \ vagcode中创建的vm,它仍然可以从vbox gui启动,但我现在无法使用vagrant up
启动它,似乎vagrant status
甚至无法发现现在,我入侵了,发现里面的所有元数据.vagrant丢失了,我知道发生了什么,我的问题是如何使用vagrant up
启动这个vm,如果我在.vagrant中为这个vm重新生成文件?或者我应该向Vagrantfile添加一些东西?但是怎么做呢?
F:\vagvms\vagcode>vagrant status
Current machine states:
default not created (virtualbox)
The environment has not yet been created. Run `vagrant up` to
create the environment. If a machine is not created, only the
default provider will be shown. So if a provider is not listed,
then the machine is not created for that environment.
F:\vagvms\vagcode>vboxmanage list vms
"first_vagcode" {3a1c41f3-3c01-4fa7-bb25-d68a66292b00}
"vagtwo_default_1431119083293_66111" {03ee5819-dfc3-4bdd-bd10-a2e4e44350c5}
答案 0 :(得分:0)
你可以:
vagrant box create BOX_ID
但是,您需要执行此操作意味着您手动对vm进行了一些更改。我建议使用Chef
或Puppet
配置VM。这样做,你可以简单地扔掉盒子并设置一个新盒子。