1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-13 12:58:17 +03:00

Better monitor for vCenter driver for VM datastore retrieval

This commit is contained in:
Tino Vazquez 2017-07-17 11:49:02 +02:00 committed by Ruben S. Montero
parent aa7c18e58f
commit 82cb9861d0
2 changed files with 3 additions and 6 deletions

View File

@ -360,7 +360,8 @@ class ClusterComputeResource
"config.extraConfig", #VM extraconfig info e.g opennebula.vm.running
"config.hardware.numCPU",
"config.hardware.memoryMB",
"config.annotation"
"config.annotation",
"datastore"
]
filterSpec = RbVmomi::VIM.PropertyFilterSpec(

View File

@ -603,11 +603,7 @@ class Template
str << "IMPORT_STATE =\"#{@state}\"\n"
# Get DS information
ds_folder = get_dc.datastore_folder
ds_name = self["config.datastoreUrl"][0].name
ds_folder.fetch!
ds_vcenter_ref = ds_folder.items.select{|_,d| d["name"] == ds_name}.values[0]["_ref"]
str << "VCENTER_DS_REF = \"#{ds_vcenter_ref}\"\n"
str << "VCENTER_DS_REF = \"#{@vm_info["datastore"].first._ref}\"\n"
vnc_port = nil
keymap = nil