virt-manager/virtinst-cdrom.diff
Charles Arnold 4ad8024558 - Update to virt-manager 0.8.6
* SPICE support (requires spice-gtk) (Marc-André Lureau)
  * Option to configure CPU model
  * Option to configure CPU topology
  * Save and migration cancellation (Wen Congyang)
  * Save and migration progress reporting
  * Option to enable bios boot menu
  * Option to configure direct kernel/initrd boot
- Update to virtinst 0.500.5
  * New virt-install --cpu option for configuring CPU 
    model/features
  * virt-install --vcpus option can not specify topology and 
    maxvcpus
  * New virt-install --graphics option to unify --vnc, --sdl, 
    spice config
  * New virt-install --print-xml option to skip install and print 
    XML

OBS-URL: https://build.opensuse.org/package/show/Virtualization/virt-manager?expand=0&rev=48
2011-03-21 19:38:43 +00:00

29 lines
1.1 KiB
Diff

Index: virtinst-0.500.5/virtinst/VirtualDisk.py
===================================================================
--- virtinst-0.500.5.orig/virtinst/VirtualDisk.py
+++ virtinst-0.500.5/virtinst/VirtualDisk.py
@@ -1598,14 +1598,18 @@ class VirtualDisk(VirtualDevice):
self.target = "hdc"
return self.target
- # Regular scanning
+ # Start cdrom at 'c' and skip 'c' for non-cdrom
for i in range(maxnode):
gen_t = "%s%c" % (prefix, ord('a') + i)
- if gen_t in except_targets:
- continue
if gen_t not in skip_targets:
- self.target = gen_t
- return self.target
+ if self.device != self.DEVICE_CDROM:
+ if i != ord('c') - ord('a'):
+ self.target = gen_t
+ return self.target
+ else:
+ if i >= ord('c') - ord('a'):
+ self.target = gen_t
+ return self.target
# Check except_targets for any options
for t in except_targets: