Buscar

Este contenido no está disponible en el idioma seleccionado.

12.8.2. Creating a Storage Pool Using the vHBA

download PDF
It is recommended to define a libvirt storage pool based on the vHBA in order to preserve the vHBA configuration.
Using a storage pool has two primary advantages:
  • the libvirt code can easily find the LUN's path using the virsh command output, and
  • virtual machine migration requires only defining and starting a storage pool with the same vHBA name on the target machine. To do this, the vHBA LUN, libvirt storage pool and volume name must be specified in the virtual machine's XML configuration. Refer to Section 12.8.3, “Configuring the Virtual Machine to Use a vHBA LUN” for an example.
  1. Create a SCSI storage pool

    To create a vHBA configuration, first create a libvirt 'scsi' storage pool XML file based on the vHBA using the format below.

    Note

    Ensure you use the vHBA created in Procedure 12.6, “Creating a vHBA” as the host name, modifying the vHBA name scsi_hostN to hostN for the storage pool configuration. In this example, the vHBA is named scsi_host5, which is specified as <adapter name='host5'/> in a Red Hat Enterprise Linux 6 libvirt storage pool.
    It is recommended to use a stable location for the <path> value, such as one of the /dev/disk/by-{path|id|uuid|label} locations on your system. More information on <path> and the elements within <target> can be found at http://libvirt.org/formatstorage.html.
    In this example, the 'scsi' storage pool is named vhbapool_host3.xml:
      <pool type='scsi'>
         <name>vhbapool_host3</name>
         <uuid>e9392370-2917-565e-692b-d057f46512d6</uuid>
         <capacity unit='bytes'>0</capacity>
         <allocation unit='bytes'>0</allocation>
         <available unit='bytes'>0</available>
         <source>
           <adapter name='host5'/>
         </source>
          <target>
            <path>/dev/disk/by-path</path>
            <permissions>
              <mode>0700</mode>
              <owner>0</owner>
              <group>0</group>
            </permissions>
          </target>
        </pool> 
  2. Define the pool

    To define the storage pool (named vhbapool_host3 in this example), use the virsh pool-define command:
             # virsh pool-define vhbapool_host3.xml
             Pool vhbapool_host3 defined from vhbapool_host3.xml
    
  3. Start the pool

    Start the storage pool with the following command:
    # virsh pool-start vhbapool_host3
    Pool vhbapool_host3 started
    
  4. Enable autostart

    Finally, to ensure that subsequent host reboots will automatically define vHBAs for use in virtual machines, set the storage pool autostart feature (in this example, for a pool named vhbapool_host3):
    # virsh pool-autostart vhbapool_host3
Red Hat logoGithubRedditYoutubeTwitter

Aprender

Pruebe, compre y venda

Comunidades

Acerca de la documentación de Red Hat

Ayudamos a los usuarios de Red Hat a innovar y alcanzar sus objetivos con nuestros productos y servicios con contenido en el que pueden confiar.

Hacer que el código abierto sea más inclusivo

Red Hat se compromete a reemplazar el lenguaje problemático en nuestro código, documentación y propiedades web. Para más detalles, consulte el Blog de Red Hat.

Acerca de Red Hat

Ofrecemos soluciones reforzadas que facilitan a las empresas trabajar en plataformas y entornos, desde el centro de datos central hasta el perímetro de la red.

© 2024 Red Hat, Inc.