Show Table of Contents
12.8.3. Configuring the Virtual Machine to Use a vHBA LUN
After a storage pool is created for a vHBA, add the vHBA LUN to the virtual machine configuration.
Find available LUNs
First, use thevirsh vol-listcommand 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.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
lunordiskin 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 thevirsh vol-list poolcommand.
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'/> </disk>

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.