Hello,
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'>
<name>my-vm</name>
<uuid>8acea561-ade3-40de-bb3b-b008a59096ca</uuid>
<memory unit='KiB'>4194304</memory>
<currentMemory unit='KiB'>4194304</currentMemory>
<vcpu placement='static'>2</vcpu>
<resource>
<partition>/machine</partition>
</resource>
<os>
<type arch='x86_64'
machine='pc-i440fx-utopic'>hvm</type>
<boot dev='hd'/>
</os>
<features>
<acpi/>
<apic/>
<pae/>
</features>
<cpu mode='custom' match='exact'>
<model fallback='allow'>SandyBridge</model>
</cpu>
<clock offset='utc'>
<timer name='rtc' tickpolicy='catchup'/>
<timer name='pit' tickpolicy='delay'/>
<timer name='hpet' present='no'/>
</clock>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>restart</on_crash>
<devices>
<emulator>/usr/bin/kvm-spice</emulator>
<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'/>
<backingStore/>
</backingStore>
<target dev='vda' bus='virtio'/>
<alias name='virtio-disk0'/>
<address type='pci' domain='0x0000' bus='0x00'
slot='0x04' function='0x0'/>
</disk>
<controller type='usb' index='0' model='ich9-ehci1'>
<alias name='usb0'/>
<address type='pci' domain='0x0000' bus='0x00'
slot='0x05' function='0x7'/>
</controller>
<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>
<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>
<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>
<controller type='pci' index='0' model='pci-root'>
<alias name='pci.0'/>
</controller>
<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'/>
</interface>
<serial type='pty'>
<source path='/dev/pts/8'/>
<target port='0'/>
<alias name='serial0'/>
</serial>
<console type='pty' tty='/dev/pts/8'>
<source path='/dev/pts/8'/>
<target type='serial' port='0'/>
<alias name='serial0'/>
</console>
<input type='mouse' bus='ps2'/>
<input type='keyboard' bus='ps2'/>
<graphics type='vnc' port='5901' autoport='no'
listen='0.0.0.0' keymap='tr'>
<listen type='address' address='0.0.0.0'/>
</graphics>
<video>
<model type='vmvga' vram='16384' heads='1'/>
<alias name='video0'/>
<address type='pci' domain='0x0000' bus='0x00'
slot='0x02' function='0x0'/>
</video>
<memballoon model='virtio'>
<alias name='balloon0'/>
<address type='pci' domain='0x0000' bus='0x00'
slot='0x06' function='0x0'/>
</memballoon>
<rng model='virtio'>
<backend model='egd' type='tcp'>
<source mode='connect' host='localhost'
service='8000'/>
<protocol type='raw'/>
</backend>
<alias name='rng0'/>
<address type='pci' domain='0x0000' bus='0x00'
slot='0x07' function='0x0'/>
</rng>
</devices>
</domain>
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?
Yes.
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(a)redhat.com
*Onderwerp:* [libvirt-users] block-commit fails
Hello,
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
--
CODVIO <
http://codv.io>
Fırat KÜÇÜK / CEO, Founder
firat(a)codv.io <mailto:firat@codv.io> / +90 555 422 77 55
CODVIO
+90 216 330 55 11
OSMAN AĞA MAH. SÖĞÜTLÜ ÇEŞME CAD. NO: 64/96 KADIKÖY / İSTANBUL
codv.io <
http://codv.io>