Ticket #3959 (closed enhancement: fixed)

Opened 5 years ago

Last modified 4 years ago

You can't delete an immutable hard disk because of child disks

Reported by: shay Owned by:
Priority: major Component: virtual disk
Version: VirtualBox 2.2.2 Keywords:
Cc: Guest type: Windows
Host type: Windows


I need to create a strictly controlled build environment. I want to use a batch file and vboxmanage.exe to create and configure a VM. I also want to be able to completely remove the VM via vboxmanage.exe when I am done. Everything is possible with the exception of removing the hard disk that was added.

The vdi hard disk that I want to use is configured to be immutable. This seems to be the cause of the problem. When you create a VM using an immutable hard disk a differencing vdi child disk is automatically created. Then when it comes time to remove the VM everything can be removed except for the original immutable hard disk. This is because you get an error that the hard disk has child hard disks. The batch file doesn't know the name of these child hard disks.

The "closemedium" option should have an option to remove (and optionally delete) all child hard disks.

Error being experienced:

ERROR: Hard disk '<NULL>' has 28833136 child hard disks
Details: code E_FAIL (0x80004005), component HardDisk, interface IHardDisk, call
ee IUnknown
Context: "Close()" at line 1486 of file VBoxManageDisk.cpp

Change History

comment:1 Changed 4 years ago by frank

  • Status changed from new to closed
  • Resolution set to fixed

The immutable disk cannot be deleted as long as there a child image exists (e.g. at least one VM started with this disk attached). First remove the child image (either by VBoxManage or from the medium manager in the GUI), then you will be able to remove the immutable disk. Tested with VBox 3.2.8.

Note: See TracTickets for help on using tickets.
ContactPrivacy policyTerms of Use