Hide Forgot
Description of problem: If we try to save the VM with --bypass-cache on /tmp directory Invalid argument instead of saving the VM is not supported on the /tmp which does not support O_DIRECT. virsh save --domain vm2 --file "/tmp/vm2_save" --verbose --bypass-cache --running error: Failed to save domain vm2 to /tmp/vm2_save error: Failed to create file '/tmp/vm2_save': Invalid argument Instead of throwing error as "Invalid argument" it should give the information to the user as " Saving a domain is /tmp directory is not supported".
It's not about /tmp specifically, it's about tmpfs not supported O_DIRECT, which is a known problem. This is the error we get from strerror here. Given the relative obscurity of this issue WRT saving I don't think this is too interesting to try and guess in libvirt code