12.8.3. Configuring the Virtual Machine to Use a vHBA LUN

download PDF
After a storage pool is created for a vHBA, add the vHBA LUN to the virtual machine configuration.
  1. Find available LUNs

    First, use the virsh vol-list command in order to generate a list of available LUNs on the vHBA. For example:
    # virsh vol-list vhbapool_host3
     Name                 Path
     unit:0:4:0           /dev/disk/by-path/pci-0000:10:00.0-fc-0x5006016844602198-lun-0
     unit:0:5:0           /dev/disk/by-path/pci-0000:10:00.0-fc-0x5006016044602198-lun-0
    The list of LUN names displayed will be available for use as disk volumes in virtual machine configurations.
  2. Add the vHBA LUN to the virtual machine

    Add the vHBA LUN to the virtual machine by specifying in the virtual machine's XML:
    • the device type as lun or disk in the <disk> parameter, and
    • the source device in the <source> parameter. Note this can be entered as /dev/sdaN, or as a symbolic link generated by udev in /dev/disk/by-path|by-id|by-uuid|by-label, which can be found by running the virsh vol-list pool command.
    For example:
       <disk type='block' device='lun'>
         <driver name='qemu' type='raw'/>
         <source dev='/dev/disk/by-path/pci-0000\:04\:00.1-fc-0x203400a0b85ad1d7-lun-0'/>
         <target dev='sda' bus='scsi'/>
Red Hat logoGithubRedditYoutubeTwitter


Try, buy, & sell


About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.