Bug 732676 - esx driver: failed to access datastore (/folder) on virtualcenter with paths
Summary: esx driver: failed to access datastore (/folder) on virtualcenter with paths
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libvirt
Version: unspecified
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Libvirt Maintainers
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2011-08-23 09:57 UTC by Juan Carlos Moreno
Modified: 2016-04-26 18:55 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2016-03-23 13:33:37 UTC

Attachments (Terms of Use)
patch for dcPath (2.39 KB, patch)
2011-08-24 09:28 UTC, Juan Carlos Moreno
no flags Details | Diff

Description Juan Carlos Moreno 2011-08-23 09:57:41 UTC
Description of problem:

if you have a virtualcenter where you classify your datacenter into folders, you are unable to access datastore, returning a 404 not found.

Mi list of folder is like:

https://vcenter/folder :

Index of datacenters


the command:

virsh -d5 -c vpx://vcenterIP/MYDC1/CLUSTER/esx001?no_verify=1 dumpxml virtualmachine
error: internal error HTTP response code 404 for download from 'https://vcenterIP:443/folder/virtualmachine/virtualmachine.vmx?dcPath=MYDC1&dsName=vmstorage'

dcPath should be "OWN/MYDC1"

Version-Release number of selected component (if applicable):

lastest-build (libvirt-0.9.4xxx)

How reproducible:

create a folder in your virtualcenter and then move your datacenter inside, you will recieve a 404 when requesting a "dumpxml" command.

please, see patch attached for a possible solution.

Hope that helps.
Juan Carlos

Comment 1 Dave Allan 2011-08-23 15:35:10 UTC
Thanks for the bugreport and the patch; I don't see it attached, though?

Comment 2 Juan Carlos Moreno 2011-08-24 09:28:13 UTC
Created attachment 519578 [details]
patch for dcPath

the patch.

Comment 3 Eric Blake 2011-08-24 13:53:44 UTC
You may get faster review if you also send your patch upstream, to libvir-list@redhat.com

Comment 4 Matthias Bolte 2011-08-24 14:19:08 UTC
The common vpx:// URI format is like this


The actual problem here is that the driver doesn't handle folders yet. In your case the correct URI should look like this once the driver can handle folders


and OWN/MYDC1 is the datacenter part. As you can probably create folders (and even nest them) on all levels of the datacenter/cluster/server path the driver needs to deal with complexer paths.

Your patch works around this by adding a query parameter. That's fine for your special case. But the general solution will be to make the URI path handling aware of folders.

I'll have a look at that.

Comment 5 Matthias Bolte 2011-09-06 20:42:51 UTC
I posted a patch to the mailing list that allows you to specify folders in the path of the connection URI as suggested:


While implementing this I found a bug in the driver and fixed it. This patch is a prerequisite for the first one:


Comment 6 Juan Carlos Moreno 2011-09-07 08:00:53 UTC
Hi Matthias,

ok, thank you. I'will try it!

Best regards,

Juan Carlos Moreno
Project Manager

Comment 7 Cole Robinson 2016-03-23 13:33:37 UTC
That patch was pushed upstream:

commit 23247a1efd9ab41204e434aaf6798b7f807c4c31
Author: Matthias Bolte <matthias.bolte@googlemail.com>
Date:   Tue Nov 1 17:12:37 2011 +0100

    esx: Support folders in the path of vpx:// connection URIs

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