Bug 1091384 - virt-manager can't find file in a path that contains spaces
Summary: virt-manager can't find file in a path that contains spaces
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: virt-manager
Version: 20
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Cole Robinson
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-04-25 13:16 UTC by javiertury
Modified: 2014-05-02 20:57 UTC (History)
4 users (show)

Fixed In Version: virt-manager-1.0.1-3.fc20
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-05-01 11:06:18 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description javiertury 2014-04-25 13:16:36 UTC
Description of problem: virt-manager can't find an iso image if it has spaces in its name or is locate in a path where any of the folders has spaces in its name.

Version-Release number of selected component (if applicable): virt-manager-1.0.1-2.fc20 and virt-manager-1.0.1-1.fc20


How reproducible:


Steps to Reproduce:
1. Open virt-manager and create a new virtual machine
2. Select "Local install media (ISO image or CDROM)", click forward, select "Use ISO image:" and click browse
3. Select a ISO image which has spaces in its name or is located in a path that has spaces

Actual results:

Input error

Error setting install media location.

Checking installer location failed: Could not find media '/home/user/path to file/os file.iso'.


Expected results:

To continue without the error


Additional info:

none

Comment 1 Cole Robinson 2014-04-25 20:34:39 UTC
I can't reproduce. Can reproduce with virt-manager --debug and attach the output? Also, ls -l of the file in question.

Comment 2 javiertury 2014-04-25 21:43:05 UTC
$ virt-manager --debug
[Fri, 25 Apr 2014 23:34:38 virt-manager 6492] DEBUG (cli:187) Launched with command line: /usr/share/virt-manager/virt-manager --debug
[Fri, 25 Apr 2014 23:34:38 virt-manager 6492] DEBUG (virt-manager:150) virt-manager version: 1.0.1
[Fri, 25 Apr 2014 23:34:38 virt-manager 6492] DEBUG (virt-manager:151) virtManager import: <module 'virtManager' from '/usr/share/virt-manager/virtManager/__init__.pyc'>
[Fri, 25 Apr 2014 23:34:38 virt-manager 6492] DEBUG (virt-manager:209) GTK version: 3.10.8
[Fri, 25 Apr 2014 23:34:38 virt-manager 6492] ERROR (importer:51) Could not find any typelib for AppIndicator3
[Fri, 25 Apr 2014 23:34:38 virt-manager 6492] DEBUG (engine:457) libguestfs inspection support: False
[Fri, 25 Apr 2014 23:34:38 virt-manager 6492] DEBUG (systray:152) Showing systray: False
[Fri, 25 Apr 2014 23:34:38 virt-manager 6492] DEBUG (engine:231) About to connect to uris ['xen:///', 'qemu:///system']
[Fri, 25 Apr 2014 23:34:38 virt-manager 6492] DEBUG (manager:216) Showing manager
[Fri, 25 Apr 2014 23:34:38 virt-manager 6492] DEBUG (engine:358) window counter incremented to 1
[Fri, 25 Apr 2014 23:34:38 virt-manager 6492] DEBUG (connection:1031) Scheduling background open thread for xen:///
[Fri, 25 Apr 2014 23:34:38 virt-manager 6492] DEBUG (connection:1048) Background 'open connection' thread is running
[Fri, 25 Apr 2014 23:34:41 virt-manager 6492] DEBUG (connection:1099) Background open thread complete, scheduling notify
[Fri, 25 Apr 2014 23:34:41 virt-manager 6492] DEBUG (connection:1104) Notifying open result
[Fri, 25 Apr 2014 23:34:41 virt-manager 6492] DEBUG (error:82) error dialog message:
summary=Unable to connect to libvirt.

internal error: libxenlight state driver is not active

Verify that:
 - A Xen host kernel was booted
 - The Xen service has been started
details=Unable to connect to libvirt.

internal error: libxenlight state driver is not active

Verify that:
 - A Xen host kernel was booted
 - The Xen service has been started

Libvirt URI is: xen:///

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/connection.py", line 1056, in _open_thread
    self._backend.open(self._do_creds_password)
  File "/usr/share/virt-manager/virtinst/connection.py", line 158, in open
    open_flags)
  File "/usr/lib64/python2.7/site-packages/libvirt.py", line 102, in openAuth
    if ret is None:raise libvirtError('virConnectOpenAuth() failed')
libvirtError: internal error: libxenlight state driver is not active
[Fri, 25 Apr 2014 23:34:45 virt-manager 6492] DEBUG (connection:1031) Scheduling background open thread for qemu:///system
[Fri, 25 Apr 2014 23:34:45 virt-manager 6492] DEBUG (connection:1048) Background 'open connection' thread is running
[Fri, 25 Apr 2014 23:34:45 virt-manager 6492] DEBUG (connection:1099) Background open thread complete, scheduling notify
[Fri, 25 Apr 2014 23:34:45 virt-manager 6492] DEBUG (connection:1104) Notifying open result
[Fri, 25 Apr 2014 23:34:45 virt-manager 6492] DEBUG (connection:1110) libvirt version=1001003
[Fri, 25 Apr 2014 23:34:45 virt-manager 6492] DEBUG (connection:1112) daemon version=1001003
[Fri, 25 Apr 2014 23:34:45 virt-manager 6492] DEBUG (connection:1113) conn version=1006002
[Fri, 25 Apr 2014 23:34:45 virt-manager 6492] DEBUG (connection:1115) qemu:///system capabilities:
<capabilities>

  <host>
    <uuid>37a9aca0-5205-11e1-bdf4-dc0ea196bb80</uuid>
    <cpu>
      <arch>x86_64</arch>
      <model>SandyBridge</model>
      <vendor>Intel</vendor>
      <topology sockets='1' cores='2' threads='2'/>
      <feature name='osxsave'/>
      <feature name='pcid'/>
      <feature name='pdcm'/>
      <feature name='xtpr'/>
      <feature name='tm2'/>
      <feature name='est'/>
      <feature name='vmx'/>
      <feature name='ds_cpl'/>
      <feature name='monitor'/>
      <feature name='dtes64'/>
      <feature name='pbe'/>
      <feature name='tm'/>
      <feature name='ht'/>
      <feature name='ss'/>
      <feature name='acpi'/>
      <feature name='ds'/>
      <feature name='vme'/>
    </cpu>
    <power_management>
      <suspend_mem/>
      <suspend_disk/>
      <suspend_hybrid/>
    </power_management>
    <migration_features>
      <live/>
      <uri_transports>
        <uri_transport>tcp</uri_transport>
      </uri_transports>
    </migration_features>
    <topology>
      <cells num='1'>
        <cell id='0'>
          <memory unit='KiB'>8027416</memory>
          <cpus num='4'>
            <cpu id='0' socket_id='0' core_id='0' siblings='0-1'/>
            <cpu id='1' socket_id='0' core_id='0' siblings='0-1'/>
            <cpu id='2' socket_id='0' core_id='1' siblings='2-3'/>
            <cpu id='3' socket_id='0' core_id='1' siblings='2-3'/>
          </cpus>
        </cell>
      </cells>
    </topology>
    <secmodel>
      <model>selinux</model>
      <doi>0</doi>
    </secmodel>
    <secmodel>
      <model>dac</model>
      <doi>0</doi>
    </secmodel>
  </host>

  <guest>
    <os_type>hvm</os_type>
    <arch name='i686'>
      <wordsize>32</wordsize>
      <emulator>/usr/bin/qemu-system-i386</emulator>
      <machine canonical='pc-i440fx-1.6' maxCpus='255'>pc</machine>
      <machine maxCpus='255'>pc-q35-1.4</machine>
      <machine maxCpus='255'>pc-q35-1.5</machine>
      <machine canonical='pc-q35-1.6' maxCpus='255'>q35</machine>
      <machine maxCpus='1'>isapc</machine>
      <machine maxCpus='255'>pc-0.10</machine>
      <machine maxCpus='255'>pc-0.11</machine>
      <machine maxCpus='255'>pc-0.12</machine>
      <machine maxCpus='255'>pc-0.13</machine>
      <machine maxCpus='255'>pc-0.14</machine>
      <machine maxCpus='255'>pc-0.15</machine>
      <machine maxCpus='255'>pc-1.0</machine>
      <machine maxCpus='255'>pc-1.1</machine>
      <machine maxCpus='255'>pc-1.2</machine>
      <machine maxCpus='255'>pc-1.3</machine>
      <machine maxCpus='255'>pc-i440fx-1.4</machine>
      <machine maxCpus='255'>pc-i440fx-1.5</machine>
      <machine maxCpus='1'>none</machine>
      <domain type='qemu'>
      </domain>
      <domain type='kvm'>
        <emulator>/usr/bin/qemu-kvm</emulator>
        <machine canonical='pc-i440fx-1.6' maxCpus='255'>pc</machine>
        <machine maxCpus='255'>pc-q35-1.4</machine>
        <machine maxCpus='255'>pc-q35-1.5</machine>
        <machine canonical='pc-q35-1.6' maxCpus='255'>q35</machine>
        <machine maxCpus='1'>isapc</machine>
        <machine maxCpus='255'>pc-0.10</machine>
        <machine maxCpus='255'>pc-0.11</machine>
        <machine maxCpus='255'>pc-0.12</machine>
        <machine maxCpus='255'>pc-0.13</machine>
        <machine maxCpus='255'>pc-0.14</machine>
        <machine maxCpus='255'>pc-0.15</machine>
        <machine maxCpus='255'>pc-1.0</machine>
        <machine maxCpus='255'>pc-1.1</machine>
        <machine maxCpus='255'>pc-1.2</machine>
        <machine maxCpus='255'>pc-1.3</machine>
        <machine maxCpus='255'>pc-i440fx-1.4</machine>
        <machine maxCpus='255'>pc-i440fx-1.5</machine>
        <machine maxCpus='1'>none</machine>
      </domain>
    </arch>
    <features>
      <cpuselection/>
      <deviceboot/>
      <acpi default='on' toggle='yes'/>
      <apic default='on' toggle='no'/>
      <pae/>
      <nonpae/>
    </features>
  </guest>

  <guest>
    <os_type>hvm</os_type>
    <arch name='x86_64'>
      <wordsize>64</wordsize>
      <emulator>/usr/bin/qemu-system-x86_64</emulator>
      <machine canonical='pc-i440fx-1.6' maxCpus='255'>pc</machine>
      <machine maxCpus='255'>pc-q35-1.4</machine>
      <machine maxCpus='255'>pc-q35-1.5</machine>
      <machine canonical='pc-q35-1.6' maxCpus='255'>q35</machine>
      <machine maxCpus='1'>isapc</machine>
      <machine maxCpus='255'>pc-0.10</machine>
      <machine maxCpus='255'>pc-0.11</machine>
      <machine maxCpus='255'>pc-0.12</machine>
      <machine maxCpus='255'>pc-0.13</machine>
      <machine maxCpus='255'>pc-0.14</machine>
      <machine maxCpus='255'>pc-0.15</machine>
      <machine maxCpus='255'>pc-1.0</machine>
      <machine maxCpus='255'>pc-1.1</machine>
      <machine maxCpus='255'>pc-1.2</machine>
      <machine maxCpus='255'>pc-1.3</machine>
      <machine maxCpus='255'>pc-i440fx-1.4</machine>
      <machine maxCpus='255'>pc-i440fx-1.5</machine>
      <machine maxCpus='1'>none</machine>
      <domain type='qemu'>
      </domain>
      <domain type='kvm'>
        <emulator>/usr/bin/qemu-kvm</emulator>
        <machine canonical='pc-i440fx-1.6' maxCpus='255'>pc</machine>
        <machine maxCpus='255'>pc-q35-1.4</machine>
        <machine maxCpus='255'>pc-q35-1.5</machine>
        <machine canonical='pc-q35-1.6' maxCpus='255'>q35</machine>
        <machine maxCpus='1'>isapc</machine>
        <machine maxCpus='255'>pc-0.10</machine>
        <machine maxCpus='255'>pc-0.11</machine>
        <machine maxCpus='255'>pc-0.12</machine>
        <machine maxCpus='255'>pc-0.13</machine>
        <machine maxCpus='255'>pc-0.14</machine>
        <machine maxCpus='255'>pc-0.15</machine>
        <machine maxCpus='255'>pc-1.0</machine>
        <machine maxCpus='255'>pc-1.1</machine>
        <machine maxCpus='255'>pc-1.2</machine>
        <machine maxCpus='255'>pc-1.3</machine>
        <machine maxCpus='255'>pc-i440fx-1.4</machine>
        <machine maxCpus='255'>pc-i440fx-1.5</machine>
        <machine maxCpus='1'>none</machine>
      </domain>
    </arch>
    <features>
      <cpuselection/>
      <deviceboot/>
      <acpi default='on' toggle='yes'/>
      <apic default='on' toggle='no'/>
    </features>
  </guest>

</capabilities>

[Fri, 25 Apr 2014 23:34:45 virt-manager 6492] DEBUG (connection:891) Using domain events
[Fri, 25 Apr 2014 23:34:45 virt-manager 6492] DEBUG (connection:925) Error registering network events: 'virConnect' object has no attribute 'networkEventRegisterAny'
[Fri, 25 Apr 2014 23:34:45 virt-manager 6492] DEBUG (connection:218) Using libvirt API for netdev enumeration
[Fri, 25 Apr 2014 23:34:45 virt-manager 6492] DEBUG (connection:240) Using libvirt API for mediadev enumeration
[Fri, 25 Apr 2014 23:34:47 virt-manager 6492] DEBUG (create:167) Showing new vm wizard
[Fri, 25 Apr 2014 23:34:47 virt-manager 6492] DEBUG (create:873) Guest type set to os_type=hvm, arch=x86_64, dom_type=kvm
[Fri, 25 Apr 2014 23:34:52 virt-manager 6492] DEBUG (storagebrowse:79) Showing storage browser
[Fri, 25 Apr 2014 23:34:54 virt-manager 6492] DEBUG (config:624) directory for type=isomedia returning=/home/javier/Documents/Software/Operating Systems
[Fri, 25 Apr 2014 23:34:58 virt-manager 6492] DEBUG (config:632) saving directory for type=media to /home/javier/Documents/Software/Operating Systems
[Fri, 25 Apr 2014 23:34:58 virt-manager 6492] DEBUG (storagebrowse:86) Closing storage browser
[Fri, 25 Apr 2014 23:35:05 virt-manager 6492] DEBUG (guest:208) Setting Guest.os_variant to 'win7'
[Fri, 25 Apr 2014 23:35:05 virt-manager 6492] DEBUG (diskbackend:142) Attempting to build pool=Operating Systems target=/home/javier/Documents/Software/Operating Systems
[Fri, 25 Apr 2014 23:35:05 virt-manager 6492] DEBUG (distroinstaller:410) Error validating install location
Traceback (most recent call last):
  File "/usr/share/virt-manager/virtinst/distroinstaller.py", line 407, in _validate_location
    d = self._make_cdrom_dev(val)
  File "/usr/share/virt-manager/virtinst/installer.py", line 106, in _make_cdrom_dev
    dev.path = path
  File "/usr/share/virt-manager/virtinst/devicedisk.py", line 523, in _set_path
    self._change_backend(val, None)
  File "/usr/share/virt-manager/virtinst/devicedisk.py", line 711, in _change_backend
    path, vol_object, None, None, None)
  File "/usr/share/virt-manager/virtinst/devicedisk.py", line 117, in _distill_storage
    (vol_object, pool, path_is_pool) = diskbackend.manage_path(conn, path)
  File "/usr/share/virt-manager/virtinst/diskbackend.py", line 146, in manage_path
    conn, os.path.basename(dirname) or "dirpool")
  File "/usr/share/virt-manager/virtinst/xmlbuilder.py", line 618, in setter
    self._validate_cb(xmlbuilder, val)
  File "/usr/share/virt-manager/virtinst/storage.py", line 66, in _validate_name
    util.validate_name(_("Storage object"), name)
  File "/usr/share/virt-manager/virtinst/util.py", line 151, in validate_name
    (name_type, val, c))
