share virtual disks between guests
Is it possible to share virtual disk between two guests ?
I'd like to check if this scenario may be impelemted :
- run two rh5 guests
- each guest has one system disk
- add second virtual disk on one of these guests
- defince some database on this extra disk
- in a case of the db failure unmount/detach this virtual disk from original guest and mount/attach it on the second guest using API .
/Vlad .
Responses
This is not exactly a shared disk feature, more of an option to detach a disk from one VM and move to a different VM.
An alternative would indeed be a shared disk however in shared disk your BD disk would be attached at the same time on both VMs. Shared disks are planned for upcoming releases. In the meanwhile you can use VDSM hooks to directly attach any disk external to RHEV to the VM.
You would still need a file system that understands the shared disk model/concept right? RHEV-H would not handle the concurrent access to the disk, nor implement a peer locking methodology as such? And, when duing backup/snapshots, RHEV-H would not, unless designed with the logic in mind, understand which VM owns the disk at the time the snapshot was done.
My lab setup if offline at the moment so I can't confirm this, but as I recall, I could not move a virtual disk from VM to VM via the RHEV-M GUI, but I don't see any thing blocking it from being done via the REST API. As long as the VM disk is not being accessed? Of course, if either VM being changed is power-ed up? It would make sense to block moving the VM disk association.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
