Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fog-demo patrick$ fog
- no such file to load -- interactive_editor
- Welcome to fog interactive!
- :default provides AWS, Libvirt and Vmfusion
- >> f=Fog::Compute.new(:provider => "Vmfusion")
- #<Fog::Compute::Vmfusion::Real:0x000001020fc5a0>
- >> f.servers.all
- <Fog::Compute::Vmfusion::Servers
- [
- <Fog::Compute::Vmfusion::Server
- name="ESX Server - Fog",
- state="not running"
- >,
- <Fog::Compute::Vmfusion::Server
- name="lucid64",
- state="running"
- >,
- <Fog::Compute::Vmfusion::Server
- name="win2008-enterprise-vsphere-v5",
- state="suspended"
- >,
- <Fog::Compute::Vmfusion::Server
- name="winxp-sp2-mgt",
- state="not running"
- >
- ]
- >
- >> s=f.servers.get("lucid64")
- <Fog::Compute::Vmfusion::Server
- name="lucid64",
- state="running"
- >
- >> s.state
- "running"
- >> s.suspend
- s.VM suspended
- nil
- >> s.resume
- VM started
- nil
- >> s.reboot
- VM stopped
- VM started
- true
- >> s.public_ip_address
- "172.16.44.139"
- >> s.username="vagrant"
- "vagrant"
- >> s.password="vagrant"
- "vagrant"
- >> s.ssh("uptime")
- [#<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>]
- >>
Add Comment
Please, Sign In to add comment