On 14-12-2015 10:03, Dominique Ramaekers wrote:

Please provide more information like


Virsh version

Compiled against library: libvirt 1.2.12
Using library: libvirt 1.2.12
Using API: QEMU 1.2.12
Running hypervisor: QEMU 2.2.0


Virsh dumpxml my-vm

<domain type='kvm' id='351'>
  <memory unit='KiB'>4194304</memory>
  <currentMemory unit='KiB'>4194304</currentMemory>
  <vcpu placement='static'>2</vcpu>
    <type arch='x86_64' machine='pc-i440fx-utopic'>hvm</type>
    <boot dev='hd'/>
  <cpu mode='custom' match='exact'>
    <model fallback='allow'>SandyBridge</model>
  <clock offset='utc'>
    <timer name='rtc' tickpolicy='catchup'/>
    <timer name='pit' tickpolicy='delay'/>
    <timer name='hpet' present='no'/>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2'/>
      <source file='/foo/my-vm.img'/>
      <source file='/foo/my-vm-snapshot.img'/>
      <backingStore type='file' index='1'>
        <format type='qcow2'/>
        <source file='/foo/my-vm.img'/>
      <target dev='vda' bus='virtio'/>
      <alias name='virtio-disk0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
    <controller type='usb' index='0' model='ich9-ehci1'>
      <alias name='usb0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x7'/>
    <controller type='usb' index='0' model='ich9-uhci1'>
      <alias name='usb0'/>
      <master startport='0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0' multifunction='on'/>
    <controller type='usb' index='0' model='ich9-uhci2'>
      <alias name='usb0'/>
      <master startport='2'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x1'/>
    <controller type='usb' index='0' model='ich9-uhci3'>
      <alias name='usb0'/>
      <master startport='4'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x2'/>
    <controller type='pci' index='0' model='pci-root'>
      <alias name='pci.0'/>
    <interface type='bridge'>
      <mac address='ba:ba:00:00:00:09'/>
      <source network='br-vms' bridge='br-vms'/>
      <target dev='vnet4'/>
      <model type='virtio'/>
      <alias name='net0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    <serial type='pty'>
      <source path='/dev/pts/8'/>
      <target port='0'/>
      <alias name='serial0'/>
    <console type='pty' tty='/dev/pts/8'>
      <source path='/dev/pts/8'/>
      <target type='serial' port='0'/>
      <alias name='serial0'/>
    <input type='mouse' bus='ps2'/>
    <input type='keyboard' bus='ps2'/>
    <graphics type='vnc' port='5901' autoport='no' listen='' keymap='tr'>
      <listen type='address' address=''/>
      <model type='vmvga' vram='16384' heads='1'/>
      <alias name='video0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    <memballoon model='virtio'>
      <alias name='balloon0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
    <rng model='virtio'>
      <backend model='egd' type='tcp'>
        <source mode='connect' host='localhost' service='8000'/>
        <protocol type='raw'/>
      <alias name='rng0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>


qemu-info /foo/my-vm-snapshot.img

I used qemu-img info command

image: my-vm-snapshot.img
file format: qcow2
virtual size: 80G (85899345920 bytes)
disk size: 927M
cluster_size: 65536
backing file: /opt/datastore/bulutkare-914.img
backing file format: qcow2
Format specific information:
    compat: 1.1
    lazy refcounts: false
    corrupt: false



According to http://wiki.libvirt.org/page/Live-disk-backup-with-active-blockcommit your active block commit command should look like:

virsh blockcommit vm1 vda --active --verbose –pivot


thus one command…

Yes, I tried the single commit & pivot command.
But according to my experiences 2 commands pivot over is more stable than one command.
I don't know why but I tried lots of time.


Does your error comes after your third command?


virsh blockjob my-vm vda --pivot




Van: libvirt-users-bounces@redhat.com [mailto:libvirt-users-bounces@redhat.com] Namens Firat KÜÇÜK
Verzonden: zondag 13 december 2015 20:00
Aan: libvirt-users@redhat.com
Onderwerp: [libvirt-users] block-commit fails



one of my VM's blockcommit job always fails. How can I find the reason? Error message is not clear.

virsh snapshot-create-as --domain my-vm backup-snapshot \
    --diskspec vda,file=/foo/my-vm-snapshot.img \
    --disk-only --atomic --no-metadata
virsh blockcommit my-vm vda --active --verbose --wait --async
virsh blockjob my-vm vda --pivot

internal error: unable to execute QEMU command 'block-job-complete': The active block job for device 'drive-virtio-disk0' cannot be completed


Fırat KÜÇÜK / CEO, Founder / +90 555 422 77 55

+90 216 330 55 11