# Persistent storage

**URL:** <https://forum.opennebula.io/t/persistent-storage/3251>\
**Category:** Product Support\
**Created:** [November 9, 2016, 10:00am UTC](https://forum.opennebula.io/t/persistent-storage/3251 "2016-11-09T10:00:30Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![gandalf](https://avatars.discourse-cdn.com/v4/letter/g/59ef9b/32.png) [@gandalf](https://forum.opennebula.io/u/gandalf)\
**Post date:** [November 9, 2016, 10:00am UTC](https://forum.opennebula.io/t/persistent-storage/3251/1 "2016-11-09T10:00:30Z")

</div>

I’m really new to OpenNebula. I would like to bring up a private cloud similiar to Amazon EC2.  
If I remember properly, EC2 instances has ephimeral storage, and so does in OpenNebula. shutting down a VM will also destroy it’s local disks.

Would be possible to add persistent storages to a VM, with opennebula ? If yes, how?

any suggestion on how to configure the private cloud like EC2 ?

---

<div class="post-metadata">

**Author:** ![vynt-kenshiro](https://avatars.discourse-cdn.com/v4/letter/v/5fc32e/32.png) [@vynt-kenshiro](https://forum.opennebula.io/u/vynt-kenshiro)\
**Post date:** [November 10, 2016, 11:15am UTC](https://forum.opennebula.io/t/persistent-storage/3251/2 "2016-11-10T11:15:59Z")

</div>

Hello,

You should check the answer from C. R. Oldham ([Question about non-persistent disk](https://forum.opennebula.io/t/question-about-non-persistent-disk/2971))

---

<div class="post-metadata">

**Author:** ![mcabrerizo](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/mcabrerizo/32/4829_2.png) [@mcabrerizo](https://forum.opennebula.io/u/mcabrerizo)\
**Post date:** [November 10, 2016, 11:24am UTC](https://forum.opennebula.io/t/persistent-storage/3251/3 "2016-11-10T11:24:35Z")

</div>

Hi Gandalf,  
in OpenNebula you have several options:

- You’ve non persistent images. Changes in those images won’t be saved once the VM life-cycle ends.
- You’ve persistent images. Changes in those images will be saved once the VM.
- You may have volatile disks which are disposed when the VM is shutdown and cannot be saved  
and more features like snapshots, disk cloning…

I’d start with the [“Start Here” section to know more about features and terminology](http://docs.opennebula.org/5.2/intro_release_notes/concepts_terminology/intro.html) and then you may have a look at these sections so you can understand what options do you have for your private cloud:

- [http://docs.opennebula.org/5.2/operation/vm\_management/img\_guide.html?highlight=persistent#image-life-cycle](http://docs.opennebula.org/5.2/operation/vm_management/img_guide.html?highlight=persistent#image-life-cycle)
- [http://docs.opennebula.org/5.2/operation/references/template.html?highlight=volatile#volatile-disks](http://docs.opennebula.org/5.2/operation/references/template.html?highlight=volatile#volatile-disks)
- [http://docs.opennebula.org/5.2/operation/vm\_management/vm\_templates.html?highlight=persistent#disks](http://docs.opennebula.org/5.2/operation/vm_management/vm_templates.html?highlight=persistent#disks)
- [http://docs.opennebula.org/5.2/operation/vm\_management/vm\_templates.html?highlight=persistent#make-the-images-non-persistent](http://docs.opennebula.org/5.2/operation/vm_management/vm_templates.html?highlight=persistent#make-the-images-non-persistent)
- [http://docs.opennebula.org/5.2/operation/vm\_management/vm\_templates.html?highlight=persistent#cloning-templates](http://docs.opennebula.org/5.2/operation/vm_management/vm_templates.html?highlight=persistent#cloning-templates)
- [http://docs.opennebula.org/5.2/operation/vm\_management/vm\_instances.html?highlight=persistent#persistent-image-snapshots](http://docs.opennebula.org/5.2/operation/vm_management/vm_instances.html?highlight=persistent#persistent-image-snapshots)
- [http://docs.opennebula.org/5.2/operation/vm\_management/vm\_instances.html?highlight=persistent#instantiate-to-persistent](http://docs.opennebula.org/5.2/operation/vm_management/vm_instances.html?highlight=persistent#instantiate-to-persistent)

Cheers!

---

<div class="post-metadata">

**Author:** ![gandalf](https://avatars.discourse-cdn.com/v4/letter/g/59ef9b/32.png) [@gandalf](https://forum.opennebula.io/u/gandalf)\
**Post date:** [November 10, 2016, 11:41am UTC](https://forum.opennebula.io/t/persistent-storage/3251/4 "2016-11-10T11:41:28Z")

</div>

Thank you for pointing me to the right docs.  
I’m reading some docs but is not clear how to configure a VM to start from a golden image (like a Debian image) but with a totally volatile disk. I would like to automatically destroy the VM disks when the VM is powered off.

---

<div class="post-metadata">

**Author:** ![mcabrerizo](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/mcabrerizo/32/4829_2.png) [@mcabrerizo](https://forum.opennebula.io/u/mcabrerizo)\
**Post date:** [November 10, 2016, 4:14pm UTC](https://forum.opennebula.io/t/persistent-storage/3251/5 "2016-11-10T16:14:04Z")

</div>

Hi!  
I’m not sure if the following info will be fine for the scenario you’re proposing:

- You can download a VM from the marketplace or create your own VM.
- The base image with the OS can be set as non-persistent.
- You create a template for a VM which uses that image.
- You can instantiate as many VMs as you want from that template as the image is non-persistent. Non-persistent images are copies from the original.
- You can modify the content of the disk in any of the VMs, those changes won’t persist.
- You can use the terminate action with the VM.That will poweroff the VM first and remove the VM and the disk which was a copy of the base image. VM info will still be available in the database for accounting.

[This info and diagram](http://docs.opennebula.org/5.2/operation/vm_management/vm_instances.html#virtual-machine-life-cycle) has always helped me to understand what will happen with a VM.

Cheers!

---

<div class="post-metadata">

**Author:** ![gandalf](https://avatars.discourse-cdn.com/v4/letter/g/59ef9b/32.png) [@gandalf](https://forum.opennebula.io/u/gandalf)\
**Post date:** [November 10, 2016, 9:16pm UTC](https://forum.opennebula.io/t/persistent-storage/3251/6 "2016-11-10T21:16:29Z")

</div>

Seems perfect. With this I can choose if to create a totally volatile image or a ‘standard’ VM with persistent disks.

One question: as I have 2 different DC where to place opennebula, how can I create multiple regions allowing users to choose in which region start their VMs? What would happens if the requested image is not available in all regions ?

I’ve looked at federations but is not clear, to me, why there is a master/slave infrastructure.  
Can someone explain it better?

Are federation what I need to create multiple cloud regions ?
