Newbie - Can't get snapshots to work, I'm missing a major concept

Here’s a simple scenario:

I want to bring up a Ubuntu KVM VM, log in, install a LAMP stack, add some tools, libraries, etc. At that point I want to create a snapshot so I can use it to make several different cloned VMs with the same base image + LAMP + tools + libs.

Some of the things I’ve tried:

  • (Sunstone) VM -> Snapshot seemed like a good choice at first, but not if I want to work on multiple projects at once.
  • Next I thought snapshotting the storage (VM -> Storage -> Snapshot) was what I wanted, but for the life of me I can’t get it to work that way. I tried deferred-snapshot then shutting down the VM, only to end up with an unusable LOCKED or ERROR snapshot image.
  • Next I tried deferred snapshot through Sunstone, then the “onevm shutdown” with better luck, but I wasn’t able to then use the snapshots to create a new VM.
  • I also tried creating a clone of the initial Ubuntu KVM image with the intention of maybe setting it to persistent, doing my install, then making further clones. I couldn’t even instantiate a VM with the first clone however.

I’m lost and obviously missing how OpenNebula should be used, despite reading the docs forwards and backwards.

Hi,

What I would do is to set the image to persistent, make the changes you need, gracefully shutdown the VM, and then make the image non-persistent again.

Regarding your problems:

System snapshots are memory + disk bundled together, and they are lost after the vm is shutdown. So this is not useful for your use case.

Deferred snapshots will leave the image locked until the VM is shutdown gracefully. Not a delete, you need a onevm shutdown (–hard) action. If the image ends in error, you should find some error reason in oned.log

Any specific problem or error?

Any error message? A cloned image is just a copy, nothing else is done to the file…