On 06/18/2013 11:08 AM, Cole Robinson wrote: > On 06/18/2013 10:12 AM, Martin Kletzander wrote: >> When Virtio SCSI disk was added to machine with default-model SCSI >> controller, the new Virtio SCSI controller had the same index as the >> default one (so the domain wouldn't start or with newer libvirt even >> define). >> >> Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=950330 >> >> Signed-off-by: Martin Kletzander <mkletzan@xxxxxxxxxx> >> --- >> virtManager/addhardware.py | 9 ++++++++- >> 1 file changed, 8 insertions(+), 1 deletion(-) >> >> diff --git a/virtManager/addhardware.py b/virtManager/addhardware.py >> index e8b4826..62d69e7 100644 >> --- a/virtManager/addhardware.py >> +++ b/virtManager/addhardware.py >> @@ -1,5 +1,5 @@ >> # >> -# Copyright (C) 2006-2007 Red Hat, Inc. >> +# Copyright (C) 2006-2007, 2013 Red Hat, Inc. >> # Copyright (C) 2006 Hugh O. Brock <hbrock@xxxxxxxxxx> >> # >> # This program is free software; you can redistribute it and/or modify >> @@ -1340,8 +1340,15 @@ class vmmAddHardware(vmmGObjectUI): >> controller.set_model(controller_model) >> disk.vmm_controller = controller >> for d in controllers: >> + if controller.type == d.type: >> + controller.index += 1 >> if controller_model == d.model: >> disk.vmm_controller = None >> + controller = d >> + break >> + >> + disk.address.type = disk.address.ADDRESS_TYPE_DRIVE >> + disk.address.controller = controller.index >> >> self._dev = disk >> return True >> > > ACK 3-5, though I'd like to see a test case for this. Please push. > I pushed 2-5, with the fix I recommend against #2 and a test suite fix with #3. - Cole _______________________________________________ virt-tools-list mailing list virt-tools-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/virt-tools-list