Bug 769509 - block_stream will stop the guest at the second time [NEEDINFO]
Summary: block_stream will stop the guest at the second time
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm
Version: 6.3
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Anthony Liguori
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-12-21 05:38 UTC by weizhang
Modified: 2014-07-25 03:07 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-01-08 13:32:33 UTC
Target Upstream Version:
weizhan: needinfo? (dlaor)


Attachments (Terms of Use)

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


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