Could not inquire the cpu_usage of vm through webservice

Solution Unverified - Updated -

Issue

  • I use FindVmByGuid API to inquire the cpu information of vm.
    this is the code:
# API FOR Query VM By Guid
body_hash = {}
body_hash['vmGuid'] = '9a1120bc-d5bc-11e3-9f64-005056b98052'
response = client.request 'FindVmByGuid' do |soap|
    soap.body = body_hash
end

# Convert response to hash
response_hash = response.to_hash
puts "CFME web-service returned: #{response_hash.inspect}"

# Loop through each management system in the array and log the name and guid
response_hash[:find_vm_by_guid_response][:return].inspect
  • I have enable the role of collection. and i can see the cpu usage from web uibut the output of cpu_usage and memory_usage is null:
          <cpu_usage xsi:nil="true"></cpu_usage>
          <memory_usage xsi:nil="true"></memory_usage>

Environment

  • Red Hat CloudForms 3.0

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.