diff options
author | Cole Robinson <crobinso@redhat.com> | 2013-10-02 20:25:42 -0400 |
---|---|---|
committer | Cole Robinson <crobinso@redhat.com> | 2013-10-02 20:31:57 -0400 |
commit | 0614e490c81ec7dd4e6933894a244849c19403ba (patch) | |
tree | fe7d61822ab7350b021d8aea8906b25baebaa7b8 /virtinst/devicedisk.py | |
parent | e6cebd04caedfb191a93060382eacb3105486f16 (diff) | |
download | virt-manager-0614e490c81ec7dd4e6933894a244849c19403ba.tar.gz |
VirtualDisk: Don't try to force cdrom target=hdc
It was required a long long time ago, before qemu supported -drive
and possibly ancient xen. Nowadays it should be pointless, and contributes
to some issues like bz 905439
Diffstat (limited to 'virtinst/devicedisk.py')
-rw-r--r-- | virtinst/devicedisk.py | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/virtinst/devicedisk.py b/virtinst/devicedisk.py index 2d962ee2..09dd6d25 100644 --- a/virtinst/devicedisk.py +++ b/virtinst/devicedisk.py @@ -799,20 +799,10 @@ class VirtualDisk(VirtualDevice): @returns generated target @rtype C{str} """ - - # Only use these targets if there are no other options - except_targets = ["hdc"] - prefix, maxnode = self.get_target_prefix() if prefix is None: raise ValueError(_("Cannot determine device bus/type.")) - # Special case: IDE cdrom should prefer hdc for back compat - if self.is_cdrom() and prefix == "hd": - if "hdc" not in skip_targets: - self.target = "hdc" - return self.target - if maxnode > (26 * 26 * 26): raise RuntimeError("maxnode value is too high") @@ -839,17 +829,10 @@ class VirtualDisk(VirtualDevice): seen_valid = True gen_t += "%c" % (ord('a') + digit - 1) - if gen_t in except_targets: - continue if gen_t not in skip_targets: self.target = gen_t return self.target - # Check except_targets for any options - for t in except_targets: - if t.startswith(prefix) and t not in skip_targets: - self.target = t - return self.target raise ValueError(_("No more space for disks of type '%s'" % prefix)) VirtualDisk.register_type() |