Difference between revisions of "Virsh blockcommit"

From wikieduonline
Jump to navigation Jump to search
Line 1: Line 1:
 
<code>[[virsh]] blockcommit domain path [bandwidth] [--bytes] [base] [--shallow] [top] [--delete] [--keep-relative] [--wait [--async] [--verbose]] [--timeout seconds] [--active] [{--pivot | --keep-overlay}]</code>
 
<code>[[virsh]] blockcommit domain path [bandwidth] [--bytes] [base] [--shallow] [top] [--delete] [--keep-relative] [--wait [--async] [--verbose]] [--timeout seconds] [--active] [{--pivot | --keep-overlay}]</code>
  
Requires at least [[KVM/qemu|QEMU]] 2.1 and [[kVM/libvirt|libvirt]]-1.2.9.<ref>https://wiki.libvirt.org/page/Live-disk-backup-with-active-blockcommit</ref>
+
Requires at least [[qemuQEMU]] 2.1 and [[kVM/libvirt|libvirt]]-1.2.9.<ref>https://wiki.libvirt.org/page/Live-disk-backup-with-active-blockcommit</ref>
  
 
Review your security_driver configuration in <code>/ect/libvirt/qemu.conf</code>. You may need to change it to none to allow <code>virsh blockcommit</code>
 
Review your security_driver configuration in <code>/ect/libvirt/qemu.conf</code>. You may need to change it to none to allow <code>virsh blockcommit</code>

Revision as of 04:17, 7 January 2020

virsh blockcommit domain path [bandwidth] [--bytes] [base] [--shallow] [top] [--delete] [--keep-relative] [--wait [--async] [--verbose]] [--timeout seconds] [--active] [{--pivot | --keep-overlay}]

Requires at least qemuQEMU 2.1 and libvirt-1.2.9.[1]

Review your security_driver configuration in /ect/libvirt/qemu.conf. You may need to change it to none to allow virsh blockcommit

security_driver = "none"[2]

Options:

--active to trigger a two-phase active commit
--pivot making base the new active image and invalidating top
--wait
--verbose

Examples

virsh blockcommit MY_DOMAIN_NAME vda --active --pivot
Successfully pivoted
virsh blockcommit MY_DOMAIN_NAME vda --active --pivot
Commit aborted
virsh blockcommit MY_DOMAIN_NAME vda --active --pivot --wait --verbose
Block commit: [ 22 %]
Successfully pivoted
virsh blockcommit MY_DOMAIN_NAME hda --active --pivot
error: invalid argument: top '/path/to/libvirt/MY_DOMAIN_NAME.qcow2' in chain for 'hda' has no backing file

Use: virsh domblklist --details to find your block name.


Journalctl errors

libvirtd[14189]: 2019-11-21 15:08:13.035+0000: 14192: error : qemuDomainBlockCommit:17568 : invalid argument: top '/path/to/file/VM_NAME.qcow2' in chain for 'hda' has no backing file

Activities

See also

  • https://wiki.libvirt.org/page/Live-disk-backup-with-active-blockcommit
  • https://github.com/milkey-mouse/backup-vm/issues/17#issuecomment-547843000
  • Advertising: