On Tue, 25 May 2021 20:22:26 +0000 Eric DeVolder <eric.devol...@oracle.com> wrote:
> Igor, > Thank you for the pointers, I've turned the corner on the use of hostmem-file > and am able to use it now! > I do have one question regarding hostmem-file. In the VMStateDescription, I > used to have this for the contents > of the nvram (backed by a file): > > VMSTATE_VARRAY_UINT32(nvram, ERSTDeviceState, prop_size, 0, > vmstate_info_uint8, uint8_t), > > I've searched and I do not locate an example of passing a HostMemoryBackend > object; how do I do that? if I'm not wrong, you do not need to do it, i.e. treat backing file as any other storage, i.e. put it on shared storage were VM's hard disks are located so source and target host can access it. alternatively you can mark MemoryRegion as migratable, which will make QEMU stream its content over migration socket automatically. In that case file associated with backend doesn't need to be shared between source and target hosts. I think this option is fine if file in question is small, but others might think otherwise. (obvious drawback is that it increases migration time) CCed David as he might have an opinion about it from migration point of view. > Thanks, > eric > > [...]