Suspend the GNS3 VM

Fix #656
This commit is contained in:
Julien Duponchelle committed 2016-09-08 15:32:35 +02:00
1 parent cfe834afc4
commit 1412462229
8 files changed
+114 -42

No files matched your search

@@ -126,6 +126,21 @@ class VMwareGNS3VM(BaseGNS3VM):
log.info("GNS3 VM IP address set to {}".format(guest_ip_address))
self.running = True
@asyncio.coroutine
def suspend(self):
"""
Suspend the GNS3 VM.
"""
if self._vmx_path is None:
raise GNS3VMError("No VMX path configured, can't suspend the VM")
try:
yield from self._execute("suspend", [self._vmx_path])
except GNS3VMError as e:
log.warning("Error when suspending the VM: {}".format(str(e)))
log.info("GNS3 VM has been suspended")
self.running = False
@asyncio.coroutine
def stop(self):
"""