我有两个使用hashicorp/precise64
的项目,但它们完全不同。如何拥有hashicorp/precise64
框的多个VM?
我尝试使用hashicorp/precise64
创建一个单独的项目文件夹,但由于另一个项目正在使用hashicorp/precise64
,因此无法正常工作。我尝试vagrant up
进行此类设置时遇到的错误如下:
$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'hashicorp/precise64'...
There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.
Command: ["import", "/home/USER/.vagrant.d/boxes/hashicorp-VAGRANTSLASH-precise64/1.1.0/virtualbox/box.ovf", "--vsys", "0", "--vmname", "precise64_1396016609451_23118", "--vsys", "0", "--unit", "9", "--disk", "/home/USER/VirtualBox VMs/precise64_1396016609451_23118/box-disk1.vmdk"]
Stderr: 0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Interpreting /home/USER/.vagrant.d/boxes/hashicorp-VAGRANTSLASH-precise64/1.1.0/virtualbox/box.ovf...
OK.
0%...
Progress state: VBOX_E_FILE_ERROR
VBoxManage: error: Appliance import failed
VBoxManage: error: Could not open the medium storage unit '/home/USER/.vagrant.d/boxes/hashicorp-VAGRANTSLASH-precise64/1.1.0/virtualbox/box-disk1.vmdk'.
VBoxManage: error: VD: error VERR_FILE_NOT_FOUND opening image file '/home/USER/.vagrant.d/boxes/hashicorp-VAGRANTSLASH-precise64/1.1.0/virtualbox/box-disk1.vmdk' (VERR_FILE_NOT_FOUND)
VBoxManage: error: Details: code VBOX_E_FILE_ERROR (0x80bb0004), component Appliance, interface IAppliance
VBoxManage: error: Context: "int handleImportAppliance(HandlerArg*)" at line 781 of file VBoxManageAppliance.cpp
答案 0 :(得分:2)
遵循建议here:
我做的是:
vagrant package
位于主要项目位置。package.box
移至新项目位置。vagrant init new_project_name ./package.box
vagrant up