Bug 1480255
| Summary: | Failed VM with q35+virtio-scsi: cdrom and disk contend for /dev/sda | ||
|---|---|---|---|
| Product: | [oVirt] ovirt-engine | Reporter: | Richard Chan <rc556677> |
| Component: | General | Assignee: | Arik <ahadas> |
| Status: | CLOSED DUPLICATE | QA Contact: | |
| Severity: | high | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 4.1.4.2 | CC: | ahadas, bugs, michal.skrivanek, mpoledni |
| Target Milestone: | --- | Flags: | rule-engine:
ovirt-4.2+
|
| Target Release: | --- | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2017-08-11 07:48:18 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | Virt | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
The cdrom device is automatically created by oVirt on sda; how do I tell it to remove this from the domain or target sdb instead? Hacky: if the cdrom is deleted from vm_device then the VM will boot with the disk on /dev/sda. This is the reverse use case of: https://bugzilla.redhat.com/show_bug.cgi?id=1429246 where I want to lose the cdrom instead of adding it. virt-manager does this:
<disk type='file' device='disk'>
<driver name='qemu' type='qcow2'/>
<source file='/var/libvirt/images/testvm.qcow2/>
<backingStore/>
<target dev='sda' bus='scsi'/>
<boot order='1'/>
<alias name='scsi0-0-0-0'/>
<address type='drive' controller='0' bus='0' target='0' unit='0'/>
</disk>
<disk type='file' device='cdrom'>
<driver name='qemu' type='raw'/>
<backingStore/>
<target dev='sdb' bus='sata'/>
<readonly/>
<alias name='sata0-0-1'/>
<address type='drive' controller='0' bus='0' target='0' unit='1'/>
</disk>
How to get oVirt to do the same?
Arik/Martin, I suppose in writeDisks() you need to check also SATA since both use sd* device name
case VirtIO_SCSI:
scsiIndex++;
if (cdDiskInterface == diskInterface) {
while (scsiIndex == payloadIndex || scsiIndex == cdRomIndex) {
scsiIndex++;
}
}
index = scsiIndex;
break;
or because of the possible payload cdrom just start all scsi disks at sdc? ah, right, its' the same as bug 1372516 *** This bug has been marked as a duplicate of bug 1372516 *** |
Description of problem: Cannot boot q35+virtio-scsi VM because domain definition has both cdrom and disk with attribute dev="sda" Version-Release number of selected component (if applicable): ovirt-engine-4.1.4.2-1.el7.centos.noarch vdsm-4.19.24-1.el7.centos.x86_64 How reproducible: Always Steps to Reproduce: 1. Create q35+virtio_scsi VM: [oVirt shell (connected)]# add vm --template-id 00000000-0000-0000-0000-000000000000 --cluster-id 16dc2c02-7d14-40a9-b170-cfdfdf63565b --name TESTVM --virtio_scsi-enabled 1 --os-type rhel_7x64 --custom_emulated_machine pc-q35-rhel7.3.0 2. Boot VM 3. Actual results: VM fails to boot: domain definition is mapping both cdrom and disk to /dev/sda Expected results: VM boots <disk device="cdrom" snapshot="no" type="file"> <address bus="0" controller="0" target="0" type="drive" unit="0" /> <source file="" startupPolicy="optional" /> <target bus="sata" dev="sda" /> <readonly /> </disk> <disk device="disk" snapshot="no" type="file"> <address bus="0" controller="0" target="0" type="drive" unit="0" /> <source file="/rhev/data-center/5ac1ff95-d7ac-4b42-89d5-241eef81b9a6/f9aaa65a-0ac7-4c61-a27d-15af39016419/images/ea86a e1b-893a-47ac-bde8-8c54b4c30e80/ee90830a-7ce8-452b-ba14-2f79f5c7250a" /> <target bus="scsi" dev="sda" /> <serial>ea86ae1b-893a-47ac-bde8-8c54b4c30e80</serial> <driver cache="none" error_policy="stop" io="threads" name="qemu" type="qcow2" /> </disk> Additional info: 1. Can't see how to remove cdrom device or map disk to sda and cdrom to sdb 2. If disk is vda, the VM boots <domain xmlns:ovirt="http://ovirt.org/vm/tune/1.0" type="kvm"> <name>TESTVM</name> <uuid>fa5a306c-2566-4a23-b1ca-5d925e0df1c1</uuid> <memory>2097152</memory> <currentMemory>2097152</currentMemory> <maxMemory slots="16">8388608</maxMemory> <vcpu current="2">16</vcpu> <devices> <channel type="unix"> <target name="com.redhat.rhevm.vdsm" type="virtio" /> <source mode="bind" path="/var/lib/libvirt/qemu/channels/fa5a306c-2566-4a23-b1ca-5d925e0df1c1.com.redhat.rhevm.vdsm" / > </channel> <channel type="unix"> <target name="org.qemu.guest_agent.0" type="virtio" /> <source mode="bind" path="/var/lib/libvirt/qemu/channels/fa5a306c-2566-4a23-b1ca-5d925e0df1c1.org.qemu.guest_agent.0" /> </channel> <input bus="ps2" type="mouse" /> <console type="unix"> <source mode="bind" path="/var/run/ovirt-vmconsole-console/fa5a306c-2566-4a23-b1ca-5d925e0df1c1.sock" /> <target port="0" type="serial" /> </console> <memballoon model="virtio"> <address bus="0x02" domain="0x0000" function="0x0" slot="0x06" type="pci" /> </memballoon> <rng model="virtio"> <backend model="random">/dev/urandom</backend> </rng> <controller index="0" model="piix3-uhci" type="usb"> <address bus="0x02" domain="0x0000" function="0x0" slot="0x02" type="pci" /> </controller> <controller index="0" model="virtio-scsi" type="scsi" /> <controller index="0" ports="16" type="virtio-serial"> <address bus="0x02" domain="0x0000" function="0x0" slot="0x04" type="pci" /> </controller> <video> <address bus="0x00" domain="0x0000" function="0x0" slot="0x01" type="pci" /> <model heads="1" ram="65536" type="qxl" vgamem="16384" vram="32768" /> </video> <graphics autoport="yes" defaultMode="secure" passwd="*****" passwdValidTo="1970-01-01T00:00:01" port="-1" tlsPort="-1" type="spice"> <channel mode="secure" name="main" /> <channel mode="secure" name="inputs" /> <channel mode="secure" name="cursor" /> <channel mode="secure" name="playback" /> <channel mode="secure" name="record" /> <channel mode="secure" name="display" /> <channel mode="secure" name="smartcard" /> <channel mode="secure" name="usbredir" /> <listen network="vdsm-ovirtmgmt" type="network" /> </graphics> <interface type="bridge"> <address bus="0x02" domain="0x0000" function="0x0" slot="0x01" type="pci" /> <mac address="00:1a:4a:2f:47:ae" /> <model type="virtio" /> <source bridge="vlan13" /> <filterref filter="vdsm-no-mac-spoofing" /> <link state="up" /> <bandwidth /> </interface> <disk device="cdrom" snapshot="no" type="file"> <address bus="0" controller="0" target="0" type="drive" unit="0" /> <source file="" startupPolicy="optional" /> <target bus="sata" dev="sda" /> <readonly /> </disk> <disk device="disk" snapshot="no" type="file"> <address bus="0" controller="0" target="0" type="drive" unit="0" /> <source file="/rhev/data-center/5ac1ff95-d7ac-4b42-89d5-241eef81b9a6/f9aaa65a-0ac7-4c61-a27d-15af39016419/images/ea86a e1b-893a-47ac-bde8-8c54b4c30e80/ee90830a-7ce8-452b-ba14-2f79f5c7250a" /> <target bus="scsi" dev="sda" /> <serial>ea86ae1b-893a-47ac-bde8-8c54b4c30e80</serial> <driver cache="none" error_policy="stop" io="threads" name="qemu" type="qcow2" /> </disk> <channel type="spicevmc"> <target name="com.redhat.spice.0" type="virtio" /> </channel> <serial type="unix"> <source mode="bind" path="/var/run/ovirt-vmconsole-console/fa5a306c-2566-4a23-b1ca-5d925e0df1c1.sock" /> <target port="0" /> </serial> </devices> <metadata> <ovirt:qos /> </metadata> <os> <type arch="x86_64" machine="pc-q35-rhel7.3.0">hvm</type> <smbios mode="sysinfo" /> <bootmenu enable="yes" timeout="10000" /> <bios useserial="yes" /> </os> <sysinfo type="smbios"> <system> <entry name="manufacturer">oVirt</entry> <entry name="product">oVirt Node</entry> <entry name="version">7-3.1611.el7.centos</entry> <entry name="serial">4C4C4544-0057-3110-8054-B1C04F463432</entry> <entry name="uuid">fa5a306c-2566-4a23-b1ca-5d925e0df1c1</entry> </system> </sysinfo> <clock adjustment="0" offset="variable"> <timer name="rtc" tickpolicy="catchup" /> <timer name="pit" tickpolicy="delay" /> <timer name="hpet" present="no" /> </clock> <features> <acpi /> </features> <cpu match="exact"> <model>SandyBridge</model> <topology cores="1" sockets="16" threads="1" /> <numa> <cell cpus="0,1" memory="2097152" /> </numa> </cpu> </domain>