I have a virt frontend that runs the VMs, and another server that stores the VM images/configs and shares via NFS.
On the frontend I mount /mnt/nfs/virt-stuff and then symlink /var/lib/libvirt/images and /etc/libvirt/ from the NFS mount point. Are there any "best practices" for NFS mount options? Do I need to worry about the filesystem on the VM store? Right now I'm just using EXT3 to store the images.
Any advice on the best way to share/store the VM images would be appreciated.
On 12/12/2011 02:52 PM, Scott Baker wrote:
I have a virt frontend that runs the VMs, and another server that stores the VM images/configs and shares via NFS.
On the frontend I mount /mnt/nfs/virt-stuff and then symlink /var/lib/libvirt/images
okay
and /etc/libvirt/
not good. Each machine's /etc/libvirt must be independent, and sharing them is a disaster waiting to happen, if libvirtd on two different machines tries to modify shared /etc/libvirt at the same time.
from the NFS mount point. Are there any "best practices" for NFS mount options? Do I need to worry about the filesystem on the VM store? Right now I'm just using EXT3 to store the images.
If you want shared configurations, then use 'virsh dumpxml' to dump your machine configurations into shared storage, and 'virsh define' from that shared configuration to populate other machines with the same setups. Sharing /etc/libvirt is not recommended.
Any advice on the best way to share/store the VM images would be appreciated.
Exposing your images via a common NFS server, accessed via the same path (in your case, /var/lib/libvirt/images pointing to the NFS mount) should do fine. You may also want to setup the libvirt-lock-sanlock project on your machines, to ensure that no two machines will start a VM with the same shared storage at once: http://libvirt.org/locking.html
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 12/12/2011 01:58 PM, Eric Blake wrote:
not good. Each machine's /etc/libvirt must be independent, and sharing them is a disaster waiting to happen, if libvirtd on two different machines tries to modify shared /etc/libvirt at the same time.
I want to be able to do migrations between two different frontends. I was told to do that you need to have shared configuration and shared VM images. Is that not true?
- -- Scott Baker - Canby Telcom System Administrator - RHCE - 503.266.8253
On 12/12/2011 03:25 PM, Scott Baker wrote:
On 12/12/2011 01:58 PM, Eric Blake wrote:
not good. Each machine's /etc/libvirt must be independent, and sharing them is a disaster waiting to happen, if libvirtd on two different machines tries to modify shared /etc/libvirt at the same time.
I want to be able to do migrations between two different frontends. I was told to do that you need to have shared configuration and shared VM images. Is that not true?
You need to have shared VM images. But migration takes care of moving the configuration from source to destination, so you do not need shared configuration. And you definitely do NOT want shared /etc/libvirt if migration is going to succeed, otherwise you have two libvirtd on different machines both trying to modify the same files.