]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: domain: Reject copy_on_read for read-only disks
authorPeter Krempa <pkrempa@redhat.com>
Tue, 10 Jul 2018 08:18:53 +0000 (10:18 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Tue, 10 Jul 2018 11:32:53 +0000 (13:32 +0200)
commitd7eeafaa4c15cf17c525b69d9667f1ee55c9181b
treea188eeb1573fde4e2ba92c383416b70ef29cb6c3
parent9ac3ea5cf80de9be37cf39cc57c12e95ed109a0a
qemu: domain: Reject copy_on_read for read-only disks

The sectors read from the backing image need to be written to the top
level image. If a disk is marked read-only the image can't be written.

QEMU handled that by disabling copy_on_read and reporting a warning:

-drive file=/var/lib/libvirt/images/c,format=qcow2,if=none,
    id=drive-scsi0-0-1,readonly=on,copy-on-read=on:
    warning: disabling copy-on-read on read-only drive

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/qemu/qemu_domain.c