Allow to stop a VMware VM from GNS3 even if halted within the VM. Fixes #1118.

This commit is contained in:
grossmj committed 2016-03-19 12:08:44 -06:00
1 parent 06da40cdcd
commit 7cdf23f497
1 file changed
+6 -5
+6 -5
View File
@@ -488,11 +488,12 @@ class VMwareVM(BaseVM):
yield from self._ubridge_hypervisor.stop()
try:
if self.acpi_shutdown:
# use ACPI to shutdown the VM
yield from self._control_vm("stop", "soft")
else:
yield from self._control_vm("stop")
if (yield from self.is_running()):
if self.acpi_shutdown:
# use ACPI to shutdown the VM
yield from self._control_vm("stop", "soft")
else:
yield from self._control_vm("stop")
finally:
self._started = False