[libvirt] VMware: Map vpx:// to dcPath

Richard W.M. Jones rjones at redhat.com
Mon Sep 7 20:04:20 UTC 2015

On Mon, Sep 07, 2015 at 02:29:22PM +0200, Matthias Bolte wrote:
> It's even more complex than that, you can have another level of
> folders in there. The path can have this format for a vpx:// URI:
> [<folder>/...]<datacenter>/[<folder>/...]<computeresource>[/<hostsystem>]
> IIRC datacenter and computeresource name cannot contain slashes. At
> leat libvirt assumes that it can't.

Yup, was simplifying for the sake of keeping the email short :-)

> > (2) Can we add some way to more easily map from vpx:// paths to
> > datastore URLs?  The whole process is very complex even without the
> > ambiguity - it takes a couple of pages of code to do the mapping.
> I assume you already connect to the vpx:// URI to get the dsName for a
> given disk image anyway.

Yup, current code is here (which doesn't include connecting to VMware
or getting the domain XML - that is done elsewhere):


> I think the datacenter path could be exposed
> as part of the domain XML as
> <vmware:datacenterpath>/path/to/dc</vmware:datacenterpath> similar to
> the way <qemu:commandline> works. But it would be ignored on parsing.
> Would that work for you? If yes, I can propose a patch that does this.

Absolutely this would be brilliant.


Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-builder quickly builds VMs from scratch

More information about the libvir-list mailing list