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 851963 - Guest will be undefined if remove channel content
Summary: Guest will be undefined if remove channel content
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.4
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Michal Privoznik
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-08-27 07:07 UTC by yuping zhang
Modified: 2013-02-21 07:22 UTC (History)
8 users (show)

Fixed In Version: libvirt-0.10.0-1.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-02-21 07:22:09 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2013:0276 0 normal SHIPPED_LIVE Moderate: libvirt security, bug fix, and enhancement update 2013-02-20 21:18:26 UTC

Description yuping zhang 2012-08-27 07:07:51 UTC
Description of problem: 
Use virsh to edit the guest,remove <target type='virtio' name='com.redhat.spice.0'/>,then save. 
The guest will be undefined. 

Version-Release number of selected component (if applicable): 
libvirt-0.10.0-0rc1.el6.x86_64 

How reproducible: 
always 

Steps to Reproduce: 
1.Define a guest,add spicevmc channel. 
#virsh dumpxml kvm-win7-i386 
... 
<channel type='spicevmc'> 
<target type='virtio' name='com.redhat.spice.0'/> 
<address type='virtio-serial' controller='0' bus='0' port='1'/> 
</channel> 
... 
2.Edit the guest,remove <target type='virtio' name='com.redhat.spice.0'/> in channel.Then save. 
# virsh edit kvm-win7-i386 
error: internal error Could not format channel target type 
Failed. Try again? [y,n,f,?]: 

3.Type y,and exit. 
# virsh edit kvm-win7-i386 
error: internal error Could not format channel target type 
Failed. Try again? [y,n,f,?]: 
error: Domain not found: no domain with matching uuid '46694cce-66a1-5264-16c0-da8d0980160a' 

# virsh start kvm-win7-i386 
error: failed to get domain 'kvm-win7-i386' 
error: Domain not found: no domain with matching name 'kvm-win7-i386' 

Actual results: 
In steps 2,the guest was undefined. 

Expected results: 
The guest should not be undefined. 

Additional info: 
Libvirtd log: 
2012-08-28 07:33:35.442+0000: 20908: error : virDomainChrDefaultTargetType:5085 : XML error: target type must be specified for channel device 
2012-08-28 07:33:35.813+0000: 20908: error : virDomainChrDefFormat:12190 : internal error Could not format channel target type

Comment 1 Michal Privoznik 2012-08-27 16:12:27 UTC
Patch proposed upstream:

https://www.redhat.com/archives/libvir-list/2012-August/msg01745.html

Comment 2 Michal Privoznik 2012-08-27 17:03:02 UTC
Moving to POST:

commit 9eee40cc540e25bb0783ef393b7bf7a74444b55c
Author:     Michal Privoznik <mprivozn>
AuthorDate: Mon Aug 27 17:40:33 2012 +0200
Commit:     Michal Privoznik <mprivozn>
CommitDate: Mon Aug 27 19:01:09 2012 +0200

    qemu: Fix define logic
    
    With current flow in qemudDomainDefine we might lose data
    when updating an existing domain. We parse given XML and
    overwrite the configuration.  Then we try to save the new
    config. However, this step may fail and we don't perform any
    roll back.  In fact, we remove the domain from the list of
    domains held up by qemu driver. This is okay as long as the
    domain was brand new one.

v0.10.0-rc1-38-g9eee40c

Comment 4 yanbing du 2012-08-30 09:43:37 UTC
Verify this bug with libvirt-0.10.0-1.el6.x86_64.
When edit the domain XML and remove <target type='virtio' name='com.redhat.spice.0'/>, it always can't save and there's two error log in libvirtd.log.
2012-08-30 09:41:16.726+0000: 10977: error : virDomainChrDefaultTargetType:5071 : XML error: target type must be specified for channel device
2012-08-30 09:41:16.993+0000: 10977: error : virDomainChrDefFormat:12183 : internal error Could not format channel target type
So move this bug to VERIFIED.

Comment 5 errata-xmlrpc 2013-02-21 07:22:09 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.

http://rhn.redhat.com/errata/RHSA-2013-0276.html


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