wrench.virtual_machine
- class wrench.virtual_machine.VirtualMachine(simulation, cloud_compute_service: CloudComputeService, name: str)
Bases:
SimulationItemWRENCH Virtual Machine class
- get_cloud_compute_service() CloudComputeService
Get the cloud compute service on which the VM runs
- Returns:
a cloud compute service
- Return type:
- get_name() str
Get the name
- is_down() bool
Determine whether the VM is down
- Returns:
True if the VM is down, false otherwise
- Return type:
bool
- is_running() bool
Determine whether the VM is running
- Returns:
True if the VM is running, false otherwise
- Return type:
bool
- is_suspended() bool
Determine whether the VM is suspended
- Returns:
True if the VM is suspended, false otherwise
- Return type:
bool
- resume() None
Resume the VM
- shutdown() None
Shutdown the VM
- start() BareMetalComputeService
Start the VM
- Returns:
A bare-metal compute service running on the VM
- Return type:
- suspend() None
Suspend the VM