-
Notifications
You must be signed in to change notification settings - Fork 175
Uncaught exception: file too big for single read #104
Comments
Hi , Could you pls. tell me if there is any update? Thank you very much |
@Bindong18 Unfortunately, I haven't been able to track this down. What version of Windows are you using? From the looks of it, you installed Ruby via the Rails Installer. Is that the case? |
@jrgarcia windows: win2008r2 ,Yes Rails Installer3.3.0 |
So it looks like this is an issue with reading large files with Ruby. You can see here where we call |
If you are using 32bit then you have a limit of 2GB (https://en.wikipedia.org/wiki/2_GB_limit) Could you check if your Ruby is 32 or 64 bit. |
@bergholdt C:\Users\administrator>irb |
@Bindong18 Yeah, it looks like you have a 32-bit version of Ruby installed (i386-mingw32). This means there is no way to read a file that large. When I get a chance, I'll test to see if there is a way to stream this rather than just reading it that will work, but this will never work with 32-bit. |
@jrgarcia Uncaught exception: file too big for single read C:\Users\administrator.CRE3>ruby -v |
@Bindong18 can you output Aside from that, I'm guessing the problem is just that Ruby itself can not read a file that large. I can change the implementation from the stdlib |
C:\Users\administrator.CRE3>irb |
Ok, so the problem then is that Ruby's |
@jrgarcia |
I encountered the following issue when reading the content of .OVA file “test.ova” (its size is 2.1GB).
Uncaught exception: file too big for single read
e:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/rbvmomi-1.10.0/lib/rbvmomi/vim/OvfManager.rb:43:in
read' e:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/rbvmomi-1.10.0/lib/rbvmomi/vim/OvfManager.rb:43:in
deployOVF'My sample code is as follows:
vim = RbVmomi::VIM.connect :host => hyper, :user => user, :password => password, :insecure => true
dc = vim.serviceInstance.find_datacenter(dcName) or abort "datacenter not found"
network = dc.network.first #Network
computeResourceArray = dc.hostFolder.children #Array for ComputeResource
computeResourceForDeploy=nil #ComputeResource
computeResourceForDeploy = computeResourceArray.find { |x| x.host.first.summary.config.name == 'crName' }
hostForDeploy=nil #HostSystem
computeResourceArray.each do |x|
host = x.host.first
if host.summary.config.name == 'hostName'
hostForDeploy = host
break;
end
end
dataStoreArray = dc.datastore #Array for DataStore
dataStoreDeploy=nil #DataStore
dataStoreDeploy = dataStoreArray.find { |x| x.name ==’dsName’ }
VIM = RbVmomi::VIM
root_vm_folder = dc.vmFolder
vm_folder = root_vm_folder
vm_name = 'test327'
ovf_url='//fileServer/test.ova'
vm = vim.serviceContent.ovfManager.deployOVF(
uri: ovf_url,
vmName: vm_name,
vmFolder: vm_folder,
host: hostForDeploy,
resourcePool: computeResourceForDeploy.resourcePool,
datastore: dataStoreDeploy,
)
Did anyone encounter the same issue ? Does anyone know how to resolve it?
The text was updated successfully, but these errors were encountered: