Difference between revisions of "Virsh blockcommit"
Jump to navigation
Jump to search
↑ https://wiki.libvirt.org/page/Live-disk-backup-with-active-blockcommit
↑ https://github.com/milkey-mouse/backup-vm/issues/17#issuecomment-547843000
Line 24: | Line 24: | ||
virsh blockcommit MY_DOMAIN_NAME vda --active --pivot | virsh blockcommit MY_DOMAIN_NAME vda --active --pivot | ||
+ | Successfully pivoted | ||
+ | |||
+ | virsh blockcommit MY_DOMAIN_NAME /path/to/libvirt/MY_DOMAIN_NAME_DISK --active --pivot | ||
Successfully pivoted | Successfully pivoted | ||
Line 44: | Line 47: | ||
error: invalid argument: top '/path/to/libvirt/MY_DOMAIN_NAME.qcow2' in chain for 'hda' has no backing file | error: invalid argument: top '/path/to/libvirt/MY_DOMAIN_NAME.qcow2' in chain for 'hda' has no backing file | ||
− | virsh blockcommit stable-vm-1 | + | virsh blockcommit stable-vm-1 /path/to/libvirt/MY_DOMAIN_NAME_DISK --active --pivot |
error: block copy still active: disk 'vda' already in active block job | error: block copy still active: disk 'vda' already in active block job | ||
Revision as of 16:14, 29 September 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 QEMU 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 domblklist MY_DOMAIN_NAME virsh snapshot-list MY_DOMAIN_NAME
virsh blockcommit MY_DOMAIN_NAME error: command 'blockcommit' requires <path> option
virsh blockcommit MY_DOMAIN_NAME [hdc|vda|xxx] --active Active Block Commit started
virsh blockcommit MY_DOMAIN_NAME vda --active --pivot Successfully pivoted
virsh blockcommit MY_DOMAIN_NAME /path/to/libvirt/MY_DOMAIN_NAME_DISK --active --pivot Successfully pivoted
virsh blockcommit MY_DOMAIN_NAME hdc --active --pivot error: block copy still active: disk 'hdc' already in active block job Execute: virsh blockjob MY_DOMAIN_NAME hdc --abort (no output) virsh blockjob MY_DOMAIN_NAME vda --info No current block job for vda
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
virsh blockcommit stable-vm-1 /path/to/libvirt/MY_DOMAIN_NAME_DISK --active --pivot error: block copy still active: disk 'vda' already in active block job
Use: virsh domblklist --details
to find your block name.
Journalctl errors
Feb 04 16:29:52 SERVER 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
Feb 04 16:29:52 SERVER libvirtd[14974]: 2020-02-04 12:29:52.421+0000: 14977: error : qemuDomainBlockCommit:17555 : invalid argument: commit of 'hdc' active layer requires active flag
Activities
- Create a KVM Live backup using
virsh snapshot-create-as
andvirsh blockcommit
- Read https://www.redhat.com/archives/libvirt-users/2015-September/msg00042.html from Eric Blake (Red Hat)
Related terms
virsh blockpull
virsh snapshot-create-as
and--quiesce
option invirsh snapshot-create-as
virsh domblklist
See also
virsh blockcopy
,virsh blockjob
,virsh blockcommit
,virsh domblklist
,virsh blockresize
,virsh blockpull
virsh console
virsh
: Storage information, Connecting, Operations, Memory, Snapshots, Networking, CPU, release notes,virsh nodedev-list
- libvirtd:
systemctl status libvirtd
,systemctl status libvirt-guests
, Libvirt release notes, logs,libvirtd.conf
,/etc/libvirt/
,/var/log/libvirt/
Advertising: