RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1007228 - update-device report success when failing to set <boot order> to cdrom/floppy device.
Summary: update-device report success when failing to set <boot order> to cdrom/floppy...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.0
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Martin Kletzander
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-09-12 07:29 UTC by Hu Jianwei
Modified: 2015-11-19 05:43 UTC (History)
6 users (show)

Fixed In Version: libvirt-1.2.17-5.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-11-19 05:43:55 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:2202 0 normal SHIPPED_LIVE libvirt bug fix and enhancement update 2015-11-19 08:17:58 UTC

Description Hu Jianwei 2013-09-12 07:29:20 UTC
Description of problem:
libvirt do not report an error when failing to set <boot order> to cdrom device.

Version-Release number of selected component (if applicable):
libvirt-0.10.2-23.el6.x86_64
qemu-kvm-rhev-0.12.1.2-2.398.el6.x86_64
kernel-2.6.32-415.el6.x86_64

This issue can be reproduced on rhel6.4.z.
libvirt-0.10.2-18.el6_4.11.x86_64
qemu-kvm-0.12.1.2-2.355.el6.x86_64
kernel-2.6.32-358.el6.x86_64

How reproducible:
100%

Steps:
1. Define a guest with cdrom device.
[root@test666 ~]# virsh dumpxml r6 | grep "cd" -A7
    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <source file='/var/lib/libvirt/images/ubuntu-12.04-server-amd64.iso'/>
      <target dev='hdc' bus='ide'/>
      <readonly/>
      <alias name='ide0-1-0'/>
      <address type='drive' controller='0' bus='1' target='0' unit='0'/>
    </disk>
2. Make a new cdrom xml as below, just add one line <boot order>
[root@test666 ~]# cat cdrom.xml
<disk type='file' device='cdrom'>
<driver name='qemu' type='raw'/>
<source file='/var/lib/libvirt/images/ubuntu-12.04-server-amd64.iso'/>
<target dev='hdc' bus='ide'/>
<readonly/>
<boot order='2'/>
<address type='drive' controller='0' bus='2' target='0' unit='0'/>
</disk>

3.Update cdrom device with update-device command, and check the result of update.
[root@test666 ~]# virsh update-device r6 cdrom.xml
Device updated successfully

[root@test666 ~]# virsh dumpxml r6 | grep "cd" -A7
    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <source file='/var/lib/libvirt/images/ubuntu-12.04-server-amd64.iso'/>
      <target dev='hdc' bus='ide'/>
      <readonly/>
      <alias name='ide0-1-0'/>
      <address type='drive' controller='0' bus='1' target='0' unit='0'/>
    </disk>
[root@test666 ~]#

Actual results:
As step 3, No boot order was added to domain xml, and that libvirt printed device updated successfully.

Expected results:
libvirt should print the error like the interface device or others if fail.

[root@test666 ~]#
[root@test666 ~]# virsh dumpxml r6 | grep "interface" -A7
    <interface type='network'>
      <mac address='52:54:00:da:0f:ac'/>
      <source network='default'/>
      <target dev='vnet0'/>
      <model type='virtio'/>
      <link state='down'/>
      <alias name='net0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </interface>
...
[root@test666 ~]# virsh update-device r6 network.xml
error: Failed to update device from network.xml
error: this function is not supported by the connection driver: cannot modify network device boot index setting

For floppy device:

[root@test666 ~]# cat floppy.xml 
<disk type='file' device='floppy'>
<driver name='qemu' type='raw' cache='none'/>
<source file='/var/lib/libvirt/images/fd2.img'/>
<target dev='fda' bus='fdc'/>
<boot order='3'/>
<address type='drive' controller='0' bus='4' target='0' unit='0'/>
</disk>
[root@test666 ~]# virsh update-device r6 floppy.xml 
Device updated successfully

[root@test666 ~]# virsh dumpxml r6 | grep floppy -A6
    <disk type='file' device='floppy'>
      <driver name='qemu' type='raw' cache='none'/>
      <source file='/var/lib/libvirt/images/fd2.img'/>
      <target dev='fda' bus='fdc'/>
      <alias name='fdc0-0-0'/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </disk>
[root@test666 ~]#

Comment 3 Jiri Denemark 2014-04-04 21:38:08 UTC
This bug was not selected to be addressed in Red Hat Enterprise Linux 6. We will look at it again within the Red Hat Enterprise Linux 7 product.

Comment 6 Martin Kletzander 2015-07-09 16:45:26 UTC
Patch proposed upstream:

https://www.redhat.com/archives/libvir-list/2015-July/msg00426.html

Comment 8 Martin Kletzander 2015-07-20 14:59:23 UTC
Fixed upstream by v1.2.17-127-g717c99f36023:

commit 717c99f3602354136ca97edca6afc8dce69aae85
Author: Martin Kletzander <mkletzan>
Date:   Thu Jul 9 18:28:38 2015 +0200

    qemu: Reject updating unsupported disk information

Comment 12 Han Han 2015-08-20 09:22:35 UTC
I can reproduce it with libvirt-1.2.17-3.el7.x86_64
Verify it on libvirt-1.2.17-5.el7.x86_64


Steps:
1. Prepare a domain with cdrom, floppy, network, and these device without <boot order>,<serial>,<wwn>,<vendor>,<product>

2. Prepare cdrom xml and with <boot order='2'/> 
or <serial>WD-WMAP9A966149</serial> 
or <wwn>0x5000c50015ea71aa</wwn>   
or <vendor>WestData</vendor>
or <product>Disk</product> in it, then UpdateDevice.
# virsh update-device tst iso.xml 
error: Failed to update device from iso.xml
error: Operation not supported: cannot modify field 'boot order' of the disk
# virsh update-device tst iso.xml 
error: Failed to update device from iso.xml
error: Operation not supported: cannot modify field 'wwn' of the disk
# virsh update-device tst iso.xml                                                                                                                          
error: Failed to update device from iso.xml
error: Operation not supported: cannot modify field 'vendor' of the disk
# virsh update-device tst iso.xml                                                                                                                          
error: Failed to update device from iso.xml
error: Operation not supported: cannot modify field 'product' of the disk

3. Prepare floppy xml and do as step2 do to floppy disk
# virsh update-device tst fd.xml 
error: Failed to update device from fd.xml
error: Operation not supported: cannot modify field 'boot order' of the disk
# virsh update-device tst fd.xml 
error: Failed to update device from fd.xml
error: Operation not supported: cannot modify field 'wwn' of the disk
# virsh update-device tst fd.xml 
error: Failed to update device from fd.xml
error: Operation not supported: cannot modify field 'vendor' of the disk
# virsh update-device tst fd.xml 
error: Failed to update device from fd.xml
error: Operation not supported: cannot modify field 'product' of the disk

4. Prepare network interface xml with <boot order='2'/>, the UpdateDevice.
# virsh update-device tst network.xml 
error: Failed to update device from network.xml
error: Operation not supported: cannot modify network device boot index setting

Comment 14 errata-xmlrpc 2015-11-19 05:43:55 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2015-2202.html


Note You need to log in before you can comment on or make changes to this bug.