Consistent storage mapping in the KVM environment

Veritas Storage Foundation and High Availability Solutions enable you to map and manage your storage more efficiently whether you have a guest or host solution. Managing storage in the KVM environment requires consistent mapping. Storage which is presented to the guest either using the para-virtualized VirtIO drivers, or the fully virtualized IDE emulation, needs to be mapped from the host to the guest. Due to the volatile nature of the device naming used in Linux, care must be taken when mapping storage from the host to the guest. In Linux, the device names are based on enumeration order which can change when systems are rebooted.

Consistent mapping can be achieved by using:

Avoid using disk labels when mapping storage to a guest. Disk labels can be modified by a guest and are not guaranteed.

In clustered environments, Active-Passive DMP devices cannot be mapped directly to a guest.

Non-persistent mappings can be made using 'virsh attach-device'. The non-persistent mappings can be made persistent by redefining the KVM guests using 'virsh dumpxml domain' followed by 'virsh define domain'. Alternatively, persistent mappings can be created when a virtual machine is rebooted, these non-persistent mappings are lost. Persistent mappings can be created on the host using either 'virt-manager' or by modifying the guests XML configuration using 'virsh edit <domain>'.

In the following examples,using 'virsh attach-disk'.