Class | Fog::Compute::Vmfusion::Server
In: | lib/fog/vmfusion/models/compute/server.rb
Parent: | Fog::Compute::Server

### Methods

clone destroy halt ipaddress mac_addresses path power_state poweroff private_ip_address public_ip_address ready? reboot resume save scp setup shutdown ssh start state stop suspend

### Attributes

password | [RW] |

### Public Instance methods

clone(name)

Fussion doesn‘t have the concept of templates so one just clones regular VMs.

destroy(options = { :force => false })

Destroy, deletes the VM from the local disk but only hard stops the VM before doing so if you set :force to true.

halt()

Halt and poweroff are just synonyms for stop.

ipaddress()

We obtain the first ipaddress. This should generally be a safe assumption for Fusion. Even if an address is provided via NAT, bridge, or host only it will by accessible from the host machine the VM resides on.

mac_addresses()

Collecting all mac_addresses the VM has...mostly just because we are doing the same thing for the vSphere provider.

path()

Path to the VM‘s vmx file on the local disk.

power_state()

The power state of the VM is commonly going to be three values; running, not running, or suspended.

poweroff()
private_ip_address()
public_ip_address()

Keeping these three methods around for API compatibility reasons. Makes the vmfusion provider function similar to cloud providers and the vsphere provider. Future goal is to add an actual private and public concept. Needs changes to fission and a determination what is a public or private address here; bridge, nat, host-only.

ready?()
reboot()

Attempt a graceful shutdown, wait for the VM to completely shutdown and then start it again.

resume()

Resuming from suspend is the same thing as start to Fusion.

save()

There is currently no documented model of creating VMs from scratch sans Fusion‘s wizard.

scp(local_path, remote_path, upload_options = {})

SCP something to our VM.

setup(credentials = {})

Sets up a new SSH key on the VM so one doesn‘t need to use a password ever again.

shutdown()

This is a graceful shutdown but Fusion is only capable of a graceful shutdown if tools are installed. Fusion does the right thing though and if graceful can‘t be initiated it just does a hard stop.

ssh(commands)

Simply spawn an SSH session.

start(options = { :headless => false })

Start is pretty self explanatory...if you pass :headless as true you won‘t get a console on launch.

state()
stop()

Stop is a hard stop, like pulling out the power cord.

suspend()

[Validate]