vVols: Cannot importVApp from java to deploy ovf template on vCenter on vVols datastore

Hi all,

I'm trying to use vVols datastore to deploy OVF template from a java application. I could do deployOvfTemplate from vCenter but when I'm doing it from java the operations is failed with error "vim.fault.CannotCreateFile Please see the server log to find more detail regarding exact cause of the failure".

ManagedObjectReference morLease = context.getService().importVApp(morRp, ovfImportResult.getImportSpec(), dcMo.getVmFolder(), morHost);

I digged a little more on all possible logs and find the following relavant errors. But I could not find the exact issue and fix to make.

I believe importVApp method from management SDK is datastore type independant.

Can any one help me in this regard,


2020-08-05T09:53:37.187Z info hostd[2098595] [Originator@6876 sub=Default opID=78ac9244-01-01-01-29-9112 user=vpxuser:VSPHERE.LOCAL\Administrator] AdapterServer caught exception: N7Hostsvc20OsfsCannotCreateFile9ExceptionE(Fault cause: vim.fault.CannotCreateFile


2020-08-05T09:53:36.268Z info vvold[2283420] [Originator@6876 sub=Default] VVolUnbindManager::UnbindIdleVVols called                                                                                      

2020-08-05T09:53:36.268Z info vvold[2283420] [Originator@6876 sub=Default] VVolUnbindManager::UnbindIdleVVols done for 0 VVols

2020-08-05T09:53:37.173Z info vvold[2283394] [Originator@6876 sub=Default] Came to SI::BindVirtualVolume: esxContainerId bac3b586-36dc-498d-ac49-7147bfd7f4c9 VVol Id 17a12f9e6eb0329b83e754762976599c bindType

2020-08-05T09:53:37.173Z info vvold[2283394] [Originator@6876 sub=Default]                                     

--> VasaOp::BindVirtualVolume [#132249]: ===> Issuing 'bindVirtualVolume' to VP SolidFire (#outstanding 0/10) [session state: Connected]

2020-08-05T09:53:37.181Z error vvold[2283394] [Originator@6876 sub=Default]                                    

--> VasaOp::ThrowFromSessionError [#132249]: ===> FINAL SUCCESS bindVirtualVolume VP (SolidFire) Container (bac3b586-36dc-498d-ac49-7147bfd7f4c9) timeElapsed=8 msecs (#outstanding 0)

2020-08-05T09:53:37.182Z error vvold[2283394] [Originator@6876 sub=Default] SI:BindVirtualVolume@3536 VASA bind for VVol (17a12f9e6eb0329b83e754762976599c) returned error : INVALID_ARGUMENT ()

2020-08-05T09:53:37.184Z info vvold[2283404] [Originator@6876 sub=IpcSvc] VVoldIpcConn object freed (0)                          


2020-08-05T09:53:37.170Z 5792189:Lookup:660: Got lookup request for "17a12f9e6eb0329b83e754762976599c"

2020-08-05T09:53:37.170Z 5792189:Provider_Lookup:469: Found matching driver for ID [    vvol]       

2020-08-05T09:53:37.170Z 5792189:VVolMount:2464: VVolMount@2464:Lookup was sent UUID based name 17a12f9e6eb0329b83e754762976599c

2020-08-05T09:53:37.171Z 5792189:5792189:VVOLLIB : VVolLib_Open:8955: container Id passed: bac3b586-36dc-498d-ac49-7147bfd7f4c9 Normalized: bac3b586-36dc-498d-ac49-7147bfd7f4c9

2020-08-05T09:53:37.171Z 5792189:5792189:VVOLLIB : VVolLib_Open:8995: created devFS node '17a12f9e6eb0329b83e754762976599c' (objType 3)

2020-08-05T09:53:37.182Z 5792189:5792189:VVOLLIB : VVolLib_IpcStorageFaultToVVolLibError:767: Storage Fault INVALID_ARGUMENT (9):

2020-08-05T09:53:37.182Z 5792189:5792189:VVOLLIB : VVolLib_BindVVol:4145: failed with error (1) Bad Parameter for Config VVol 17a12f9e6eb0329b83e754762976599c

2020-08-05T09:53:37.182Z 5792189:5792189:VVOLLIB : VVolLib_Open:9241: Could not bind VVol 17a12f9e6eb0329b83e754762976599c failed with error (Bad Parameter)                             

2020-08-05T09:53:37.183Z 5792189:VVolMount:2526: VVolMount@2526:Could not open the VVol '17a12f9e6eb0329b83e754762976599c' (No such file or directory)


2020-08-05T09:53:37.203Z info vpxa[5691664] [Originator@6876 sub=Default opID=78ac9244-01-01-01-29] [VpxLRO] -- ERROR lro-7007 -- vpxa -- vpxapi.VpxaService.reserveName: vim.fault.CannotCreateFile:        

--> Result:                                                                                                                                                                                                  

--> (vim.fault.CannotCreateFile) {                                                                                                                                                                           

-->    faultCause = (vmodl.MethodFault) null,                                                                                                                                                                

-->    faultMessage = (vmodl.LocalizableMessage) [                                                                                                                                                           

-->       (vmodl.LocalizableMessage) {                                                                                                                                                                       

-->          key = "com.vmware.esx.hostctl.default",                                                                                                                                                         

-->          arg = (vmodl.KeyAnyValue) [                                                                                                                                                                     

-->             (vmodl.KeyAnyValue) {                                                                                                                                                                        

-->                key = "reason",                                                                                                                                                                           

-->                value = "17a12f9e6eb0329b83e754762976599c (Cannot Create File)"                                                                                                                           

-->             }                                                                                                                                                                                            

-->          ],                                                                                                                                                                                              

-->          message = "Operation failed, diagnostics report: 17a12f9e6eb0329b83e754762976599c (Cannot Create File)"                                                                                         

-->       }                                                                                                                                                                                                  

-->    ],                                                                                                                                                                                                    

-->    file = "17a12f9e6eb0329b83e754762976599c (Cannot Create File)"                                                                                                                                        

-->    msg = "Received SOAP response fault from [<cs p:0000007718306350, TCP:localhost:8307>]: CreateDirectory                                                                                               

--> Cannot complete file creation operation."                                                                                                                                                                

--> }                                                                                                                                                                                                        

--> Args:                                                                                                                                                                                                    


--> Arg spec:                                                                                                                                                                                                

--> (vpxapi.VmLayoutSpec) {                                                                                                                                                                                  

-->    vmLocation = (vpxapi.VmLayoutSpec.Location) null,                                                                                                                                                     

-->    multipleConfigs = <unset>,                                                                                                                                                                            

-->    basename = "17a12f9e6eb0329b83e754762976599c",                                                                                                                                                        

-->    baseStorageProfile = "<ns1:storageProfile xmlns:ns1="http://profile.policy.data.vasa.vim.vmware.com/xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns1:StorageProfile"><ns1:const

-->    disk = (vpxapi.VmLayoutSpec.Location) [                                                                                                                                                               

-->       (vpxapi.VmLayoutSpec.Location) {                                                                                                                                                                   

-->          url = "ds:///vmfs/volumes/vvol:bac3b58636dc498d-ac497147bfd7f4c9/",                                                                                                                             

-->          key = <unset>,                                                                                                                                                                                  

-->          sourceUrl = "ds:///vmfs/volumes/vvol:bac3b58636dc498d-ac497147bfd7f4c9/",                                                                                                                       

-->          urlType = "rootDirPath",                                                                                                                                                                        

-->          storageProfile = "<ns1:storageProfile xmlns:ns1="http://profile.policy.data.vasa.vim.vmware.com/xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns1:StorageProfile"><ns1:con

-->       }                                                                                                                                                                                                  

-->    ],                                                                                                                                                                                                    

-->    reserveDirOnly = true                                                                                                                                                                                 

--> }       

0 Kudos
2 Replies

Moderator note:

Please do not post the same question multiple times! Your other two discussions have been archived.


0 Kudos

Sorry for that, I thought those are different forums and so posted there too.

Any help here is much appreciable.


0 Kudos