Hi, all
I define a VM with a virtio scsi disk and I specify a controller index.
<disk type='file' device='disk'>
<driver name='qemu' type='raw' cache='none'
io='native'/>
<source file='/mnt/sdb/wangrui/img/sles10_sp3_32_2U-5'/>
<target dev='sdb' bus='scsi'/>
<address type='drive' controller='10' bus='0'
target='0' unit='1'/>
</disk>
Controllers 0-10 are created(in virDomainDefAddDiskControllersForType())
although I have only one scsi disk.
Are the controllers 0-9 useful for some reason?
If the user specifies controller='n', it will cost extra time and memory
for creating controllers from 0 to n-1. It becomes worse if n is a very
large value (Usually it's the user's wrong configuration). I think if
controllers from 0 to n-1 are kept for other use , we should better to
check whether n is meaningless(A very large number is meaningless).
BTW, I modify this function. Only the specified index controller will be
created. It seems to work fine.