Guest User

Untitled

a guest
Jan 21st, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.22 KB | None | 0 0
  1. fog-demo patrick$ fog
  2. no such file to load -- interactive_editor
  3. Welcome to fog interactive!
  4. :default provides AWS, Libvirt and Vmfusion
  5. >> f=Fog::Compute.new(:provider => "Vmfusion")
  6. #<Fog::Compute::Vmfusion::Real:0x000001020fc5a0>
  7. >> f.servers.all
  8. <Fog::Compute::Vmfusion::Servers
  9. [
  10. <Fog::Compute::Vmfusion::Server
  11. name="ESX Server - Fog",
  12. state="not running"
  13. >,
  14. <Fog::Compute::Vmfusion::Server
  15. name="lucid64",
  16. state="running"
  17. >,
  18. <Fog::Compute::Vmfusion::Server
  19. name="win2008-enterprise-vsphere-v5",
  20. state="suspended"
  21. >,
  22. <Fog::Compute::Vmfusion::Server
  23. name="winxp-sp2-mgt",
  24. state="not running"
  25. >
  26. ]
  27. >
  28. >> s=f.servers.get("lucid64")
  29. <Fog::Compute::Vmfusion::Server
  30. name="lucid64",
  31. state="running"
  32. >
  33. >> s.state
  34. "running"
  35. >> s.suspend
  36. s.VM suspended
  37. nil
  38. >> s.resume
  39. VM started
  40. nil
  41. >> s.reboot
  42. VM stopped
  43. VM started
  44. true
  45. >> s.public_ip_address
  46. "172.16.44.139"
  47. >> s.username="vagrant"
  48. "vagrant"
  49. >> s.password="vagrant"
  50. "vagrant"
  51. >> s.ssh("uptime")
  52. [#<Fog::SSH::Result:0x0000010228f5c0 @command="uptime", @stderr="", @stdout=" 14:54:43 up 0 min, 1 user, load average: 0.06, 0.02, 0.00\r\n", @status=0>]
  53. >>
Add Comment
Please, Sign In to add comment