Comment 1 for bug 2022093

Revision history for this message
Artom Lifshitz (notartom) wrote :

Reproducing Mel's comment here:

In my testing I found that when we add a volume after the server is
already created, we don't honor hw_disk_bus='sata' and it instead
defaults to 'scsi'. This is also shown in your output. Example from my test:

   <devices>
     <emulator>/usr/bin/qemu-system-x86_64</emulator>
     <disk type='block' device='disk'>
       <driver name='qemu' type='raw' cache='none' io='native'/>
       <source dev='/dev/sdc' index='3'/>
       <backingStore/>
       <target dev='sda' bus='sata'/>
       <serial>f0314323-07a8-4d0c-8f8f-01de2f2df029</serial>
       <alias name='sata0-0-0'/>
       <address type='drive' controller='0' bus='0' target='0' unit='0'/>
     </disk>
     <disk type='block' device='disk'>
       <driver name='qemu' type='raw' cache='none' io='native'/>
       <source dev='/dev/sdd' index='2'/>
       <backingStore/>
       <target dev='sdb' bus='scsi'/>
       <serial>c0166f77-bf65-48a8-8393-bf2dfd7bdcec</serial>
       <alias name='scsi0-0-1'/>
       <address type='drive' controller='0' bus='0' target='0' unit='1'/>
     </disk>

Contrast that with specifying two volumes at server create time where
both disks get bus='sata':

   <devices>
     <emulator>/usr/bin/qemu-system-x86_64</emulator>
     <disk type='block' device='disk'>
       <driver name='qemu' type='raw' cache='none' io='native'/>
       <source dev='/dev/sdc' index='2'/>
       <backingStore/>
       <target dev='sda' bus='sata'/>
       <serial>f0314323-07a8-4d0c-8f8f-01de2f2df029</serial>
       <alias name='sata0-0-0'/>
       <address type='drive' controller='0' bus='0' target='0' unit='0'/>
     </disk>
     <disk type='block' device='disk'>
       <driver name='qemu' type='raw' cache='none' io='native'/>
       <source dev='/dev/sdd' index='1'/>
       <backingStore/>
       <target dev='sdb' bus='sata'/>
       <serial>c0166f77-bf65-48a8-8393-bf2dfd7bdcec</serial>
       <alias name='sata0-0-1'/>
       <address type='drive' controller='0' bus='0' target='0' unit='1'/>
     </disk>

I think that not honoring hw_disk_bus='sata' when adding a volume is
probably a bug.

I don't know if it would fixing that would fix your issue though, as I'm
not able to reproduce the same behavior you are seeing. And according to
the doc [3], it should have stayed in order if it "preserves the order
of the buses", so I'm not sure why it's happening.

I think you can go ahead and open a BZ about this issue and at the very
least, we can track our findings there. This might somehow be expected
behavior but I will need to get some input from the virt team to confirm.