Restoring a VirtualBox VM to a clean/default state?

You seem to want to preserve the configurations for the virtual machine.

The easy way to accomplish this is obvious: detach the virtual disk image and replace it with a new one.

The configurations for the virtual machine remain in tact, but the stored data is gone.

1. In Settings >> Storage, remove the current virtual disk image.

enter image description here

2. Add a new attachment: "Add Hard Disk".

enter image description hereenter image description here

3. "Create new disk"

enter image description here

4. VirtualBox will use the new disk.

enter image description here


For future reference, after you've installed the virtual machine and have everything running, create a snapshot. This will allow you to revert back to this squeaky, clean state whenever you want!

snapshot


See Also:

  • VirtualBox - Chapter 1: Snapshots