Arvind
Arvind

Reputation: 938

VBoxManage.exe: error: VMDK: could not create new file : box-disk001.vmdk' (VERR_ALREADY_EXISTS)

Can any one help me into this error!!!

Following are the versions installed on my machines:

I am not sure from where its throwing error. Any suggestion will be helpful!!!

Also, I am attaching the log of 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

Is Intel Virtualization Technology should be enabled in BIOS for this? enter image description here

Upvotes: 2

Views: 8976

Answers (3)

Ram Nath
Ram Nath

Reputation: 11

I am sharing below my Vagrantfile (working one), in case it can be a help! Have fun! ###############

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

Upvotes: 1

JulienG
JulienG

Reputation: 104

For my side (MacOS), I get this issue consistently if I keep opened in virtualbox 6.1.12 the machine settings while running the vagrant destroy and deleting the disk file.

To solve it in 2 steps per this page :

  1. Get the UUID of the deleted disk
vboxmanage list hdds
  1. Purge the deleted disk :
vboxmanage closemedium disk <uuid> --delete

Upvotes: 2

dig412
dig412

Reputation: 551

I also started getting a similar error the same time this question was opened.

I have found a temporary workaround:

  1. Do a vagrant up , which will stop with the VERR_ALREADY_EXISTS error
  2. Navigate to your VirtualBox VMs directory, which should have two subfolders - the base box folder and your target machines folder. In my case these were company-base_default_1546511806177_12809 and my-dev-vm respectively.
  3. Move the large .vmdk disk image file from the target folder back to the base box folder, which should still have the .vbox and .vbox-prev files inside.
  4. In the VirtualBox GUI open the settings for the base box VM and change the name to that of your target VM.
  5. Run vagrant up again.

I think this must be caused by a Vagrant incompatibility with VirtualBox 6, or a problem with the rename API.

Upvotes: 2

Related Questions