Block Commit: [100 %]error: failed to pivot job for disk vda

Bug #1455475 reported by Tim Rohde
This bug report is a duplicate of:  Bug #1317491: virsh blockcommit hangs at 100%. Edit Remove
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
QEMU
New
Undecided
Unassigned
Ubuntu
Confirmed
Undecided
Unassigned

Bug Description

Hi,

i´ve a Problem with committing a snapshot. The problem was discussed on the libvirt mailing list earlier this year.

https://www.redhat.com/archives/libvirt-users/2015-January/msg00029.html

Iam running gentoo and:

Compiled against library: libvirt 1.2.14
Using library: libvirt 1.2.14
Using API: QEMU 1.2.14
Running hypervisor: QEMU 2.3.0

I´am running a Windows Server 2012 R2 VM with the latest quest driver (0.1.96) and QEMU quest Agent 0.12.1 installed.

The domain is started with following command line:

/usr/bin/qemu-system-x86_64 -name $DOMAIN -S -machine pc-i440fx-1.6,accel=kvm,usb=off -m 8192 -realtime mlock=off -smp 8,sockets=8,cores=1,threads=1 -uuid c96ef576-dbfc-49aa-9dd0-068886c4ef0e -no-user-config -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/$DOMAIN.monitor,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=localtime -no-shutdown -boot strict=on -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x6 -drive file=/var/lib/libvirt/images/$DOMAIN.qcow2,if=none,id=drive-virtio-disk0,format=qcow2 -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x2,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 -netdev tap,fd=25,id=hostnet0,vhost=on,vhostfd=26 -device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:07:b4:0a,bus=pci.0,addr=0x3 -chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0 -chardev socket,id=charchannel0,path=/var/lib/libvirt/qemu/f16x86_64.agent,server,nowait -device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=org.qemu.guest_agent.0 -device usb-tablet,id=input0 -vnc 127.0.0.1:6 -k de -device VGA,id=video0,vgamem_mb=16,bus=pci.0,addr=0x5 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x4 -msg timestamp=on
char device redirected to /dev/pts/2 (label charserial0)

I´ve created the snapshot with:

virsh # snapshot-create-as --domain $DOMAIN snap1 --diskspec vda,file=/var/lib/libvirt/images/snap1.qcow2 --quiesce --disk-only --atomic --no-metadata
Domain snapshot snap1 created

If i try to commit the snapshot i get this error:

virsh # blockcommit $DOMAIN vda --active --verbose --pivot
error: internal error: unable to execute QEMU command 'block-commit': Device 'drive-virtio-disk0' is busy: block device is in use by block job: commit

virsh # blockjob $DOMAIN /var/lib/libvirt/images/snap1.qcow2
Block Commit: [100 %]

virsh # $DOMAIN var/lib/libvirt/images/snap1.qcow2 --abort

virsh # blockjob $DOMAIN /var/lib/libvirt/images/snap1.qcow2
No current block job for /var/lib/libvirt/images/snap1.qcow2

I´ve test this with qemu 2.1 and the problem does`nt exist.

/usr/bin/qemu-system-x86_64 -name $DOMAIN -S -machine pc-i440fx-1.6,accel=kvm,usb=off -m 8192 -realtime mlock=off -smp 8,sockets=8,cores=1,threads=1 -uuid 30c49f37-6e62-49f6-a9df-ad2fef1fa312 -no-user-config -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/$DOMAIN.monitor,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=localtime -no-shutdown -boot strict=on -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x6 -drive file=/var/lib/libvirt/images/$DOMAIN.qcow2,if=none,id=drive-virtio-disk0,format=qcow2 -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x2,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 -chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0 -chardev socket,id=charchannel0,path=/var/lib/libvirt/qemu/f16x86_64.agent,server,nowait -device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=org.qemu.guest_agent.0 -device usb-tablet,id=input0 -vnc 127.0.0.1:0 -k de -device VGA,id=video0,vgamem_mb=16,bus=pci.0,addr=0x5 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x4 -msg timestamp=on

Compiled against library: libvirt 1.2.11
Using library: libvirt 1.2.11
Using API: QEMU 1.2.11
Running hypervisor: QEMU 2.1.2

virsh # snapshot-create-as --domain windows.trohde-snapshot-test windows.trohde-snapshot-test_snap1 --diskspec vda,file=/var/lib/libvirt/images/windows.trohde-snapshot-test_snap1.qcow2 --quiesce --disk-only --atomic --no-metadata
Domain snapshot windows.trohde-snapshot-test_snap1 created

virsh # blockcommit $DOMAIN vda --active --verbose --pivot
Block Commit: [100 %]
Successfully pivoted

Cheers

Tim

Revision history for this message
Tim Rohde (t-rohde) wrote :

There are 2 Bug reports in the redhat bugzilla already.

https://bugzilla.redhat.com/show_bug.cgi?id=1210903

https://bugzilla.redhat.com/show_bug.cgi?id=1197592

i would say, we can close this bug here to avoid double work.

Cheers Tim

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in ubuntu:
status: New → Confirmed
Revision history for this message
Rafael David Tinoco (rafaeldtinoco) wrote :

Upstream "fixed" the issue - by finishing "block-commit" - in v1.3. That is why I'm marking this bug as a duplicate of the Ubuntu bug. I'll provide more comments in that bug.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.