On 05/08/2017 11:39 AM, Eric Blake wrote: > On 05/08/2017 11:33 AM, Carl Karsten wrote: >> according to the warning: "Specify the 'raw' format explicitly to remove >> the restrictions." >> >> I want the restriction. >> >> format=raw, (write operations on block 0)=restricted > > Then omit format=raw. (It's an unusual request, though). Or, as others > mentioned in this thread, you can use -snapshot or any other form of > overlay image to keep the original image read-only while still providing > a read-write image that the guest requires for faithful hardware > emulation; and you can always check your overlay after the fact to learn > whether sector 0 was changed.
The only other solution I can think of is using the blkdebug wrapper with a config-file that causes EIO errors on any time to write anywhere in the range [0,511]; however, setting up blkdebug is not very-well documented (best may be to inspect existing files in tests/qemu-iotests/??? for usage of blkdebug). -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature
