Skip to content
This repository was archived by the owner on Jul 1, 2021. It is now read-only.

Uncaught exception: file too big for single read #104

@Bindong18

Description

@Bindong18

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions