Cannot import VM - 2 Differencing child disks

Discussions related to using VirtualBox on Mac OS X hosts.
Post Reply
VirtualNickname
Posts: 4
Joined: 23. Mar 2023, 15:10

Cannot import VM - 2 Differencing child disks

Post by VirtualNickname »

Hi there,

Yesterday I was able to add this virtual machine to Virtual Box and run it successfully.
I was then making space on my drive for more VMs and deleted the .vdi file for this machine by accident. I thought it was on my VmWare Fusion client, but it was my VirtualBox.

I then downloaded this VM again and tried to import it into VirtualBox, but I am now getting this error as soon as I try to import it:

Failed to open virtual machine located in /Users/accountname/Downloads/kali-linux-2023.1-virtualbox-amd64/kali-linux-2023.1-virtualbox-amd64.vbox.
Hard disk '/Users/accountname/Downloads/kali-linux-2023.1-virtualbox-amd64/kali-linux-2023.1-virtualbox-amd64.vdi' with UUID {56bbd0a4-e5b5-4cf5-8904-91810199d72f} cannot be directly attached to the virtual machine 'kali-linux-2023.1-virtualbox-amd64' ('/Users/accountname/Downloads/kali-linux-2023.1-virtualbox-amd64/kali-linux-2023.1-virtualbox-amd64.vbox') because it has 2 differencing child hard disks.
Result Code:
NS_ERROR_FAILURE (0X80004005)
Component:
MachineWrap
Interface:
IMachine {300763af-5d6b-46e6-aa96-273eac15538a}
Callee:
IVirtualBox {7682d5eb-f00e-44f1-8ca2-99d08b1cd607}


I've tried reinstalling VirtualBox but same issue. Any ideas?

Host OS: macOS Monterey 12.6.4
VirtualBox Version 7.0.6 r155176 (Qt5.15.2)
Virtual OS I'm attempting to install: kali-linux-2023.1-virtualbox-amd64.vbx (from Kali website > Prebuilt Virtual Machines > 64 bit VirtualBox)
Last edited by VirtualNickname on 23. Mar 2023, 16:27, edited 1 time in total.
VirtualNickname
Posts: 4
Joined: 23. Mar 2023, 15:10

Re: Cannot import VM - 2 Differencing child disks

Post by VirtualNickname »

I just did a test and created a new user account in macOS.
I then installed VirtualBox and imported the same VM into VirtualBox.
This worked. I was able to run the VM without any issues.

So this issue seems to be related to my own user account settings that remained when I deleted the .vdi.
How do I go about totally clearing/resetting everything related to VirtualBox and this VM on my account?
VirtualNickname
Posts: 4
Joined: 23. Mar 2023, 15:10

Re: Cannot import VM - 2 Differencing child disks

Post by VirtualNickname »

I moved the VM from Downloads to the Desktop and now I get an error saying the VM already exists in Downloads, when it definetly does not. VirtualBox has something linked to the old VM that I need to remove but I can't work out what.

Failed to open virtual machine located in /Users/accountname/Desktop/kali-linux-2023.1-virtualbox-amd64/kali-linux-2023.1-virtualbox-amd64.vbox.
Cannot register the hard disk '/Users/accountname/Desktop/kali-linux-2023.1-virtualbox-amd64/kali-linux-2023.1-virtualbox-amd64.vdi' {56bbd0a4-e5b5-4cf5-8904-91810199d72f} because a hard disk '/Users/accountname/Downloads/kali-linux-2023.1-virtualbox-amd64/kali-linux-2023.1-virtualbox-amd64.vdi' with UUID {56bbd0a4-e5b5-4cf5-8904-91810199d72f} already exists.
Result Code:
NS_ERROR_INVALID_ARG (0X80070057)
Component:
VirtualBoxWrap
Interface:
IVirtualBox {7682d5eb-f00e-44f1-8ca2-99d08b1cd607}
Last edited by VirtualNickname on 23. Mar 2023, 16:26, edited 2 times in total.
VirtualNickname
Posts: 4
Joined: 23. Mar 2023, 15:10

Re: Cannot import VM - 2 Differencing child disks

Post by VirtualNickname »

Ok I fixed it.

Uninstalled VirtualBox again.
Then deleted the entire folder in MacHD > Users > accountname > Library > VirtualBox.
Reinstalled VirtualBox.
Imported VM successfully.

I wonder if there was a specific file in that folder I could have amended instead of deleting the entire folder? Oh well, case closed!
Post Reply