Bug 1021000

Summary: virsh: filesystem paths are not taken relative to cwd
Product: [Fedora] Fedora Reporter: Zbigniew Jędrzejewski-Szmek <zbyszek>
Component: libvirtAssignee: Libvirt Maintainers <libvirt-maint>
Status: CLOSED CANTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 21CC: berrange, clalancette, eskultet, itamar, jforbes, laine, libvirt-maint, veillard, virt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-06-01 12:04:40 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 Zbigniew Jędrzejewski-Szmek 2013-10-18 18:04:32 UTC
Description of problem:
When I run virsh from the commandline, I expect paths to refer to local files...
But this only works when I give the full path.

Version-Release number of selected component (if applicable):
libvirt-client-1.1.3-2.fc20.x86_64

How reproducible:
100%

Steps to Reproduce:
virsh change-media fedora20 hda ./Fedora-20-Beta-TC5-i386-netinst.iso → doesn't work
virsh change-media fedora20 hda `pwd`/Fedora-20-Beta-TC5-i386-netinst.iso → works

Comment 1 Fedora End Of Life 2015-05-29 09:35:41 UTC
This message is a reminder that Fedora 20 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 20. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '20'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 20 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 2 Zbigniew Jędrzejewski-Szmek 2015-05-29 15:25:35 UTC
Still present in libvirt-client-1.2.13.1-1.fc21.x86_64.

Comment 3 Erik Skultety 2015-06-01 12:04:40 UTC
The problem resides in CWD of the libvirt daemon, please see the same issue here: https://bugzilla.redhat.com/show_bug.cgi?id=1208763

Since libvirt-1.2.15 the documentation has been modified accordingly in a way that any path is required to be absolute, this however can't be easily fixed in the code, because if someone already has a configured VM with path set as relative (relative to '/'), by adding a check to forbid relative paths would unfortunately cause the VM definition to be lost at daemon restart.