Show Table of Contents
15.4. Shared Storage Example: NFS for a Simple Migration
This example uses NFS to share guest virtual machine images with other KVM host physical machines. Although not practical for large installations, it is presented to demonstrate migration techniques only. Do not use this example for migrating or running more than a few guest virtual machines. In addition, it is required that the
synchparameter is enabled. This is required for proper export of the NFS storage.
iSCSI storage is a better choice for large deployments. For configuration details, see Section 220.127.116.11, “iSCSI-based storage pools”.
For detailed information on configuring NFS, opening IP tables, and configuring the firewall, see Red Hat Linux Storage Administration Guide.
Make sure that NFS file locking is not used as it is not supported in KVM.
Export your libvirt image directoryMigration requires storage to reside on a system that is separate to the migration target systems. On this separate system, export the storage by adding the default image directory to the
hostnameparameter as required for your environment.
- Install the NFS packages if they are not yet installed:
yum install nfs-utils
- Make sure that the ports for NFS in
iptables(2049, for example) are opened and add NFS to the
- Start the NFS service:
systemctl start nfs-server
Mount the shared storage on the source and the destinationOn the migration source and the destination systems, mount the
WarningWhichever directory is chosen for the source host physical machine must be exactly the same as that on the destination host physical machine. This applies to all types of shared storage. The directory must be the same or the migration with virt-manager will fail.