I’m just curious.
I have my OpenNebula installed on one machine but all the data is on another SAN storage device.
My question is: If I lost the first machine but not the storage, is is possible to use the VM disks still? e.g. put them onto another machine?
hello, if your datastores use SAN storage them yes. So ideally in this simple setup mount SAN storage to /var/lib/one and backup your /etc/one dir. You can also use Ansible
are you running Opennebula Front-end or node, or both, on the first machine ?
I take that you run one front (on bare metal) and node (for VMs) on it, as assumption a).
“All the data on SAN” means one installation data + VM data files ? Or just VM data files ?
I take just VM data files as assumption b).
With assumptions a) and b), if you lose machine 1, the VM images will stay on the SAN, and if you re-build your one front and node on new hardware, you will face the following situation:
- after recovery of your one front DB, and restart, the VMs will be there
- most VMs should be able to restart, but will ave lost their active status: it’s like a reboot after crash
However, beware of one thing: all VMs with non-persistent images will lose their changes EVEN WHEN SAVED ON HARD DISK in case of a re-deploy event.
So you have to make sure that when you recover/rebuild your one front and node, you keep all the same front and node identification (name and ip addresses and ssh keys) so that you do not need to re-deploy VMs to a node seen as a new one.
So beware of always deploying VMs as persistent (or based on persistent image ) if you plan to save important data to remain in case of loss of the server.
Note: if you inadvertently created a VM as non-persistent and still want to save its data or make it persistent, there is also a procedure to do so:
- power-off the VM (DO NOT undeploy it)
- us the save VM button to create a new VM template with a copy of the image
- make sure the newly copied VM image is set as persistent
You now have a copy of your VM template and image that should be persistent.
Just a few hints from lessons I learnt the hard way.