ValueError: Storage object name 'Operating Systems' can not contain ' ' character.
[Fri, 25 Apr 2014 23:35:05 virt-manager 6492] ERROR (error:124) Validation Error: Error setting install media location. Checking installer location failed: Could not find media '/home/javier/Documents/Software/Operating Systems/Microsoft Windows 7 Ultimate SP1 x64.iso'.
Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/create.py", line 1515, in validate_install_page
    self.guest.installer.location = location
  File "/usr/share/virt-manager/virtinst/installer.py", line 82, in set_location
    self._location = self._validate_location(val)
  File "/usr/share/virt-manager/virtinst/distroinstaller.py", line 412, in _validate_location
    "Could not find media '%s'." % str(val)))
ValueError: Checking installer location failed: Could not find media '/home/javier/Documents/Software/Operating Systems/Microsoft Windows 7 Ultimate SP1 x64.iso'.




$ ls -l /home/javier/Documents/Software/Operating\ Systems/Microsoft\ Windows\ 7\ Ultimate\ SP1\ x64.iso 
-rw-rw-r--. 1 javier javier 2224951568 Nov 12 17:08 /home/javier/Documents/Software/Operating Systems/Microsoft Windows 7 Ultimate SP1 x64.iso

Comment 3 Cole Robinson 2014-04-29 18:10:42 UTC
Thanks for the info, fixed upstream now:

commit feadd98fed045ec40d5d5cf8250c7b05517eb9c9
Author: Cole Robinson <crobinso>
Date:   Tue Apr 29 14:09:14 2014 -0400

    Fix using storage when the directory name contains whitespace (bz 1091384)

Comment 4 Fedora Update System 2014-04-29 18:52:38 UTC
virt-manager-1.0.1-3.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/virt-manager-1.0.1-3.fc20

Comment 5 Fedora Update System 2014-05-01 07:04:08 UTC
Package virt-manager-1.0.1-3.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing virt-manager-1.0.1-3.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-5846/virt-manager-1.0.1-3.fc20
then log in and leave karma (feedback).

Comment 6 javiertury 2014-05-01 11:06:18 UTC
virt-manager-1.0.1-3.fc20 fixes the bug

thanks

Comment 7 Fedora Update System 2014-05-02 20:57:30 UTC
virt-manager-1.0.1-3.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.