Bug 1019639

Summary: Save VM with --bypass-cache on /tmp should report as "VM can't be saved on /tmp as it doesn't support O_DIRECT" instead of throwing error as Invalid argument"
Product: [Community] Virtualization Tools Reporter: chandrashekar shastri <cshastri>
Component: libvirtAssignee: Libvirt Maintainers <libvirt-maint>
Status: CLOSED DEFERRED QA Contact:
Severity: low Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: crobinso, rbalakri
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-05-02 15:00:46 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description chandrashekar shastri 2013-10-16 07:52:23 UTC
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".

Comment 1 Cole Robinson 2016-05-02 15:00:46 UTC
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