Re: [RFC PATCH] qemu: Shorten SCSI hostdev alias to avoid QEMU failure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 22.07.2013 11:58, Daniel P. Berrange wrote:
> On Fri, Jul 12, 2013 at 05:13:56PM +0200, Viktor Mihajlovski wrote:
>> The alias for hostdevs of type SCSI can be too long for QEMU if
>> larger LUNs are encountered. Here's a real life example:
>>
>>     <hostdev mode='subsystem' type='scsi' managed='no'>
>>       <source>
>>         <adapter name='scsi_host0'/>
>>         <address bus='0' target='19' unit='1088634913'/>
>>       </source>
>>       <address type='drive' controller='0' bus='0' target='0' unit='0'/>
>>     </hostdev>
>>
>> this results in a too long drive id, resulting in QEMU yelling
>>
>> Property 'scsi-generic.drive' can't find value 'drive-hostdev-scsi_host0-0-19-1088634913'
>>
>> This commit changes the alias back to the default hostdev$(index)
>> scheme.
>>
>> Signed-off-by: Viktor Mihajlovski <mihajlov@xxxxxxxxxxxxxxxxxx>
>> ---
>>
>> Actually this is highlighting a larger issue. Apparently QEMU ids
>> are limited to a length of 32 bytes. This means that SCSI based
>> drives are also in danger to exceed this limit.
>> We should consider to use a drive index for controller-attached
>> disks for alias generation instead of the verbose
>> drive-$bustype-$busaddress schema.
> 
> Urgh that sucks. I had no idea QEMU would impose such an arbitrary
> length limitation for something like this.
> 
>>
>>  src/qemu/qemu_command.c                            |   10 +---------
>>  .../qemuxml2argv-hostdev-scsi-boot.args            |    4 ++--
>>  .../qemuxml2argv-hostdev-scsi-lsi.args             |    4 ++--
>>  .../qemuxml2argv-hostdev-scsi-readonly.args        |    4 ++--
>>  .../qemuxml2argv-hostdev-scsi-virtio-scsi.args     |    4 ++--
>>  5 files changed, 9 insertions(+), 17 deletions(-)
>>


> 
> ACK
> 
> There's no back compatibility issues, since we store the aliases for running
> guests in the state XML. Thus this will only affect newly launched guests
> 
> Daniel
> 

Pushed now.

Michal

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]