[virt-tools-list] [virt-manager PATCH] addhardware: Don't clash with different buses using the same prefix

Cole Robinson crobinso at redhat.com
Tue Feb 18 14:41:16 UTC 2014


On 02/18/2014 07:28 AM, Martin Kletzander wrote:
> Signed-off-by: Martin Kletzander <mkletzan at redhat.com>
> ---
>  virtManager/addhardware.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/virtManager/addhardware.py b/virtManager/addhardware.py
> index b1f6251..b446a9d 100644
> --- a/virtManager/addhardware.py
> +++ b/virtManager/addhardware.py
> @@ -1441,7 +1441,7 @@ class vmmAddHardware(vmmGObjectUI):
>          # Save occupied places per controller
>          occupied = collections.defaultdict(int)
>          for d in used_disks:
> -            if d.bus == disk.bus:
> +            if d.get_target_prefix() == disk.get_target_prefix():
>                  num = virtinst.VirtualDisk.target_to_num(d.target)
>                  occupied[num / 7] += 1
>          for c in ctrls_scsi:
> 

ACK

- Cole




More information about the virt-tools-list mailing list