vmware/pyvmomi-community-samples

help wanted, getting vim.fault.CannotAccessFile

Open

#527 opened on Nov 26, 2018

 (0 comments) (0 reactions) (0 assignees)Python (914 forks)batch import
help wanted

Repository metrics

Stars
 (972 stars)
PR merge metrics
 (No merged PRs in 30d)

Description

Hi,

getting below exception while creating a directory in windows VM.

Creating directory in vm using : MakeDirectoryInGuest() from vim.vm.guest.FileManager. passing all the attributes to MakeDirectoryInGuest().

traceback : createParentDirectories=True File "C:\Python27\lib\site-packages\pyVmomi\VmomiSupport.py", line 580, in self.f(*(self.args + (obj,) + args), **kwargs) File "C:\Python27\lib\site-packages\pyVmomi\VmomiSupport.py", line 386, in _InvokeMethod return self._stub.InvokeMethod(self, info, args) File "C:\Python27\lib\site-packages\pyVmomi\SoapAdapter.py", line 1370, in InvokeMethod raise obj # pylint: disable-msg=E0702 vim.fault.CannotAccessFile: (vim.fault.CannotAccessFile) { dynamicType = , dynamicProperty = (vmodl.DynamicProperty) [], msg = 'Unable to access file C:\Path\to\target_dir', faultCause = , faultMessage = (vmodl.LocalizableMessage) [], file = 'C:\Path\to\target_dir' }

Contributor guide