Skip to content

Instantly share code, notes, and snippets.

@krizex
Last active August 19, 2019 08:24
Show Gist options
  • Save krizex/31110992ebf3a991cd2ee33a71498262 to your computer and use it in GitHub Desktop.
Save krizex/31110992ebf3a991cd2ee33a71498262 to your computer and use it in GitHub Desktop.
Display the source blob
Display the rendered blob
Raw
import XenAPI
import json
s = XenAPI.Session("http://10.158.180.212")
s.login_with_password("root", "xenroot")
uuid = 'f7500c35-192d-882a-ee8d-1323ecce4cac'
vm = s.xenapi.VM.get_by_uuid(uuid)
s.xenapi.VM.get_power_state(vm)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment