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 769509

Summary: block_stream will stop the guest at the second time
Product: Red Hat Enterprise Linux 6 Reporter: weizhang <weizhan>
Component: qemu-kvmAssignee: Anthony Liguori <aliguori>
Status: CLOSED NOTABUG QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.3CC: acathrow, bsarathy, juzhang, knoel, mkenneth, rhod, shu, tburke, virt-maint
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-01-08 13:32:33 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 weizhang 2011-12-21 05:38:29 UTC
Description of problem:
After blockpull a disk from backing file and then do blockpull again for the same guest and image, the guest will be destroyed.

Version-Release number of selected component (if applicable):
qemu-kvm-0.12.1.2-2.211.el6.x86_64
kernel-2.6.32-223.el6.x86_64
libvirt-0.9.8-1.el6.x86_64

How reproducible:
100%

Steps to Reproduce:
1. Prepare a qed image with installing guest on it
2. Create new qed image with backing file pointing on above disk
# qemu-img create -f qed -o backing_file=/var/lib/libvirt/images/guest.qed,backing_fmt=qed /var/lib/libvirt/images/new.qed
# qemu-img info /var/lib/libvirt/images/new.qed
image: /var/lib/libvirt/images/new.qed
file format: qed
virtual size: 3.0G (3221225472 bytes)
disk size: 260K
cluster_size: 65536
backing file: /var/lib/libvirt/images/guest.qed (actual path: /var/lib/libvirt/images/guest.qed)

3. Start a guest with new qed image
# virsh dumpxml guest
...
    <disk type='file' device='disk'>
      <driver name='qemu' type='qed' cache='none'/>
      <source file='/var/lib/libvirt/images/new.qed'/>
      <target dev='hda' bus='ide'/>
      <address type='drive' controller='0' bus='0' unit='0'/>
    </disk>
...
# virsh start guest

4. Do blockpull for this new qed image and guest
# virsh blockpull guest /var/lib/libvirt/images/new.qed

5. Wait for the blockpull finished
# virsh blockjob guest /var/lib/libvirt/images/new.qed --info
until nothing return

6. After it finished, do blockpull to the same image and guest again
# virsh blockpull guest /var/lib/libvirt/images/new.qed

Wait for several seconds, then check the guest status
# virsh list

  
Actual results:
The guest is destroyed.

Expected results:
The guest still running.

Additional info:
I test with libvirt virsh command in above steps, and I also test with qemu human monitor command block_stream and find that the problem still exist, so I report the bug in qemu-kvm

Comment 2 Dor Laor 2012-01-08 13:32:33 UTC
(In reply to comment #0)
> 5. Wait for the blockpull finished
> # virsh blockjob guest /var/lib/libvirt/images/new.qed --info
> until nothing return
> 
> 6. After it finished, do blockpull to the same image and guest again
> # virsh blockpull guest /var/lib/libvirt/images/new.qed

Aren't you destroying the first disk you created?

> 
> Wait for several seconds, then check the guest status
> # virsh list
> 
> 
> Actual results:
> The guest is destroyed.

Comment 3 weizhang 2012-01-09 02:31:20 UTC
(In reply to comment #2)
> (In reply to comment #0)
> > 5. Wait for the blockpull finished
> > # virsh blockjob guest /var/lib/libvirt/images/new.qed --info
> > until nothing return
> > 
> > 6. After it finished, do qemu-img create -f qed -o
backing_file=/var/lib/libvirt/images/guest.qed,backing_fmt=qed
/var/lib/libvirt/images/new.qed
 to the same image and guest again
> > # virsh blockpull guest /var/lib/libvirt/images/new.qed
> 
> Aren't you destroying the first disk you created?
> 

Even if I remove the first disk guest.qed, the second time executing blockpull will still cause guest destroied.

> > 
> > Wait for several seconds, then check the guest status
> > # virsh list
> > 
> > 
> > Actual results:
> > The guest is destroyed.

Comment 4 weizhang 2012-01-09 02:51:36 UTC
(In reply to comment #3)
> (In reply to comment #2)
> > (In reply to comment #0)
> > > 5. Wait for the blockpull finished
> > > # virsh blockjob guest /var/lib/libvirt/images/new.qed --info
> > > until nothing return
> > > 
> > > 6. After it finished, do qemu-img create -f qed -o
> backing_file=/var/lib/libvirt/images/guest.qed,backing_fmt=qed
> /var/lib/libvirt/images/new.qed
>  to the same image and guest again

Please ignore above comments. Sorry

> > > # virsh blockpull guest /var/lib/libvirt/images/new.qed
> > 
> > Aren't you destroying the first disk you created?
> >

Comment 5 Red Hat Bugzilla 2023-09-14 01:26:48 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days