任何人都可以帮助我解决这个错误!!!
以下是我的计算机上安装的版本:
厨师开发套件版本:2.0.28
PS C:\nginx\html\cereved\dev-environment> vagrant up
==> frontend: Box 'mvbcoding/awslinux' could not be found. Attempting to find and install...
frontend: Box Provider: virtualbox
frontend: Box Version: >= 0
==> frontend: Loading metadata for box 'mvbcoding/awslinux'
frontend: URL: https://vagrantcloud.com/mvbcoding/awslinux
==> frontend: Adding box 'mvbcoding/awslinux' (v2017.03.0.20170401) for provider: virtualbox
frontend: Downloading: https://vagrantcloud.com/mvbcoding/boxes/awslinux/versions/2017.03.0.20170401/providers/virtualbox.box
frontend: Download redirected to host: vagrantcloud-files-production.s3.amazonaws.com
frontend:
==> frontend: Successfully added box 'mvbcoding/awslinux' (v2017.03.0.20170401) for 'virtualbox'!
frontend: The Berkshelf shelf is at "C:/Users/*******/.berkshelf/vagrant-berkshelf/shelves/berkshelf20190103-12584-svd029-frontend"
==> frontend: Sharing cookbooks with VM
==> frontend: Importing base box 'mvbcoding/awslinux'...
Progress: 90%There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.
Command: ["import", "\\\\?\\C:\\Users\\*******\\.vagrant.d\\boxes\\mvbcoding-VAGRANTSLASH-awslinux\\2017.03.0.20170401\\virtualbox\\box.ovf", "--vsys", "0", "--vmname", "amzn-ami-hvm-2017030201
70401-x86_64-gp2-201704051103-guest-72463CQOefdxv_default_1491390639577_72670_1546506401977_30636", "--vsys", "0", "--unit", "7", "--disk", "C:\\Users\\*******\\VirtualBox VMs\\amzn-ami-hvm-201
703020170401-x86_64-gp2-201704051103-guest-72463CQOefdxv_default_1491390639577_72670_1546506401977_30636\\box-disk001.vmdk"]
Stderr: 0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Interpreting \\?\C:\Users\*******\.vagrant.d\boxes\mvbcoding-VAGRANTSLASH-awslinux\2017.03.0.20170401\virtualbox\box.ovf...
OK.
0%...
Progress state: VBOX_E_FILE_ERROR
VBoxManage.exe: error: Appliance import failed
VBoxManage.exe: error: Could not create the imported medium 'C:\Users\*******\VirtualBox VMs\amzn-ami-hvm-201703020170401-x86_64-gp2-201704051103-guest-72463CQOefdxv_default_1491390639577_72670
_1546506401977_30636\box-disk001.vmdk'.
VBoxManage.exe: error: VMDK: could not create new file 'C:\Users\*******\VirtualBox VMs\amzn-ami-hvm-201703020170401-x86_64-gp2-201704051103-guest-72463CQOefdxv_default_1491390639577_72670_1546
506401977_30636/box-disk001.vmdk' (VERR_ALREADY_EXISTS)
VBoxManage.exe: error: Details: code VBOX_E_FILE_ERROR (0x80bb0004), component ApplianceWrap, interface IAppliance
VBoxManage.exe: error: Context: "enum RTEXITCODE __cdecl handleImportAppliance(struct HandlerArg *)" at line 877 of file VBoxManageAppliance.cpp
我重新安装了Oracle VirtualBox和Vagrant软件。 在删除“ .vagrant.d”和“ VirtualBox VM”之后,我尝试运行“ vagrant up”命令,但是问题仍然存在。
我不确定它从哪里抛出错误。任何建议都会有帮助!!!
此外,我还要附上VirtualBox的日志
00:00:00.616136 ERROR [COM]: aRC=VBOX_E_OBJECT_NOT_FOUND (0x80bb0001) aIID={0169423f-46b4-cde9-91af-1e9d5b6cd945} aComponent={VirtualBoxWrap} aText={Could not find a registered machine named 'amzn-ami-hvm-201703020170401-x86_64-gp2-201704051103-guest-72463CQOefdxv_default_1491390639577_72670'}, preserve=false aResultDetail=0
00:00:00.617136 ERROR [COM]: aRC=VBOX_E_FILE_ERROR (0x80bb0004) aIID={4afe423b-43e0-e9d0-82e8-ceb307940dda} aComponent={MediumWrap} aText={Could not find file for the medium 'C:\Users\*******\VirtualBox VMs\amzn-ami-hvm-201703020170401-x86_64-gp2-201704051103-guest-72463CQOefdxv_default_1491390639577_72670\box-disk001.vmdk' (VERR_PATH_NOT_FOUND)}, preserve=false aResultDetail=0
00:00:00.716925 ERROR [COM]: aRC=VBOX_E_OBJECT_NOT_FOUND (0x80bb0001) aIID={0169423f-46b4-cde9-91af-1e9d5b6cd945} aComponent={VirtualBoxWrap} aText={Could not find a registered machine named 'amzn-ami-hvm-201703020170401-x86_64-gp2-201704051103-guest-72463CQOefdxv_default_1491390639577_72670'}, preserve=false aResultDetail=0
00:00:00.717926 ERROR [COM]: aRC=VBOX_E_FILE_ERROR (0x80bb0004) aIID={4afe423b-43e0-e9d0-82e8-ceb307940dda} aComponent={MediumWrap} aText={Could not find file for the medium 'C:\Users\*******\VirtualBox VMs\amzn-ami-hvm-201703020170401-x86_64-gp2-201704051103-guest-72463CQOefdxv_default_1491390639577_72670\box-disk001.vmdk' (VERR_PATH_NOT_FOUND)}, preserve=false aResultDetail=0
00:00:23.975604 ApplImp ERROR [COM]: aRC=E_FAIL (0x80004005) aIID={f30138d4-e5ea-4b3a-8858-a059de4c93fd} aComponent={MachineWrap} aText={Could not create the settings file 'C:\Users\*******\VirtualBox VMs\amzn-ami-hvm-201703020170401-x86_64-gp2-201704051103-guest-72463CQOefdxv_default_1491390639577_72670_1546520279927_40227\amzn-ami-hvm-201703020170401-x86_64-gp2-201704051103-guest-72463CQOefdxv_default_1491390639577_72670_1546520279927_40227.vbox' (VERR_PATH_NOT_FOUND)}, preserve=false aResultDetail=0
00:00:23.976605 ApplImp ERROR [COM]: aRC=VBOX_E_OBJECT_IN_USE (0x80bb000c) aIID={4afe423b-43e0-e9d0-82e8-ceb307940dda} aComponent={MediumWrap} aText={Medium 'C:\Users\*******\VirtualBox VMs\amzn-ami-hvm-201703020170401-x86_64-gp2-201704051103-guest-72463CQOefdxv_default_1491390639577_72670_1546520279927_40227\box-disk001.vmdk' cannot be closed because it is still attached to 1 virtual machines}, preserve=false aResultDetail=0
00:00:25.142254 ERROR [COM]: aRC=VBOX_E_OBJECT_NOT_FOUND (0x80bb0001) aIID={0169423f-46b4-cde9-91af-1e9d5b6cd945} aComponent={VirtualBoxWrap} aText={Could not find a registered machine named 'amzn-ami-hvm-201703020170401-x86_64-gp2-201704051103-guest-72463CQOefdxv_default_1491390639577_72670'}, preserve=false aResultDetail=0
00:00:25.144256 ERROR [COM]: aRC=VBOX_E_FILE_ERROR (0x80bb0004) aIID={4afe423b-43e0-e9d0-82e8-ceb307940dda} aComponent={MediumWrap} aText={Could not find file for the medium 'C:\Users\*******\VirtualBox VMs\amzn-ami-hvm-201703020170401-x86_64-gp2-201704051103-guest-72463CQOefdxv_default_1491390639577_72670\box-disk001.vmdk' (VERR_PATH_NOT_FOUND)}, preserve=false aResultDetail=0
00:00:25.161267 Medium::Task ERROR [COM]: aRC=VBOX_E_FILE_ERROR (0x80bb0004) aIID={4afe423b-43e0-e9d0-82e8-ceb307940dda} aComponent={MediumWrap} aText={Could not create the imported medium 'C:\Users\*******\VirtualBox VMs\amzn-ami-hvm-201703020170401-x86_64-gp2-201704051103-guest-72463CQOefdxv_default_1491390639577_72670_1546520279927_40227\box-disk001.vmdk'.
00:00:25.161267 Medium::Task VMDK: could not create new file 'C:\Users\*******\VirtualBox VMs\amzn-ami-hvm-201703020170401-x86_64-gp2-201704051103-guest-72463CQOefdxv_default_1491390639577_72670_1546520279927_40227/box-disk001.vmdk' (VERR_ALREADY_EXISTS)}, preserve=false aResultDetail=0
00:00:25.162269 ApplImp ERROR [COM]: aRC=VBOX_E_FILE_ERROR (0x80bb0004) aIID={8398f026-4add-4474-5bc3-2f9f2140b23e} aComponent={ApplianceWrap} aText={Could not create the imported medium 'C:\Users\*******\VirtualBox VMs\amzn-ami-hvm-201703020170401-x86_64-gp2-201704051103-guest-72463CQOefdxv_default_1491390639577_72670_1546520279927_40227\box-disk001.vmdk'.
00:00:25.162269 ApplImp VMDK: could not create new file 'C:\Users\*******\VirtualBox VMs\amzn-ami-hvm-201703020170401-x86_64-gp2-201704051103-guest-72463CQOefdxv_default_1491390639577_72670_1546520279927_40227/box-disk001.vmdk' (VERR_ALREADY_EXISTS)}, preserve=false aResultDetail=0
00:00:26.324906 ERROR [COM]: aRC=VBOX_E_OBJECT_NOT_FOUND (0x80bb0001) aIID={0169423f-46b4-cde9-91af-1e9d5b6cd945} aComponent={VirtualBoxWrap} aText={Could not find a registered machine named 'amzn-ami-hvm-201703020170401-x86_64-gp2-201704051103-guest-72463CQOefdxv_default_1491390639577_72670'}, preserve=false aResultDetail=0
00:00:26.325907 ERROR [COM]: aRC=VBOX_E_FILE_ERROR (0x80bb0004) aIID={4afe423b-43e0-e9d0-82e8-ceb307940dda} aComponent={MediumWrap} aText={Could not find file for the medium 'C:\Users\*******\VirtualBox VMs\amzn-ami-hvm-201703020170401-x86_64-gp2-201704051103-guest-72463CQOefdxv_default_1491390639577_72670\box-disk001.vmdk' (VERR_PATH_NOT_FOUND)}, preserve=false aResultDetail=0
00:00:26.340679 Medium::Task ERROR [COM]: aRC=VBOX_E_FILE_ERROR (0x80bb0004) aIID={4afe423b-43e0-e9d0-82e8-ceb307940dda} aComponent={MediumWrap} aText={Could not create the imported medium 'C:\Users\*******\VirtualBox VMs\amzn-ami-hvm-201703020170401-x86_64-gp2-201704051103-guest-72463CQOefdxv_default_1491390639577_72670_1546520279927_40227\box-disk001.vmdk'.
00:00:26.340679 Medium::Task VMDK: could not create new file 'C:\Users\*******\VirtualBox VMs\amzn-ami-hvm-201703020170401-x86_64-gp2-201704051103-guest-72463CQOefdxv_default_1491390639577_72670_1546520279927_40227/box-disk001.vmdk' (VERR_ALREADY_EXISTS)}, preserve=false aResultDetail=0
00:00:26.341179 ApplImp ERROR [COM]: aRC=VBOX_E_FILE_ERROR (0x80bb0004) aIID={8398f026-4add-4474-5bc3-2f9f2140b23e} aComponent={ApplianceWrap} aText={Could not create the imported medium 'C:\Users\*******\VirtualBox VMs\amzn-ami-hvm-201703020170401-x86_64-gp2-201704051103-guest-72463CQOefdxv_default_1491390639577_72670_1546520279927_40227\box-disk001.vmdk'.
00:00:26.341179 ApplImp VMDK: could not create new file 'C:\Users\*******\VirtualBox VMs\amzn-ami-hvm-201703020170401-x86_64-gp2-201704051103-guest-72463CQOefdxv_default_1491390639577_72670_1546520279927_40227/box-disk001.vmdk' (VERR_ALREADY_EXISTS)}, preserve=false aResultDetail=0
00:00:31.353526 Watcher ERROR [COM]: aRC=E_ACCESSDENIED (0x80070005) aIID={0169423f-46b4-cde9-91af-1e9d5b6cd945} aComponent={VirtualBoxWrap} aText={The object is not ready}, preserve=false aResultDetail=0
答案 0 :(得分:1)
在打开此问题的同时,我也开始遇到类似的错误。
我找到了一个临时解决方法:
vagrant up
,它将因VERR_ALREADY_EXISTS
错误而停止company-base_default_1546511806177_12809
和my-dev-vm
。.vmdk
磁盘映像文件从目标文件夹移回到基本框文件夹,该文件夹中仍应包含.vbox
和.vbox-prev
文件。vagrant up
。我认为这可能是由于与VirtualBox 6的游民不兼容或重命名API引起的。
答案 1 :(得分:0)
在我这边(MacOS),如果我在运行 vagrant destroy 和删除磁盘文件时在 virtualbox 6.1.12 中保持打开机器设置,我会一直遇到这个问题。
每 this page 分两步解决:
vboxmanage list hdds
vboxmanage closemedium disk <uuid> --delete
答案 2 :(得分:0)
我在我的 Vagrantfile 下分享(工作文件),以防万一!玩得开心! ###############
Vagrant.configure("2") do |config|
(6..8).each do |i|
config.vm.define "node#{i}" do |node|
node.vm.box = "ubuntu/bionic64"
# config.vm.define "ansible"
# config.vm.provision "ansible", playbook: "ubuntu.yml"
node.vm.network "private_network", ip: "10.0.3.#{i}", auto_config: true
# config.vm.hostname = "node#{i}"
node.vm.provider "virtualbox" do |vb|
# Do not load the command line GUI
vb.gui = false
file_to_disk = "node#{i}.vdi"
unless File.exist?"node#{i}.vdi"
vb.customize ['createhd', '--filename', file_to_disk, '--size', 20 * 1024]
end
# Virtual Machine Name
vb.name = "node#{i}"
vb.memory = "2512"
vb.cpus = "2"
# Network settings
vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
vb.customize ["modifyvm", :id, "--natdnsproxy1", "on"]
#
vb.customize ["modifyvm", :id, "--uart1", "0x3F8", 4]
vb.customize ['storageattach', :id, '--storagectl', 'SCSI', '--port', 2, '--device', 0, '--type', 'hdd', '--medium', "node#{i}.vdi"]
#
#
end
node.vm.provision "shell", inline: "echo hello from node #{i}"
#
end
end
end