Skip to content
This repository was archived by the owner on Jan 22, 2026. It is now read-only.

Commit 4df4fc3

Browse files
committed
VirtualDisk: Qemu can actually support more than 2 IDE cdroms
1 parent 52aa83e commit 4df4fc3

2 files changed

Lines changed: 4 additions & 5 deletions

File tree

tests/clitest.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,9 @@
163163
# Not specifying path= but creating storage
164164
"--disk %(NEWIMG1)s,format=raw,size=.0000001",
165165
# Colliding storage with --force
166-
"--disk %(COLLIDE)s --force"
166+
"--disk %(COLLIDE)s --force",
167+
# Two IDE cds
168+
"--disk path=%(EXISTIMG1)s,device=cdrom --disk path=%(EXISTIMG1)s,device=cdrom",
167169
],
168170

169171
"invalid": [
@@ -175,8 +177,6 @@
175177
"--file %(NEWIMG1)s",
176178
# Too many IDE
177179
"--file %(EXISTIMG1)s --file %(EXISTIMG1)s --file %(EXISTIMG1)s --file %(EXISTIMG1)s --file %(EXISTIMG1)s",
178-
# Two IDE cds
179-
"--disk path=%(EXISTIMG1)s,device=cdrom --disk path=%(EXISTIMG1)s,device=cdrom",
180180
# Size, no file
181181
"--file-size .0001",
182182
# Specify a nonexistent pool

virtinst/VirtualDisk.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1360,12 +1360,11 @@ def generate_target(self, skip_targets):
13601360
if prefix is None:
13611361
raise ValueError(_("Cannot determine device bus/type."))
13621362

1363-
# Special case: IDE cdrom must be hdc
1363+
# Special case: IDE cdrom should prefer hdc for back compat
13641364
if self.device == self.DEVICE_CDROM and prefix == "hd":
13651365
if "hdc" not in skip_targets:
13661366
self.target = "hdc"
13671367
return self.target
1368-
raise ValueError(_("IDE CDROM must use 'hdc', but target in use."))
13691368

13701369
# Regular scanning
13711370
for i in range(maxnode):

0 commit comments

Comments
 (0)