IDE config drive CDROM doesn't work with q35 machine type

Bug #1831538 reported by Artom Lifshitz
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
High
Lee Yarwood
Stein
Fix Released
High
Lee Yarwood

Bug Description

Description
===========

Setting [libvirt]/hw_machine_type=x86_64=q35 in nova-cpu.conf results in any instances booted with a config drive to fail to spawn.

Steps to reproduce
==================

1. Set [libvirt]/hw_machine_type=x86_64=q35 in nova-cpu.conf
2. Boot an instance with a config drive

Expected result
===============

Instance boots correctly.

Actual result
=============

Instance fails to spawn with following error in the compute log:

libvirt.libvirtError: unsupported configuration: IDE controllers are unsupported for this QEMU binary or machine type

Environment
===========

This was reported on OSP15 CI [1] and has been reproduced upstream [2].

[1] https://bugzilla.redhat.com/show_bug.cgi?id=1716358
[2] https://review.opendev.org/#/c/662887/

Tags: libvirt
Revision history for this message
Kashyap Chamarthy (kashyapc) wrote :

That is expected, because Q35 machine type does not support IDE at all; only SATA or SCSI.

When using Q35, we should change the default bus to SATA for CD-ROM. (I've double-checked it with the QEMU folks, too. Q35 has on-board SATA.)

One way to set it is via the image metadata property: `hw_disk_bus=sata`

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.opendev.org/663011

Changed in nova:
assignee: nobody → Lee Yarwood (lyarwood)
status: New → In Progress
Changed in nova:
importance: Undecided → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (stable/stein)

Fix proposed to branch: stable/stein
Review: https://review.opendev.org/663677

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.opendev.org/663011
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=527c452a6fc05a316eb8121796f761af97522772
Submitter: Zuul
Branch: master

commit 527c452a6fc05a316eb8121796f761af97522772
Author: Lee Yarwood <email address hidden>
Date: Tue Jun 4 11:57:18 2019 +0100

    libvirt: Use SATA bus for cdrom devices when using Q35 machine type

    The Q35 machine type no longer provides an IDE bus and will need to use
    a SATA bus to attach legacy devices such as cdroms. More details can be
    found in the following related bug:

    Don't assume the guest machine type to be of 'pc'
    https://bugs.launchpad.net/nova/+bug/1780138

    This change now ensures the blockinfo.get_disk_bus_for_device_type
    method will now return "sata" as the bus type when the Q35 machine type
    is used for cdrom devices on QEMU or KVM hosts that are not PPC, S390 or
    AArch64 based.

    To enable this the _get_machine_type method has been extracted from the
    Libvirt driver into the Libvirt utils module. This method has also been
    simplified through the removal of the caps parameter, replaced with
    calls to the get_arch utility method and additional extraction of
    architecture specific defaults into the existing
    get_default_machine_type utility method.

    Related-bug: 1780138
    Closes-bug: 1831538
    Change-Id: Id97f4baddcf2caff91599773d9b5de5181b7fdf6

Changed in nova:
status: In Progress → Fix Released
Matt Riedemann (mriedem)
tags: added: libvirt
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (stable/stein)

Reviewed: https://review.opendev.org/663677
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=db40cc44cbad32353510819c0aee1d0a3c9e4357
Submitter: Zuul
Branch: stable/stein

commit db40cc44cbad32353510819c0aee1d0a3c9e4357
Author: Lee Yarwood <email address hidden>
Date: Tue Jun 4 11:57:18 2019 +0100

    libvirt: Use SATA bus for cdrom devices when using Q35 machine type

    The Q35 machine type no longer provides an IDE bus and will need to use
    a SATA bus to attach legacy devices such as cdroms. More details can be
    found in the following related bug:

    Don't assume the guest machine type to be of 'pc'
    https://bugs.launchpad.net/nova/+bug/1780138

    This change now ensures the blockinfo.get_disk_bus_for_device_type
    method will now return "sata" as the bus type when the Q35 machine type
    is used for cdrom devices on QEMU or KVM hosts that are not PPC, S390 or
    AArch64 based.

    To enable this the _get_machine_type method has been extracted from the
    Libvirt driver into the Libvirt utils module. This method has also been
    simplified through the removal of the caps parameter, replaced with
    calls to the get_arch utility method and additional extraction of
    architecture specific defaults into the existing
    get_default_machine_type utility method.

    Related-bug: 1780138
    Closes-bug: 1831538
    Change-Id: Id97f4baddcf2caff91599773d9b5de5181b7fdf6
    (cherry picked from commit 527c452a6fc05a316eb8121796f761af97522772)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/nova 19.0.2

This issue was fixed in the openstack/nova 19.0.2 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on nova (master)

Change abandoned by Artom Lifshitz (<email address hidden>) on branch: master
Review: https://review.opendev.org/662887

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/nova 20.0.0.0rc1

This issue was fixed in the openstack/nova 20.0.0.0rc1 release candidate.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.