1
0
mirror of https://github.com/GNS3/gns3-server synced 2025-01-11 16:41:04 +00:00

Save the GNS3 VM settings even if the GNS3 VM cannot be stopped.

This commit is contained in:
grossmj 2019-03-18 15:30:59 +07:00
parent 3a73d01547
commit 4e396ac690
2 changed files with 7 additions and 3 deletions

View File

@ -212,9 +212,11 @@ class GNS3VM:
new_settings = copy.copy(self._settings) new_settings = copy.copy(self._settings)
new_settings.update(settings) new_settings.update(settings)
if self.settings != new_settings: if self.settings != new_settings:
await self._stop() try:
self._settings = settings await self._stop()
self._controller.save() finally:
self._settings = settings
self._controller.save()
if self.enable: if self.enable:
await self.start() await self.start()
else: else:

View File

@ -239,6 +239,8 @@ class HyperVGNS3VM(BaseGNS3VM):
log.info("GNS3 VM has been started") log.info("GNS3 VM has been started")
# Get the guest IP address # Get the guest IP address
# LIS (Linux Integration Services) must be installed on the guest
# See https://oitibs.com/hyper-v-lis-on-ubuntu-18-04/ for details.
trial = 120 trial = 120
guest_ip_address = "" guest_ip_address = ""
log.info("Waiting for GNS3 VM IP") log.info("Waiting for GNS3 VM IP")