Bug 677226 - virsh update-device can't update an xml file as to an inactive domain
Summary: virsh update-device can't update an xml file as to an inactive domain
Keywords:
Status: CLOSED DUPLICATE of bug 598792
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Daniel Veillard
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-02-14 06:46 UTC by Takuma Umeya
Modified: 2011-03-08 03:01 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-03-08 02:22:36 UTC
Target Upstream Version:


Attachments (Terms of Use)

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 ***


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