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

1

Can any one help me into this error!!!

Following are the versions installed on my machines:

  • Vagrant 2.2.0
  • VirtualBox: 5.0.16r105871
  • Gem: 2.7.5
  • Chef Development Kit Version: 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
    

    I reinstalled the Oracle VirtualBox and Vagrant software's. I tried to run the "vagrant up" command after deleting the ".vagrant.d" and "VirtualBox VMs", but the problem still exists.

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

vagrant
virtualbox
asked on Stack Overflow Jan 3, 2019 by Arvind • edited Jan 4, 2019 by Arvind

2 Answers

1

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.

answered on Stack Overflow Jan 3, 2019 by dig412
0

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
answered on Stack Overflow Feb 7, 2021 by JulienG

User contributions licensed under CC BY-SA 3.0