Package modules :: Package machinery :: Module vsphere :: Class vSphere
[hide private]
[frames] | no frames]

Class vSphere

source code

                           object --+    
                                    |    
lib.cuckoo.common.abstracts.Machinery --+
                                        |
                                       vSphere

vSphere/ESXi machinery class based on pyVmomi Python SDK.

Instance Methods [hide private]
 
__init__(self)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
_initialize(self, module_name)
Read configuration.
source code
 
_initialize_check(self)
Runs checks against virtualization software when a machine manager is initialized.
source code
 
start(self, label, task)
Start a machine.
source code
 
stop(self, label)
Stop a machine.
source code
 
dump_memory(self, label, path)
Take a memory dump of a machine.
source code
 
_list(self)
List virtual machines on vSphere host
source code
 
_status(self, label)
Get power state of vm from vSphere host.
source code
 
_get_virtual_machines(self, conn)
Iterate over all VirtualMachine managed objects on vSphere host
source code
 
_get_virtual_machine_by_label(self, conn, label)
Return the named VirtualMachine managed object
source code
 
_get_snapshot_by_name(self, vm, name)
Return the named VirtualMachineSnapshot managed object for a virtual machine
source code
 
_get_snapshot_power_state(self, vm, name)
Return the power state for a named VirtualMachineSnapshot object
source code
 
_create_snapshot(self, vm, name)
Create named snapshot of virtual machine
source code
 
_delete_snapshot(self, vm, name)
Remove named snapshot of virtual machine
source code
 
_revert_snapshot(self, vm, name)
Revert virtual machine to named snapshot
source code
 
_download_snapshot(self, conn, vm, name, path)
Download snapshot file from host to local path
source code
 
_stop_virtual_machine(self, vm)
Power off a virtual machine
source code
 
_wait_task(self, task)
Wait for a task to complete with timeout
source code
 
_traverseSnapshots(self, root)
Recursive depth-first traversal of snapshot tree
source code

Inherited from lib.cuckoo.common.abstracts.Machinery: acquire, availables, initialize, machines, pcap_path, release, running, set_options, set_status, shutdown

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  RUNNING = "poweredOn"
  POWEROFF = "poweredOff"
  SUSPENDED = "suspended"
  ABORTED = "aborted"

Inherited from lib.cuckoo.common.abstracts.Machinery: LABEL

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

_initialize(self, module_name)

source code 

Read configuration.

Parameters:
  • module_name - module name.
Overrides: lib.cuckoo.common.abstracts.Machinery._initialize

_initialize_check(self)

source code 

Runs checks against virtualization software when a machine manager is initialized.

Raises:
Overrides: lib.cuckoo.common.abstracts.Machinery._initialize_check

start(self, label, task)

source code 

Start a machine.

Parameters:
  • label - machine name.
  • task - task object.
Raises:
Overrides: lib.cuckoo.common.abstracts.Machinery.start

stop(self, label)

source code 

Stop a machine.

Parameters:
  • label - machine name.
Raises:
Overrides: lib.cuckoo.common.abstracts.Machinery.stop

dump_memory(self, label, path)

source code 

Take a memory dump of a machine.

Parameters:
  • path - path to where to store the memory dump
Raises:
Overrides: lib.cuckoo.common.abstracts.Machinery.dump_memory

_list(self)

source code 

List virtual machines on vSphere host

Raises:
  • NotImplementedError - this method is abstract.
Overrides: lib.cuckoo.common.abstracts.Machinery._list

_status(self, label)

source code 

Get power state of vm from vSphere host.

Parameters:
  • label - virtual machine name
Raises: