1

I have been creating some VMs on the fly: set up one, created a snapshot, made a few changes, cloned it, repeated the process with the clone, and then with a clone of the clone etc.

After cleaning up some unneeded VMs, I now have some disk images in my Virtual Media Manager that are no longer attached to anything but still have child images, so I cannot delete them.

The tree roughly looks like this:

  • original.vdi, attached to original VM
    • {08932168-600d-beef-cafe-950824113607.vdi}, attached to original VM
      • {15552878-d00d-fa1a-fe15-badd0990f00d.vdi}, not attached (formerly a snapshot of a since-deleted VM)
        • {d09905e2-f00d-aca7-1e55-babefee15bad.vdi}, attached to a still-in-use VM

Now, obviously 15552878 may have some data that is still needed by d09905e2 but not in that image, nor do any of the parent images 08932168 or original have an up-to-date version of that data, so we can’t simply delete that image.

On the other hand, some of the data 15552878 may be overridden by d09905e2 and thus obsolete, so in theory we should be able to compact 15552878, dropping these sectors, or merge whatever data in 15552878 is still in use into d09905e2.

Any way to do that in VirtualBox? I have tried vboxmanage modifyhd ... compact as well as vboxmanage modifymedium --compact, both on the unattached image and its child, to no avail – size does not change.

4
  • 1
    Did you combine or delete the snapshots before moving forward? If not, I am not sure how you get out of this.
    – anon
    Commented Jul 21, 2021 at 19:58
  • I didn’t, just deleted the VMs I no longer needed, hoping VirtualBox would sort these things out or at least let me do that later...
    – user149408
    Commented Jul 21, 2021 at 20:30
  • ...and, digging a bit deeper, I don’t see any option to combine snapshots either.
    – user149408
    Commented Jul 21, 2021 at 20:41
  • Apparently no such thing in VBOX. Follow this article to see if it helps you. forums.virtualbox.org/….
    – anon
    Commented Jul 21, 2021 at 22:00

0

You must log in to answer this question.

Browse other questions tagged .