1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-11-28 11:18:11 +00:00

Prevent double start of VirtualBox VM and VMware VM

Fix https://github.com/GNS3/gns3-gui/issues/1664
This commit is contained in:
Julien Duponchelle 2016-11-17 10:38:29 +01:00
parent 81b2894658
commit 75890c8f5a
No known key found for this signature in database
GPG Key ID: CE8B29639E07F5E8
2 changed files with 6 additions and 0 deletions

View File

@ -206,6 +206,9 @@ class VirtualBoxVM(BaseNode):
Starts this VirtualBox VM. Starts this VirtualBox VM.
""" """
if self.status == "started":
return
# resume the VM if it is paused # resume the VM if it is paused
vm_state = yield from self._get_vm_state() vm_state = yield from self._get_vm_state()
if vm_state == "paused": if vm_state == "paused":

View File

@ -386,6 +386,9 @@ class VMwareVM(BaseNode):
Starts this VMware VM. Starts this VMware VM.
""" """
if self.status == "started":
return
if (yield from self.is_running()): if (yield from self.is_running()):
raise VMwareError("The VM is already running in VMware") raise VMwareError("The VM is already running in VMware")