Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 677226

Summary: virsh update-device can't update an xml file as to an inactive domain
Product: Red Hat Enterprise Linux 6 Reporter: Takuma Umeya <tumeya>
Component: libvirtAssignee: Daniel Veillard <veillard>
Status: CLOSED DUPLICATE QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.0CC: eblake, jwest, xen-maint
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-03-08 02:22:36 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Takuma Umeya 2011-02-14 06:46:59 UTC
Description of problem:
virsh update-device can't update an xml file as to an inactive domain. The following error messages appear: 
virsh update-device <domian-id> <xml-file>
error: Failed to update device from <xml-file>
error: Requested operation is not valid: cannot attach device on inactive domain

The operation works without error with active domain.

Version-Release number of selected component (if applicable):
Red Hat Enterprise Linux Version Number: 6.0
Kernel Version: kernel-2.6.32-71.el6.i686
Related Package Version: libvirt-client-0.8.1-27.el6.i686 

How reproducible:
Always

Steps to Reproduce:
1. Make sure the guest is stopped. 
2. Attach a DVD image to the kvm guest OS by virt-manager.
3. Create an xml file to detach the DVD image. E.g: 
# less /tmp/foo.xml
<disk type='file' device='cdrom'>
<driver name='qemu' type='raw'/>
<target dev='hdc' bus='ide'/>
<readonly/>
<address type='drive' controller='0' bus='1' unit='0'/>
</disk>
4. Update an xml file of the kvm guest. 
# virsh update-device <domain-id> /tmp/foo.xml  


Actual results:
virsh update-device can't update an xml file because the domain is inactive. 

Expected results:
virsh update-device should be able to update the xml file. 


Additional info:

Comment 3 Eric Blake 2011-03-08 02:22:36 UTC

*** This bug has been marked as a duplicate of bug 598792 ***