1

I've got a VM with only the OS [Ubuntu] running clean.

I'd like to share this OS installation as a base for multiple local VMs I plan to have in order to save disk space/multiple installations. Is that possible to share a snapshot between multiple VMs in this case? How can that be achieved?

Thanks in advance.

3 Answers 3

1

You can easily clone your VM, then use the cloned disk as a template for several VM's.

In this situation each VM would be a snapshot made on the fresh clone you created.

Full how to

2
  • Isn't there a way of sharing the same Snapshot? I don't see the reason of having the same snapshot being replicated multiple times... But I might be very wrong.
    – D. Caan
    Aug 29, 2014 at 14:45
  • The snapshot includes your machine state, in other words what is happening on the computer at any given time. Each VM requires its own state to run.
    – Reaces
    Aug 29, 2014 at 14:47
0

I think what you're looking for can be found in the Differencing Images section of the VirtualBox Documentation.

Basically, you can setup a single base image that is immutable, but shared between several VMs. Each indiviudal VM will have a differencing disk that recordes the changes to the original disk. This method would likely save on disk space vs cloning since the base image would be shared between all machines.

0

Vagrant is a tool that can help you manage this in a very straightforward way. You create a 'box' from your base image, and the box works as a template for multiple instances of VMs. I use one box for my backend and frontend servers. Ansible can provision what needs to be on them. The instances are disposable. If sparsity is of higher priority then look into Docker as that allows isolating just the required dependencies above a shared Linux kerkel.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.