the image import operation follows these steps:
1) OpenNebula contacts vcenter with the credentials you've provided and tries to find vmdk and iso files inside the datastore from where you're importing them.
2) OpenNebula checks if images returned by vCenter API have already been imported.
3) Those images that haven't been imported are shown in Sunstone.
Here you present two different problems:
1) You only get 2 or 3 from 30 files. Maybe the files are stored in folders and subfolders and something prevents OpenNebula to get them through vCenter, maybe the files are not found because of a file type...
2) The results are different each time. Assuming that you don't import the images on each attempt (as previosuly imported would not be shown again) then either vCenter is not finding the images correctly or OpenNebula is discarding some images as imported...
There's no log for the import operation, but a few prints could be added to help you find out what is wrong and check if it's a bug. Could you provide the following info?:
What OpenNebula version are you running?
Could you post a screenshot of your vcenter datastore structure (is it inside folders and subfolders)?
Could you post a screenshot of your VMWare VSphere client showing the contents of the folder where the isos are located?
Could you run a onedatastore list command and post the result?
Are you using StorageDRS?
Let's start with this