As is already well documented, we find that we need cache='none' to support migration, otherwise there is the chance of a hang and/or failure to pivot. However we prefer the default of cache=writethrough when operating in production. Our practice is to 'shutdown' the VM completely make the change with virsh edit, then restart. Then we have to repeat the process to revert back once we migrate. Is it possible to change that function on the fly and avoid the shutdown/start process? Note: we have had inconsistent results with virsh edit first and then a reboot. A complete shutdown seems to be necessary, but I am hoping there is some other procedure available. Our images are all qcow2 (1.1) Sincerely, W Kern PixelGate Networks
Daniel P. Berrange
2017-Jan-10 09:49 UTC
Re: [libvirt-users] changing to cache='none' on the fly?
On Mon, Jan 09, 2017 at 10:29:01AM -0800, W Kern wrote:> As is already well documented, we find that we need cache='none' to support > migration, otherwise there is the chance of a hang and/or failure to pivot. > > However we prefer the default of cache=writethrough when operating in > production. > > Our practice is to 'shutdown' the VM completely make the change with virsh > edit, then restart. Then we have to repeat the process to revert back once > we migrate. > > Is it possible to change that function on the fly and avoid the > shutdown/start process?Nope, there's no way to change the cache mode on the fly.> Note: we have had inconsistent results with virsh edit first and then a > reboot. A complete shutdown seems to be necessary, but I am hoping there is > some other procedure available."virsh edit" will always just change the offline persistent config. This config will be used next time the guest is *cold* booted. If you just do a reboot inside the guest, this is a warm reboot, and so the QEMU process never stops running. This means we don't pick up the new offline config you wrote. Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://entangle-photo.org -o- http://search.cpan.org/~danberr/ :|