May 4, 2017


Get Virtual Console Virtual Guest

Retrieve the IP, username, and password needed to access the KVM console for a Virtual Guest.
=begin
@author Ryan Tiffany
=end

require 'softlayer_api'
require 'pp'

client = SoftLayer::Client.new(:timeout => 120)
virtual_server_id = 31678643

mask = 'mask[consoleIpAddressRecord[ipAddress[ipAddress],port],operatingSystem[passwords]]'

getDetails = client['SoftLayer_Virtual_Guest'].object_mask(mask).object_with_id(virtual_server_id).getObject
pp getDetails

Feedback?

If this article contains any error, or leaves any of your questions unanswered, please help us out by opening up a github issue.
Open an issue