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

Fix random VirtualBox creation error when using linked clone

Fix #760
This commit is contained in:
Julien Duponchelle 2016-11-04 11:07:43 +01:00
parent 6f43f988c3
commit dc26be43c2
No known key found for this signature in database
GPG Key ID: CE8B29639E07F5E8

View File

@ -861,9 +861,16 @@ class VirtualBoxVM(BaseNode):
self._vmname = self._name self._vmname = self._name
yield from self.manager.execute("setextradata", [self._vmname, "GNS3/Clone", "yes"]) yield from self.manager.execute("setextradata", [self._vmname, "GNS3/Clone", "yes"])
# We create a reset snapshot in order to simplify life of user who want to rollback their VM
# Warning: Do not document this it's seem buggy we keep it because Raizo students use it.
try:
args = [self._vmname, "take", "reset"] args = [self._vmname, "take", "reset"]
result = yield from self.manager.execute("snapshot", args) result = yield from self.manager.execute("snapshot", args)
log.debug("Snapshot 'reset' created: {}".format(result)) log.debug("Snapshot 'reset' created: {}".format(result))
# It seem sometimes this failed due to internal race condition of Vbox
# we have no real explanation of this.
except VirtualBoxError:
log.warn("Snapshot 'reset' not created")
def _start_remote_console(self): def _start_remote_console(self):
""" """