On Thu, Jul 21, 2016 at 06:41:23PM +0100, Dr. David Alan Gilbert wrote: > * Daniel P. Berrange ([email protected]) wrote: > > On Thu, Jul 21, 2016 at 01:05:58PM +0800, zhanghailiang wrote: > > > It is more simple to use file:url to migrate VM into file. > > > Besides, it will be used in memory snapshot. > > > > NB, you can already migrate into a file > > > > "exec:/bin/cat > /path/to/file" > > > > and likewise > > > > qemu -incoming "exec:/bin/cat /path/to/file" > > > > This avoids the problem with POSIX I/O on plain files not actually > > supporting O_NONBLOCK in any sensible manner, which your file: > > suggestion suffers from. > > Hmm that's a shame; I liked this idea as a nice simplification of the > exec: stuff.
The only way to achieve that would be to spawn a thread in QEMU that does I/O to the actual file, and then have the migration code do I/O to/from that thread via a pipe. IOW, the thread would take the role of cat. What that's worth doing or not I don't know, given that it is already possible to use exec+cat. Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
