Red Hat Bugzilla – Bug 1021000
virsh: filesystem paths are not taken relative to cwd
Last modified: 2016-04-26 17:16:25 EDT
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):
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
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'
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.
Still present in libvirt-client-220.127.116.11-1.fc21.x86_64.
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.