virt-manager/virtinst-cdrom.diff
Charles Arnold 6f98a7f2bd - Update to virt-manager 0.8.7
* Allow renaming an offline VM
  * Spice password support (Marc-André Lureau)
  * Allow editting NIC <virtualport> settings (Gerhard Stenzel)
  * Allow enabling/disabling individual CPU features
  * Allow easily changing graphics type between VNC and SPICE for existing VM
  * Allow easily changing network source device for existing VM
- Update to virtinst 0.500.6
  * virt-install: --graphics spice now enables spicevmc and qxl
  * virt-install: New --disk parameter io=native|threads

OBS-URL: https://build.opensuse.org/package/show/Virtualization/virt-manager?expand=0&rev=51
2011-04-04 19:49:34 +00:00

29 lines
1.1 KiB
Diff

Index: virtinst-0.500.6/virtinst/VirtualDisk.py
===================================================================
--- virtinst-0.500.6.orig/virtinst/VirtualDisk.py
+++ virtinst-0.500.6/virtinst/VirtualDisk.py
@@ -1625,14 +1625,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: