Project

General

Profile

Actions

action #12848

closed

os-autoinst: CDROM assumed to be on SCSI controller

Added by rpalethorpe almost 8 years ago. Updated over 7 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Feature requests
Target version:
-
Start date:
2016-07-25
Due date:
% Done:

100%

Estimated time:

Description

Observation

When running os-autoinst separately from OpenQA. If CDMODEL in vars.json is not set to something beginning with virtio-scsi then it will fail to start the virtual machine.

QEMU: qemu-system-x86_64: -device scsi-cdrom,drive=cd0,bus=scsi0.0: 'scsi-cdrom' is not a valid device model name

Reproduction

Create a vars.json similar to this

{
   "ARCH" : "x86_64",   
   "BACKEND" : "qemu",
   "CASEDIR" : "/home/richie/qa/os-autoinst-distri-opensuse",
   "CDMODEL" : "scsi-cdrom",
   "DISTRI" : "opensuse",
   "ISO" : "/var/lib/openqa/factory/iso/openSUSE-Tumbleweed-DVD-x86_64-Snapshot20160715-Media.iso",
   "PRODUCTDIR" : "/home/richie/qa/os-autoinst-distri-opensuse/products/opensuse",
   "VNC" : 90,
}

and run isotovideo. Changing CDROM to virtio-scsi-pci allows isotovideo to run succesfully, however it overwrites the value with scsi-cdrom meaning that it will fail on the next run.

Discussion

In the file qemu.pm on line 305 it decides whether or not to create a SCSI controller based on the type of drives being used. It looks for drives beginning with virtio-scsi, if none are present then no scsi controller is created. Then on line 548 it assumes the CDROM has the bus address scsi0.0.

It is not clear to me where the value scsi-cdrom comes from. The default for CDMODEL in qemu.pm is virtio-scsi-pci.

Actions

Also available in: Atom PDF