Creating a Vcenter : Govcsim

I am creating a vcenter using vcsim… Basically the use of it is to take the json file and just to print it. But i am not able to get that.
i am getting an error
ServerFaultCode: PerformanceManager:PerfMgr does not implement: QueryPerf

Please help…

Show us your code.

 var err error
data, _ := ioutil.ReadFile("../vcenter/Test/Testdata/request1.json")
json.Unmarshal(data, &cl.validEntityTypeMetricMap)
collectReq := string(data)
log.Println("Request received : " + collectReq)
req := &CollectionRequest{}
cl.request = req

log.Println("Connecting to vcenter using URL : " + req.Vcenterurl)

client, err := CreateNewClient(req, true)
if err != nil {
	log.Fatalln("Connection to URL " + req.Vcenterurl + ", failed with Error: " + err.Error())

cl.manager = performance.NewManager(client)

//Set the max query length
if val, err := strconv.Atoi(getMaxQueryLen(client)); err == nil {
	cl.maxQueryLen = val
log.Println("Connected to vcenter: " + req.Vcenterurl)

So many questions:

  • What is the API you work against? Is it documented? Where?
  • Which library do you use? For example, what is Collector?
  • Which line in your code throws this error?

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.