2

I'm excessively using VirtualBox snapshots (for use in CI-builders), so typically I have a number of snapshots on a single VM. Often I find my self "forking" a new snapshot from an existing one, e.g. for updating the system:

base
└── A
    └── A1

Once the udpate completes, I replace the parent snapshot with its child, by simply removing A, VirtualBox will then merge the changeset base->A and A->A1:

base
└── A1

Cool.

However, sometimes I want to create a new snapshot subtree, that originally forks of some snapshot, and gets a life of its own:

E.g.

base
└── A
    ├── A1
    └── B
        └── B1

Now: this gets ugly pretty soon (as i keep updating the subtree), and eventually i like to clean up the snapshot tree, so it becomes:

base
├── A1
└── B1

Unfortunately, VirtualBox does not allow me to delete snapshot A with the following error:

Snapshot 'A' of the machine 'vagrantbox' cannot be deleted, because it has 2 child snapshots, which is more than the one snapshot allowed for deletion.

In theory I do not see any problems with deleting snapshot A: VirtualBox simply has to perform the snapshot merging twice (base->A->A1 and base->A->B). This will probably grow the snapshot size, but I can happily live with that (and hopefully i will get better performance by reducing the FS-layers)

So: how can I rebase a snapshot to a parent, while leaving sibling snapshots intact?

1 Answer 1

0

You can make a full VM clone based on a snapshot. The new VM will not have any snapshots. The only other way is to de-register the VM, then do all the work yourself by using vboxmanage on the disk images and editing the VM's XML file.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .